grub dependencies

Bryan Kadzban bryan at
Sun Jun 12 11:56:15 PDT 2011

Bruce Dubbs wrote:
> Another solution may be to do:
>    cd /dev
>    ln -sv <root partition> root
> before running a program that needs grub-probe.

Ew!  :-)

/dev/root is *never* a real device, and anything that requires it to be
is broken by design.  There were several long arguments about this on
linux-hotplug a few years ago (somebody from Debian, I believe, wanted
to make a /dev/root symlink from udev; it never happened).

I *very* much prefer the patch in the thread you linked to: stop
stat()ing devices that don't need it.

> Another problem is that the kernel only understands devices on the 
> command line, not an id as above.

But the device map isn't used for kernel command-line arguments, only to
figure out a mapping for the grub commands in the menu file.  Or, it
shouldn't be used for kernel command-line arguments; is grub2 even more
broken than I thought?  The kernel won't take root=(hd0,1)...

(An initramfs could support by-id paths on the command line of course.
Or you could do even better, and parse out /etc/fstab from the
initramfs, and use whatever the user has configured to mount on / in
that file.  Then you don't need root= at all.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the lfs-dev mailing list