bugGNU GRUB - Bugs: bug #39591, grub-mkconfig fails on btrfs raid

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #39591: grub-mkconfig fails on btrfs raid

Submitter:  Florian Scandella <fscan>
Submitted:  Sun 28 Jul 2013 03:29:53 PM UTC
Votes: 100
 
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  other
Release:  Reproducibility:  Every Time
Planned Release:  None

Fri 31 Jul 2015 07:13:03 AM UTC, comment #3: 

GRUB_DISABLE_LINUX_UUID=true

For some reason I preferred not using UUIDs when setting it up, can't remember why exactly..

Konstantin Svist <fry_kun>
Fri 31 Jul 2015 04:00:52 AM UTC, comment #2: 

@Konstantin: Why it tries to use devices in your case? It should be using UUID.

Andrei Borzenkov <arvidjaar>
Group Member
Fri 31 Jul 2015 12:01:32 AM UTC, comment #1: 

I'm hitting this problem in Fedora 22 with RAID1 Btrfs

As described by Florian, grub2-mkconfig gets a list of devices in GRUB_DEVICE -- which is subsequently written into generated grub.cfg like so:


        linux16 /subvol_root/boot/vmlinuz-4.1.2-200.fc22.x86_64 root=/dev/sda3
/dev/sdb3 ro rootflags=subvol=subvol_root rd.md=0 rd.lvm=0 rd.dm=0 rd.luks=0 quiet rhgb raid=noautodetect
        initrd16 /subvol_root/boot/initramfs-4.1.2-200.fc22.x86_64.img


Versions:
# grub2-mkconfig -v
grub2-mkconfig (GRUB) 2.02~beta2
rpm -q grub2
grub2-2.02-0.16.fc22.x86_64

Konstantin Svist <fry_kun>
Sun 28 Jul 2013 03:29:53 PM UTC, original submission:  

using grub-2.00.5043-3 from arch linux testing.

grub-mkconfig line 131:
GRUB_DEVICE="`${grub_probe} --target=device /`"

on a btrfs raid GRUB_DEVICE now holds a list of devices. this fails in several places when generating the grub.cfg.
for example the next line will fail:

GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true

a solution would be to change this to:

GRUB_DEVICE_UUID="`${grub_probe} --target=fs_uuid / 2> /dev/null`" || true

and use GRUB_DEVICE_UUID instead of GRUB_DEVICE everywhere if set.

another quick fix would be:

GRUB_DEVICE="`${grub_probe} --target=device / | head -n 1`"

to only look at the first returned device.

Florian Scandella <fscan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by fry_kun (Posted a comment)
  • -email is unavailable- added by fry_kun (Voted in favor of this item)
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by fscan (Submitted the item)
  •  

    There are 100 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-07-31 fry_kun Carbon-Copy- Added fry_kun
    2013-10-14 phcoder StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code