grub 1.99 configuration
I'm trying to manually run grub-mkconfig to establish grub-1.99 installation instructions for Linux From Scratch.
I am getting:
grub-mkconfig -o /boot/grub/grub.cfg
/usr/sbin/grub-probe: error: cannot stat `/dev/root'
Doing some investigating grub-mkconfig is running:
/usr/sbin/grub-probe --target=device /
Drilling down, grub-probe is doing:
device_name = grub_guess_root_device (path);
Which in turn is doing:
grub_find_root_device_from_mountinfo( "/", NULL );
This is reading /proc/self/mountinfo. The problem here is that this file does not give the device, but specifies /dev/root:
13 1 8:15 / / rw,relatime - ext3 /dev/root rw,errors=continue,barrier=0,data=writeback
The kernel is 2.6.39.1, but 2.6.37 seems to give the same thing. grub-probe should be able to detect /dev/sda15, but fails on newer kernels.
grub-probe for grub-1.98 works fine. A grep there shows no use of /proc/self/mountinfo.
Suggestions?
-- Bruce
Quoted 2 lines · Bruce Dubbs
grub-mkconfig -o
/boot/grub/grub.cfg
/usr/sbin/grub-probe: error: cannot stat `/dev/root'
You can fix it by backporting r3318 from trunk:
http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3318
The backport to 1.99 is not entirely straightforward. Here's a version that works with 1.99:
Signature · 1 line
Colin Watson [[email protected]]
Quoted 6 lines · Colin Watson
Quoted 2 lines · Bruce Dubbs
grub-mkconfig -o
/boot/grub/grub.cfg
/usr/sbin/grub-probe: error: cannot stat `/dev/root'
Quoted 8 lines
You can fix it by backporting r3318 from trunk:
http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3318
The backport to 1.99 is not entirely straightforward. Here's a version that works with 1.99:
Thanks for the info. I'll check it out.
-- Bruce
Quoted 23 lines · Bruce Dubbs
I'm trying to manually run grub-mkconfig to establish grub-1.99 installation instructions for Linux From Scratch.
I am getting:
grub-mkconfig -o
/boot/grub/grub.cfg
/usr/sbin/grub-probe: error: cannot stat `/dev/root'Doing some investigating grub-mkconfig is running:
/usr/sbin/grub-probe--target=device /Drilling down, grub-probe is doing:
device_name=grub_guess_root_device(path);Which in turn is doing:
grub_find_root_device_from_mountinfo( "/", NULL );This is reading
/proc/self/mountinfo. The problem here is that this file does not give the device, but specifies/dev/root:13 1 8:15 / / rw,relatime - ext3
/dev/root
rw,errors=continue,barrier=0,data=writeback
Quoted 9 lines
The kernel is 2.6.39.1, but 2.6.37 seems to give the same thing. grub-probe should be able to detect
/dev/sda15, but fails on newer kernels.grub-probe for grub-1.98 works fine. A grep there shows no use of
/proc/self/mountinfo.Suggestions?
update either udev or grub. normally /dev/root should be a symlink. Newer grub-probe can cope with some other arrangements as well
Quoted 10 lines
-- Bruce
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 28 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 27 lines · Bruce Dubbs
I'm trying to manually run grub-mkconfig to establish grub-1.99 installation instructions for Linux From Scratch.
I am getting:
grub-mkconfig -o
/boot/grub/grub.cfg
/usr/sbin/grub-probe: error: cannot stat `/dev/root'Doing some investigating grub-mkconfig is running:
/usr/sbin/grub-probe--target=device /Drilling down, grub-probe is doing:
device_name=grub_guess_root_device(path);Which in turn is doing:
grub_find_root_device_from_mountinfo( "/", NULL );This is reading
/proc/self/mountinfo. The problem here is that this file does not give the device, but specifies/dev/root:13 1 8:15 / / rw,relatime - ext3
/dev/root
rw,errors=continue,barrier=0,data=writebackThe kernel is 2.6.39.1, but 2.6.37 seems to give the same thing. grub-probe should be able to detect
/dev/sda15, but fails on newer kernels.
Quoted 7 lines
Quoted 5 lines
grub-probe for grub-1.98 works fine. A grep there shows no use of
/proc/self/mountinfo.Suggestions?
update either udev or grub. normally
/dev/rootshould be a symlink. Newer grub-probe can cope with some other arrangements as well
Well I'm using udev-171. That is the most recent version. We don't like to non-release package versions in LFS, but we do occasionally patch files.
I don't know when /dev/root became a 'device'. Udev doesn't create it.
We also don't use an initrd. That's not needed when you know in
advance what your hardware configuration is.
I did work around the problem by manually creating the symlink. I do not know of anything other than GRUB that needs it, but I don't use lvm.
In any case, I don't think GRUB should choke because /dev/root is missing.
-- Bruce
Quoted 45 lines · Bruce Dubbs
Quoted 28 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 27 lines · Bruce Dubbs
I'm trying to manually run grub-mkconfig to establish grub-1.99 installation instructions for Linux From Scratch.
I am getting:
grub-mkconfig -o
/boot/grub/grub.cfg
/usr/sbin/grub-probe: error: cannot stat `/dev/root'Doing some investigating grub-mkconfig is running:
/usr/sbin/grub-probe--target=device /Drilling down, grub-probe is doing:
device_name=grub_guess_root_device(path);Which in turn is doing:
grub_find_root_device_from_mountinfo( "/", NULL );This is reading
/proc/self/mountinfo. The problem here is that this file does not give the device, but specifies/dev/root:13 1 8:15 / / rw,relatime - ext3
/dev/root
rw,errors=continue,barrier=0,data=writebackThe kernel is 2.6.39.1, but 2.6.37 seems to give the same thing. grub-probe should be able to detect
/dev/sda15, but fails on newer kernels.Quoted 7 lines
Quoted 5 lines
grub-probe for grub-1.98 works fine. A grep there shows no use of
/proc/self/mountinfo.Suggestions?
update either udev or grub. normally
/dev/rootshould be a symlink. Newer grub-probe can cope with some other arrangements as wellWell I'm using udev-171. That is the most recent version. We don't like to non-release package versions in LFS, but we do occasionally patch files.
I don't know when
/dev/rootbecame a 'device'. Udev doesn't create it. We also don't use an initrd. That's not needed when you know in advance what your hardware configuration is.
Quoted 6 lines
I did work around the problem by manually creating the symlink. I do not know of anything other than GRUB that needs it, but I don't use lvm.
In any case, I don't think GRUB should choke because
/dev/rootis missing.
it's fixed now but handling these cases requires to scan /dev to find the matching device based on major/minor pair which is slower, sometimes much slower.
Quoted 6 lines
-- Bruce
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko