Skip to content

Instantly share code, notes, and snippets.

@dhruvdutt
Last active July 28, 2017 07:44
Show Gist options
  • Save dhruvdutt/b554a093932e1d0321c6e94cdcb766bf to your computer and use it in GitHub Desktop.
Save dhruvdutt/b554a093932e1d0321c6e94cdcb766bf to your computer and use it in GitHub Desktop.
Linux Boot Process

1. BIOS or UEFI

2. MBR or GPT

1st sector of bootable disk. /dev/hda or /dev/sda

3. Bootloader

GRUB or Windows boot loader. Or custom bootloaders like Clover & Chameleon Detects multiple kernel images, has knowledge of file-system /boot/grub/grub.conf. Also, /etc/grub.conf points to same file.

4. Kernel

Mounts root file system from grub.confg's root= value (hd0,0); executes /sbin/init program, initrd, init ram disk - temp file system until root file system is mounted.

5. Init

Looks at /etc/inittab to decide linux run level 0-6 init starts applications from /etc/rc.d/rc0.d, rc0.d, rc1.d

Run levels:

  1. halt
  2. single user moden, no deamons, only root login
  3. multi user mode without network interfaces, no daemons
  4. starts system normally
  5. undefined
  6. x11 => 3 + display manager(x) - used in GUI env
  7. reboot

6. Run-levels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment