Bug 723626

Summary: grub-installl fails (new-kernel-pkg also fails too) on nodev filesystems
Product: [Fedora] Fedora Reporter: Rudd-O DragonFear <rudd-o>
Component: grubAssignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: herrold, jonathan, lkundrak, madhu.chinakonda, pjones, sergio
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 18:04:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rudd-O DragonFear 2011-07-20 17:51:10 UTC
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?

fstab:

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.

Halp!

Comment 1 Rudd-O DragonFear 2012-02-01 01:31:42 UTC
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 22:27:13 UTC
Persists in F16.

Comment 3 Fedora End Of Life 2012-08-07 18:04:07 UTC
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping