HouHongxun wrote: > In fact, this error had been pointed out by splotz90 in > http://wiki.linuxfromscratch.org/lfs/ticket/2698 > and > http://wiki.linuxfromscratch.org/lfs/ticket/2699 > > but unfortunately all two tickets have been closed. > > so i decide to start a new thread.
Yes, that is the proper way to discuss this issue. > the page below explains what the search command does: > http://grub.enbug.org/search > > There are some typos. For example , "HD" should be "no", > "bg" should be "by", "te" should be "to". > > So the search command has nothing to do with initrd image. Perhaps, however it really doesn't do anything useful for LFS. See below. > For instance, this menuentry in my grub.cfg file: > > *menuentry "GNU/Linux, with Linux 2.6.34" --class gnu-linux --class gnu > --class os { > insmod ext2 > set root='(hd0,15)' > search --no-floppy --fs-uuid --set > ab00fa9d-6571-4c2a-bca2-f8d219a1ab91 > echo Loading Linux 2.6.34 ... > linux /boot/vmlinuz-2.6.34 root=/dev/sda7 > }* > > At first, the set command set "root" variable to partition (hd0,15) > which does not exist in my system. then grub uses search command to find > which partition has uuid "ab00fa9d-6571-4c2a-bca2-f8d219a1ab91", then > grub found that (hd0,7) has uuid "ab00fa9d-6571-4c2a-bca2-f8d219a1ab91", > so grub set "root" variable to (hd0,7) > > now* > linux /boot/vmlinuz-2.6.34 root=/dev/sda7 > *is equivalent to* > linux (hd0,7)/boot/vmlinuz-2.6.34 root=/dev/sda7 Your line above is saying that we don't know where the kernel image is located, but we do know that the root partition is /dev/sda7. That doesn't make sense. The discussion is made a bit complicated because the same term is used for grub's root (set root= or perhaps search) and the kernel's root (root=/dev/sda7 in this example). > *so the sentence* "*The /search/ lines are not meaningful for LFS > systems as that command needs an initrd image for processing" is wrong. Perhaps the wording should be "The 'search' lines are not useful for LFS systems because we know the disk layout. Using a UUID for the kernel's root partition requires an initrd." If we don't know the disk layout, we can't specify root=/dev/sda7 on the linux line. To use a UUID to specify the kernel's root partition requires an initrd. I'm open to alternate wording, but the purpose of section 8.4 is to get a user up and running, not to explain nuances of the grub.cfg file. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page