Difference between revisions of "How Linux Boots"
(Created page with " == Motivation == Nothing is more frustrating then not being able to boot into your system. If it hangs a boot with a cryptic message, then what do you do? People running oth...") |
|||
Line 6: | Line 6: | ||
== Stages of Booting Linux == |
== Stages of Booting Linux == |
||
− | # your PC boots (BIOS) |
+ | # your PC boots (BIOS from EEPROM chips on your motherboard) |
+ | # loads the first ca 300 bytes from block 0 of your hard drive |
||
+ | # loads the rest of GRUB boot loader |
||
+ | # GRUB can readonly read most filesystems and load kernel (vmlinuz) and initial-ramdisk (initrd) |
||
+ | # kernel unpacks itself and intializes hardware |
||
+ | # kernel unpacks initial ramdisk and starts script there (e.g. /init ) |
||
+ | # initial ramdisk scripts loads additional modules and mount real / |
||
+ | # starts init process. (today usually systemd) |
||
+ | # systemd runs boot scripts for all configured items. (e.g. ssh, X11, ..) |
Revision as of 14:36, 29 October 2020
Motivation
Nothing is more frustrating then not being able to boot into your system. If it hangs a boot with a cryptic message, then what do you do? People running other Operating Systems then tend to try to re-install their OS at this point. Once you know how Linux boots then it is almost always possible to boot into your system again as long as your hard-drive is not damaged.
Stages of Booting Linux
- your PC boots (BIOS from EEPROM chips on your motherboard)
- loads the first ca 300 bytes from block 0 of your hard drive
- loads the rest of GRUB boot loader
- GRUB can readonly read most filesystems and load kernel (vmlinuz) and initial-ramdisk (initrd)
- kernel unpacks itself and intializes hardware
- kernel unpacks initial ramdisk and starts script there (e.g. /init )
- initial ramdisk scripts loads additional modules and mount real /
- starts init process. (today usually systemd)
- systemd runs boot scripts for all configured items. (e.g. ssh, X11, ..)