# Linux Administration/System Architecture/Boot Sequence

This lesson covers the boot sequence.

## Objectives and Skills

Objectives and skills for the boot sequence portion of Linux+ certification include:
* Boot the system
** Provide common commands to the boot loader and options to the kernel at boot time
** Demonstrate knowledge of the boot sequence from BIOS to boot completion
** Understanding of SysVinit and systemd
** Awareness of Upstart
** Check boot events in the log file
** The following is a partial list of the used files, terms and utilities:
*** dmesg
*** BIOS
*** bootloader
*** kernel
*** initramfs
*** init
*** SysVinit
*** system

## Readings

* Wikipedia: Linux startup process
* Wikipedia: BIOS
* Wikipedia: Booting
* Wikipedia: GNU GRUB
* Wikipedia: Kernel (operating system)
* Wikipedia: Upstart (software)
* Wikipedia: dmesg
* Wikipedia: Initial ramdisk
* Wikipedia: init

## Multimedia

* YouTube: Common Boot Loader Commands
* YouTube: Understanding the Linux Boot Process
* YouTube: An Overview of the Linux Boot Log Files

## Activities

* Complete the tutorial IBM: Learn Linux, 101: Boot the system
* Use the GRUB boot menu.
** Access the GRUB menu. Review available options and advanced options.
** Edit one of the GRUB menu items to see the configuration but do not make any changes.
** Access the command line. Use the reboot command to reboot the system.
** Review Ubuntu: RecoveryMode. Boot into Recovery mode and review available options. Reboot the system.
* List the steps in the boot sequence from BIOS to boot completion.
* Identify which major Linux distributions use or used init, SysVInit, systemd, and Upstart.
* Compare the contents of /var/log/kern.log with the output from dmesg.

## Lesson Summary

* The boot sequence includes ROM, Power-On Self-Test (POST), boot manager, boot loader, and user software or graphical user interface (GUI).
* A master boot record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond.
* Boot loaders interact with the BIOS to load the operating system.
* System V SysVinit startup is based on runlevels. SysVinit runlevels include:
** 0 - Shutdown
** 1 - Single-user mode
** 2 - Multi-user mode
** 3 - Multi-user mode with RFS
** 4 - Multi-user mode, User-definable
** 5 - Halt
** 6 - Reboot
** S - Single-user mode with terminal console
* Upstart is an event-based replacement for the traditional init daemon.
* Upstart was the default init system in Ubuntu and Chrome OS.
* systemd is now the default init system in most Linux distributions, including RHEL and Ubuntu.
* GRUB boot options include a list of operating systems, "e" to edit the list, and "c" for a command-line.
* GRUB recovery mode provides a Recovery Menu of options.
* dmesg (display message or driver message) is a command on most Unix-like operating systems that prints the message buffer of the kernel.

## Key Terms
### ELILO (EFI Linux Loader

    EFI/UEFI boot loader

### GRUB (GRand Unified Bootloader)

    A boot loader package from the GNU Project.

### initramfs (initial RAM file system)

    A scheme for loading a temporary root file system into memory.

### initrd (initial ramdisk)

    A scheme for loading a temporary root file system into memory.