Booting process of Linux: Difference between revisions

Content deleted Content added
Bootloader stage: Put back the original date as well, even though it is unlikely for the same reason that the original access date is.
System startup: s/EFISTUB/EFI boot stub/ > the latter is how the kernel developer call it, instead of a vaguely popular shortening
Line 11:
In BIOS systems, the BIOS will respectively perform power-on self test (POST), which is to check the system hardware, then enumerate local device and finally initialize the system.{{Sfn|M. Tim Jones|2006|loc=, "System startup"}} For system initialization, BIOS will start by searching for the bootable device on the system which stores the OS. A bootable device can be storage devices like floppy disk, CD-ROM, USB flash drive, a partition on a hard disk (where a hard disk stores multiple OS, e.g Windows and Fedora), a storage device on local network, etc.{{Sfn|M. Tim Jones|2006|loc=, "System startup"}} A hard disk to boot Linux stores the [[Master boot record|Master Boot Record]] (MBR), which contains the first-stage/primary bootloader in order to be loaded into RAM.{{Sfn|M. Tim Jones|2006|loc=, "System startup"}}
 
In [[UEFI]] systems, the Linux kernel can be executed directly by UEFI firmware via EFISTUBthe EFI boot stub,<ref>{{Cite web |title=EFI stub kernel - Gentoo Wiki |url=https://wiki.gentoo.org/wiki/EFI_stub_kernel |access-date=2020-11-02 |website=wiki.gentoo.org}}</ref> but usually uses [[GRUB 2]] or [[Gummiboot (software)|systemd-boot]] as a bootloader.<ref name="Intel2000">{{cite web |last=Kinney |first=Michael |date=1 September 2000 |title=Solving BIOS Boot Issues with EFI |url=http://systems.cs.colorado.edu/Documentation/IntelDataSheets/xscalemagazine.pdf |url-status=dead |archive-url=https://web.archive.org/web/20070123141151/http://systems.cs.colorado.edu/Documentation/IntelDataSheets/xscalemagazine.pdf |archive-date=23 January 2007 |access-date=14 September 2010 |pages=47–50}}</ref><ref name="ElReg1">{{cite news |date=23 September 2011 |title=MS denies secure boot will exclude Linux |url=https://www.theregister.co.uk/2011/09/23/ms_denies_uefi_lock_in/ |access-date=24 September 2011 |publisher=The Register}}</ref>
 
The system startup stage on embedded Linux system starts by executing the firmware/program on the on-chip boot ROM, which is stored on the storage device of the system like USB flash drive, SD card, eMMC, NAND flash, NOR flash, etc.{{Sfn|Alberto Liberal De Los Ríos|2017|loc=, "Linux Boot Process"|p=28}} The sequences of system startup in on-chip boot ROM varies by processors{{Sfn|Alberto Liberal De Los Ríos|2017|loc=, "Linux Boot Process"|p=28}} but all include hardware initialization and system hardware testing steps.{{Sfn|M. Tim Jones|2006|loc=, "System startup"}} For example in a system with an i.MX7D processor and a bootable device which stores the OS (including U-Boot, an external bootloader), the on-chip boot ROM sets up the [[DDR SDRAM|DDR memory]] controller at first which allows the boot ROM's program to obtain the SoC configuration data from the external bootloader on the bootable device.{{Sfn|Alberto Liberal De Los Ríos|2017|loc=, "Linux Boot Process"|p=28}} The on-chip boot ROM then loads the U-Boot into RAM for the bootloader stage.{{Sfn|Alberto Liberal De Los Ríos|2017|loc=, "Linux Boot Process"|p=29}}