On Wed, Jun 30, 2010 at 2:57 PM, Nathan Coulson <conat...@gmail.com> wrote: > On Wed, Jun 30, 2010 at 2:10 PM, Andrew Benton <b3n...@gmail.com> wrote: >> On 30/06/10 19:33, Stuart Stegall wrote: >>> >>> Seems like it should be the simplest way possible. Personally I don't >>> like the grub-mkconfig - has failed to work for me a few times, and I >>> believe it does that due to my host system. >>> >> grub-mkconfig has never worked for me as I use btrfs for my root partition >> >>> Seems like a much more simple approach of: >>> >>> # cat<<EOF> /boot/grub/grub.cfg >>> set timeout=10 >>> set default=0 >>> menuentry "LFS x.x" { >>> set root=(hd0,1) >>> linux /vmlinuz root=/dev/sda2 >>> } >>> EOF >>> >>> Would be better. >>> >> I agree. I've always written grub.cfg by hand from examples found with >> google. >> >> Andy >> -- >> http://linuxfromscratch.org/mailman/listinfo/lfs-dev >> FAQ: http://www.linuxfromscratch.org/faq/ >> Unsubscribe: See the above information page >> > Boot Process: > Grub2 runs. > > set root=, or search to set the root partition for grub. AFAIK, this > is only useful for saying where / goes. (ex:/ I used > (hd1,1)/boot/lfskernel, and it still worked, without setting root to > anything). > > Loads the kernel by using /boot/lfskernel (if root is set), or (hd1,1) > completely ignoring whatever root is set to. > > Linux loads, and the grub root is lost. AFAIK, linux has no way of > obtaining this information. > > Linux looks for the root filesystem. These are the options I know > root=/dev/sda1 - Loads this partition > root not set - Load the partition set within the kernel image (Set > w/ rdev if I recall) > linux then runs /sbin/init [or whatever init= on the commandline] > > (an alternative way, is if linux loads a initrd/initramfs. Then you > can use a few shell scripts to find the root instead. This is how > distributions make root=UUID=abcdefg or root=LABEL=os work). > > > > So, regardless if you search or not, or set root manually, this has no > effect once the kernel boots. You either need root=/dev/sda1, or you > need to use rdev (used to be in util-linux) to set the root. I > believe when you compile the kernel, rdev is set automatically to > whatever / is.
As for fstab, it can only be read 'after' the root partition was mounted. At that point, it is too late in the equation. -- Nathan Coulson (conathan) ------ Location: Brittish Columbia, Canada Timezone: PST (-8) Webpage: http://www.nathancoulson.com -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page