linux fan wrote: > At any rate, grub2 search line is not totally useless, and that is nice to > know.
Yes, we know what it does. It sets a variable in the GRUB environment based on UUID or LABEL. The variable can be used to find the kernel image location, but how is it useful in an LFS environment? Suppose we had something like: /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 and LFS is on sda4. Now we delete sda1 even use fdisk to change the partition table so we have sda{1,2,3} and the kernel on sda3. GRUB finds the kernel via the search, but either the kernel's root partition has to be changed via rdev or we have to specify root=/dev/sda3. What benefit did search provide? Note the following from the rdev manpage: "The rdev utility, when used other than to find a name for the current root device, is an ancient hack that works by patching a kernel image at a magic offset with magic numbers. It does not work on architectures other than i386. Its use is strongly discouraged. Use a boot loader like SysLinux or LILO instead." In another example, we take our first disk with sda{1,2,3,4} and put it on another system as /dev/sdb. search finds the kernel, but the kernel does not find the root file system. I'll ask the question again. How is search useful in an LFS environment where we don't have initrd available? -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page