PC booting -- so complex!
Posted: Sun Sep 04, 2022 11:52 pm
I'm not complaining. It's just that working with and writing about partitions caused me to reflect on it. For starters, the PC is an anomaly. 10 years after its launch, it was normal to have some non-volatile memory for operating system use. Plan 9 used it to store a security key. At some point, probably earlier than I think,[1] it became normal to have enough non-volatile memory on board to store a kernel. All the bootloader had to do was copy the kernel from slow ROM to fast RAM and jump to it. There's a great consequence of this: the kernel can then use its normal drivers to bring up everything else. When building a new architecture, you don't have to write 2 sets of drivers.
[1]: I thought it was by the end of the 90s, but then I remembered the Atari ST, launched in 1984 or 5, had its entire operating system in ROM. It's only rewriteable flash memory which took time to develop.
It might seem that keeping the kernel in onboard flash is bad for updates, particularly when you remember the limited lifespan of flash memory and the fact that if it's direct-addressed, (which it would be in this case,) you can't do wear leveling. This is solved with kexec. Of the systems I've seen, Plan 9 and the Sharp Zaurus would both load a kernel at boot which would then kexec the production kernel. I'm slightly ashamed to say that having encountered Plan 9 only on PCs, I thought its boot process strangely "impure", but now I realise it's just about only having to write drivers once.
So I guess I'm not talking about PC booting at all in this post. In fact, I have for years been thinking of loading Coreboot into my Thinkpad T440, turning its boot process into something more modern. I just didn't realise until now that it could simplify booting in a similar way to using a good bootloader.
[1]: I thought it was by the end of the 90s, but then I remembered the Atari ST, launched in 1984 or 5, had its entire operating system in ROM. It's only rewriteable flash memory which took time to develop.
It might seem that keeping the kernel in onboard flash is bad for updates, particularly when you remember the limited lifespan of flash memory and the fact that if it's direct-addressed, (which it would be in this case,) you can't do wear leveling. This is solved with kexec. Of the systems I've seen, Plan 9 and the Sharp Zaurus would both load a kernel at boot which would then kexec the production kernel. I'm slightly ashamed to say that having encountered Plan 9 only on PCs, I thought its boot process strangely "impure", but now I realise it's just about only having to write drivers once.
So I guess I'm not talking about PC booting at all in this post. In fact, I have for years been thinking of loading Coreboot into my Thinkpad T440, turning its boot process into something more modern. I just didn't realise until now that it could simplify booting in a similar way to using a good bootloader.