On Sat, Sep 16, 2023 at 06:51:40AM -0000, Michael van Elst wrote: > You can already specify the root in boot.cfg.
OK, the man page needs an update. > >It would also be cool if boot.cfg could specify the partition to load > >the kernel from via something similiar to NAME=. > > You can already specify the disk to load the kernel from with NAME=. This is not documented in boot.cfg either (but it is in boot(8)). > >don't understand how you get this far at all with multiboot. And I think > >multiboot can pass a command line, so root=dev support and make it equivalent > >to the boot.cfg rootdev statement would solve it too. > > The multiboot support code in the kernel already interprets the passed > command line, including a "root" option, and this also allows to pass > a wedge name. Great, so we are nearly there! > There is one caveat. Since all x86 bootloader data is funneled through > the bootinfo structure we have: > > struct btinfo_rootdevice { > struct btinfo_common common; > char devname[16]; > }; > > So we have 16 chars to store the identifier (including a NAME= or > wedge: prefix), that's not enough for a UUID. So we should create btinfo_rootdevice2 and extend that size to something more reasonable nowadays or with variable length (and have the bootloader pass the extended structure if strings are longer). Martin