Bug 868473 - grub2-probe error cannot find a GRUB drive for /dev/sda1 on btrfs raid0
Summary: grub2-probe error cannot find a GRUB drive for /dev/sda1 on btrfs raid0
Keywords:
Status: CLOSED DUPLICATE of bug 890955
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-20 04:05 UTC by Chris Murphy
Modified: 2013-01-12 19:35 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-12 19:35:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
btrfs single disk grub.cfg (4.27 KB, text/plain)
2012-10-20 04:12 UTC, Chris Murphy
no flags Details
btrfs raid0 2-disk grub.cfg (4.23 KB, text/plain)
2012-10-20 04:13 UTC, Chris Murphy
no flags Details
bash -x grub2-mkconfig (6.58 KB, text/plain)
2012-10-20 19:43 UTC, Chris Murphy
no flags Details

Description Chris Murphy 2012-10-20 04:05:12 UTC
Description of problem:
grub2-mkconfig produces two errors, seem to be bogus

Version-Release number of selected component (if applicable):
grub2-2.00-9.fc18.x86_64
Fedora-18-Beta-TC5-x86_64-Live-Desktop.iso

How reproducible:
Always, at least with a btrfs raid0 volume.

Steps to Reproduce:
1. Install, creating btrfs subvol for boot, root, home; on two disks (raid0)
2. Comment out theme line in /etc/default/grub
3. grub2-mkconfig -o /boot/grub2/grub.cfg
  
Actual results:
Generating grub.cfg ...
/usr/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/sda1
/dev/sdb1.  Check your device.map.
Found linux image: /boot/vmlinuz-3.6.1-1.fc18.x86_64
Found initrd image: /boot/initramfs-3.6.1-1.fc18.x86_64.img
/usr/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/sda1
/dev/sdb1.  Check your device.map.
  No volume groups found
done

Expected results:
minus errors and comment to check device.map

Additional info:
The device.map doesn't look wrong.
# this device map was generated by anaconda
(hd0)      /dev/sda
(hd1)      /dev/sdb

The resulting grub.cfg works.
core.img has the right prefix for the boot subvol.

Regression:
Single disk btrfs volume, also with boot, root, home subvols, the error does not occur. Seems restricted to multiple device btrfs volumes.

Comment 1 Chris Murphy 2012-10-20 04:11:48 UTC
OK so the resulting grub.cfg's are different but only the menuentry line appears affected. In the single disk btrfs case, the menuentry line includes the root UUID. Whereas in the 2 disk raid0 btrfs case, the menuentry line contains /dev/sda1 /dev/sdb1 instead; although the proper UUID appears within the entry on the search and linux lines.

Weird. Appears benign. Attaching the two grub.cfg.

Comment 2 Chris Murphy 2012-10-20 04:12:23 UTC
Created attachment 630354 [details]
btrfs single disk grub.cfg

Comment 3 Chris Murphy 2012-10-20 04:13:12 UTC
Created attachment 630355 [details]
btrfs raid0 2-disk grub.cfg

Comment 4 Chris Murphy 2012-10-20 19:43:16 UTC
Created attachment 630624 [details]
bash -x grub2-mkconfig

I think this may be related.
       grub2-probe --target=device /
returns this:
       + GRUB_DEVICE='/dev/sda1
       /dev/sdb1'

Speculate that the CR in between these is tripping up grub2-probe later on when it's trying to figure out what to put in the menuentry, a /dev device or UUID?

Pretty sure for anything else, / would return just a single device? Whereas with btrfs volumes, / isn't mapped to something like /dev/md0, but rather each constituent physical device.

I think 4 devices returned for raid10 volume containing / is a realistic scenario in the near term.

Comment 5 Reartes Guillermo 2012-11-03 22:03:31 UTC
I tried F18b TC7 and tried to:

1mb biosboot
the rest a btrfs for /boot, swap, /. I just created a mount point for / with the desired size. Anaconda complained that /boot must be not a subvolume.
Does actually grub2 support btrfs subvolumes? (in this case, it was a single disks setup).

Comment 6 Reartes Guillermo 2012-11-03 22:04:14 UTC
Sorry, this was for another bug-report.

Comment 7 Gene Czarcinski 2013-01-12 19:35:08 UTC
Yes Chris, this is a dup of my report although is was not obvious at first.

Even more important is that there was some critical info here which says my initial patch which removed some double quotes so that the list of devices was on a single line is the correct fix.  This is the same as line 133 in grub2-mkconfig.

*** This bug has been marked as a duplicate of bug 890955 ***


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