5 ms·
Inside the Linux boot process (2006)
- stevekemp 8y agoThe comments on that article look like they've been mangled at some point in the past!
- incopeable 8y agoYa?
- sml156 8y agoIt's like bash gone wild, look at one of the links they actually work http:\/\/tldp.org\/HOWTO\/Bootdisk-HOWTO\ Edit: I'm using Firefox
- zeth__ 8y agoI\'ve got no idea what you\'re talking about.\n\nThey look perfectly fine to me.
- incopeable 8y agoYa.?
- incopeable 8y ago.
- usr1106 8y agoarticle is from 2006
- std_throwaway 8y ago...and references the good old Reiser file system.
- IntelMiner 8y agoReiser jokes always kill
- lkurusa 8y agoI appreciate the article is from 2006, but it would be nice to see a similar write up for recent EFI-based machines and maybe other architectures, as well.
- JdeBP 8y agoWell you could start with http://jdebp.eu./FGA/efi-boot-process.html http://jdebp.eu./FGA/efi-boot-process.html .
- mastax 8y agoI just did a lot of reading about EFI to get my system booting again, so I'll write a bit about it. Cunningham's law and all that. On system startup, the CPU begins executing from the EFI ROM - a few-megabyte chip on the motherboard somewhere. The EFI is essentially a simple (won't say small) OS: it can enumerate devices and partitions, mount filesystems, draw graphics, and connect to the internet (shudder). It provides APIs for these capabilities to the loaded EFI executables. EFIs are either 32-bit or 64-bit so its boot code must switch from real mode at some point. After handling whatever system initialization, the EFI looks through the connected disks in the order configured by the user, searching for an EFI system partition. This partition is FAT32 and has a special GPT partition attribute to mark it. These partitions are usually 100-500MB and are usually the first partition on the disk. If found, the EFI mounts this partition. At this point, the boot process depends on the value of various EFI variables, which you can inspect with the `efivar` command on linux. These instruct the EFI bootloader to load various EFI executables, which are PE-format but otherwise fairly normal. First it will load any drivers specified by the `Driver####` and `DriverOrder` variables, which could be used to enable the EFI bootloader to load from e.g. a RAID controller or a BTRFS partition. I haven't seen this used in practice, however. Next it will run an executable specified by a `Boot####` variable, depending on the `BootNext` or `BootOrder` variables or a user-selection at the EFI boot menu. These EFI applications are stored in vendor-specific directories of the EFI system partition like `/EFI/Fedora/shimx64.efi`. These applications are usually either an EFI shim which executes a traditional bootloader, or a traditional bootloader compiled as an EFI application. EFI could also be used to directly boot a kernel, such as linux compiled with EFISTUB enabled. If the EFI isn't able to boot any of the registered entries, it will usually run the EFI Shell (if installed) or try to run whatever is at `/EFI/BOOT/bootx64.efi`.
- okket 8y ago(2006)
- amelius 8y agoHow difficult would it be to register the dependencies of the boot process, and only run the full boot process when those dependencies have been touched, using a generated and quickly loadable binary image otherwise?
- icebraining 8y agoI think most of the boot process is initializing hardware, so I don't see how you avoid it.
- amelius 8y agoHow come recovering from hibernation is much faster then? My (perhaps overly simple) conclusion is that the boot process is doing stuff it doesn't need to do.
- shandor 8y agoBecause a hibernated machine is still powered on. So you're correct in a way, the "boot process" from hibernation does skip a lot of things. Problem is, you can't utilize those shortcuts when doing a completely cold boot. Like another commenter said, in that case most of the boot time is preparing hardware.
- mseebach 8y agoNo, a hibernated machine is powered off, you're thinking of standby. Hibernation dumps a memory image to disk which is then loaded on next boot. As laptop standby power modes has gotten much better, and memory sizes bigger, hibernation seems to have fallen out of fashion. Parent seems to confuse two different kinds of boot. The one discussed in the article concerns itself with getting the OS loaded and beginning to execute that. Traditionally, this is where booting ends. But you OS still needs to do a lot of work, starting services, loading widgets and helpers and Bonzi Buddy etc. It's perhaps debatable if this can still be considered part of the boot process, since the OS is loaded and executing user space code, but it's certainly part of the startup process. I believe this is the process parent is referring to.
- dvfjsdhgfv 8y agoI'm sorry but the article has very little to do with the actual boot process of modern distributions.
- sverige 8y agoI run modern distributions and it describes at a high level the way my dual boot (and modern) laptop works. Not everyone uses EFI and systemd or Windows.
- r4um 8y agoThis is very old, for a more recent version https://github.com/0xAX/linux-insides https://github.com/0xAX/linux-insides
- therein 8y agoOne of my favorite guides on anything.