help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Kernel Loading and the Root Environment Variable


From: Andrei Borzenkov
Subject: Re: Kernel Loading and the Root Environment Variable
Date: Sat, 7 Feb 2015 18:23:51 +0300

В Fri, 6 Feb 2015 15:36:55 -0500
Poisson Aerohead <address@hidden> пишет:

> 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?

Yes. root variable is commonly used to pass "boot device" information on
PC BIOS platform.

> It looks
> like it does, but that is not what I saw in the documentation for the grub
> root variable.

Patches to documentation are definitely appropriate for and welcomed
on dev list :)

> The docs talk about defaults for "ls" and other simple
> commands.
> 
> Thanks in advance, and please redirect if appropriate!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]