Feb
29
2016
By abernal
Chapter 2. System Startup and Shutdown
Important topics
- BIOS
- UEFI
- Configuration files
- /etc
- Control startup behavior
- /etc/sysconfig
- /etc/default
- Shutting down and rebooting
Objectives
- Explain the boot process
- Identify several types of boot loaders
- Describe what the BIOS does
- Identify the relevant configuration files
- Describe how the system shuts down and reboots
Boot Process
- The BIOS/UEFI locates and executes the boot loader
- BIOS runs POST (Power On Selft Test)
- BIOS search for the boot loader (often GRUB) within the MBR (Master Boot Record)
- The boot loader loads the kernel
- On x86 platforms the kernel first has to decompress itself
- The kernel starts the init process (pid=1)
- Init process manage system initialization, using conventional SysVinit startup scritps or using Upstart or systemd
BIOS/UEFI
Its a program often loaded within a chip inside of the computer called ROM (Read Only Memory) in order to allow the computer to boot from itself. The BIOS loads the boot loader which then loads the Operative System.
The UEFI is the evolution of the BIOS.
BOOT LOADERS
These programs often placed within the MBR (Master Boot Record) inside of the hard drive, are the ones that load the Operative System. Some of them are
- GRUB
- GRand Unified Boot Loader, includes the ability to
- Boot multiple operating systems
- GRand Unified Boot Loader, includes the ability to
- LILO
- Old and Obsolete
- efilinux
- Alternative Boot Loader to couple with the UEFI mechanism
- Das U-Boot
- Most popular loader for embedded Linux systems
CONFIGURATION FILES
- Systems wide configuration files are generally placed in
/etc
- User specific files are often placed in their individual home directories
- Debian based systems use
/etc/default
- Red Hat based systems use
/etc/sysconfig
SHUTTING DOWN AND REBOOTING
shutdown now
Examples
$ sudo shutdown -h +1 "Power failure inminent"
$ sudo shutdown -h now
$ sudo shutdown -r now
$ sudo shutdown now
$ shutdown --help
Old commands
$ reboot
$ halt
$ poweroff