Bug 723626 - grub-installl fails (new-kernel-pkg also fails too) on nodev filesystems
grub-installl fails (new-kernel-pkg also fails too) on nodev filesystems
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-07-20 13:51 EDT by Rudd-O DragonFear
Modified: 2017-10-02 19:06 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-07 14:04:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rudd-O DragonFear 2011-07-20 13:51:10 EDT
n my zfs on linux zfs root system, where /boot is on ext4 and / is on zfs (dracut, etcetera), grub/install /dev/sda fails with an error message "Could not find device for ", which then makes new-kernel-pkg (and therefore kernel installations) fail.

Has anyone encountered this?  Any solutions?


ssd                                                /                                  zfs      noatime,xattr                               0 0
/dev/sda1                                          /boot                              ext4     noatime                                     0 1
/dev/sda2                                          swap                               swap     defaults                                    0 0

I have tracked the problem to this line in grub-install:

df $1/ | sed -n 's%.*\(/dev/[^   ]*\).*%\1%p'

this of course returns something empty, therefore no root device is found even if specified with --root-directory=/

The bug for kernel installations in new-kernel-pkg / grubby is different, they cannot find the root device too, but it's not because of grub-install.

Of course, there is no root device proper in ZFS (or btrfs for that matter) so of course it does not work.  The script ought to be modified to ignore the absence of a root file system device IF the physical boot device can be found.

Comment 1 Rudd-O DragonFear 2012-01-31 20:31:42 EST
The bug persists.  The line in grub2-mkconfig where it dies is this:

# Device containing our userland.  Typically used for root= parameter.
GRUB_DEVICE="`${grub_probe} --target=device /`"
GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true

# Device containing our /boot partition.  Usually the same as GRUB_DEVICE.
GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true

grub-probe should return something like "ZFS=path/to/ZFS/filesystem/containing/root" when the root file system is hosted on a ZFS file system.  This will solve the bug.
Comment 2 Rudd-O DragonFear 2012-02-01 17:27:13 EST
Persists in F16.
Comment 3 Fedora End Of Life 2012-08-07 14:04:07 EDT
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:

Note You need to log in before you can comment on or make changes to this bug.