Hi all! This may be more appropriate for the "dev" mailing list. If so, please let me know.
I have been playing a lot with multibooting, basically a "to see if I can do it" project while getting exposed to both the low level early computer (Dell BIOS based) and the differences amongst various *nix flavors and the distros of each. I recently got 2 GNU/Linux distros and 2 BSD distros running on a single GPT based hard drive and everything is booting well (my first experience with BSD). It got me really thinking about the chicken and egg problem of booting a kernel and so I did some experimenting.
BSD does not seem to install itself with an initrd by default, so the "chicken and egg" problem as I see it is: the root partition is called out in /etc/fstab, but the early kernel has no / mounted, and so no /etc/fstab to read. I started to wonder how my BSD partitions were booting *without* an initrd or an explicit --root=* called out in grub. I tried the following *successfully* from the grub command line:
set root=(hd0,7)
kfreebsd /boot/loader
boot
set root=(hd0,8)
knetbsd /netbsd
boot
But the following 2 were *not successful* (they successfully booted but BSD could not find the right mountable partition for / and froze, reporting something to that effect):
kfreebsd (hd0,7)/boot/loader
boot
knetbsd (hd0,8)/netbsd
boot
Does grub's "root" environment variable affect commands like "knetbsd" to automatically pass to the kernel or loader a --root=* argument? It looks like it does, but that is not what I saw in the documentation for the grub root variable. The docs talk about defaults for "ls" and other simple commands.