Bug 810432

Summary: grub2 does not support btrfs snapshots properly
Product: [Fedora] Fedora Reporter: Serge Pavlovsky <pal666>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: bcl, dennis, dwmw2, mads, pjones, vserbine
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-10 12:25:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Serge Pavlovsky 2012-04-06 06:32:57 UTC
Description of problem:
after snapshotting /boot initramfs which also exists in snapshot gets decompression error during boot
making copy with same name and md5 just to decouple from snapshotted copy fixes this problem

Comment 1 Mads Kiilerich 2012-04-18 00:16:07 UTC
I'm afraid this report is far too short to be useful or get a useful answer.

Please provide essential information such as the relevant package version(s), a description of how the problem can be reproduced and the exact error messages.

You could perhaps also investigate with grub upstream to which extent they support what you are trying to do.

Comment 2 Serge Pavlovsky 2012-04-20 11:11:33 UTC
latest f16
btrfs subvolume snapshot /boot test_snapshot
reboot
exact error message you will see when you try this. as i said it's kernel unhappy about error decompressing initramfs - presumably grub reads it from wrong blocks

i'm "trying" to boot f16
actually snapshot was made by yum plugin, but i don't think it matters

Comment 3 Vladimir Serbinenko 2012-06-02 09:39:38 UTC
Could you try with upstream or with the GRUB for f17? It should be fixed now.

Comment 4 Serge Pavlovsky 2012-06-06 18:00:05 UTC
well, f17 installer cannot install on btrfs, but i upgraded using yum
now grub2-install is crashing:

# LANG=C /sbin/grub2-install /dev/sda1
/sbin/grub2-install: line 862: 21224 Segmentation fault      (core dumped) "$grub_setup" ${allow_floppy} ${setup_verbose} ${setup_force} --directory="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform" --device-map="${device_map}" "${install_device}"


so i left with grub2 1.99 from f16 until installer is fixed probably in f18
so sadly i can't test with newer verion atm

Comment 5 Vladimir Serbinenko 2012-06-06 18:15:57 UTC
Could you supply a backtrace?

Comment 6 Mads Kiilerich 2012-06-07 00:21:42 UTC
The crash should be detected by abrt, making it very easy to report the backtrace.

But I guess the crash was with beta4 - and I guess something like the beta6 rpm from http://koji.fedoraproject.org/koji/buildinfo?buildID=322368 is needed to get the fix mentioned in comment 3. Please give that a try.

Comment 7 Serge Pavlovsky 2012-06-08 18:03:35 UTC
i think my crash is fixed by r4261
btw i have several cores of grub2-bios-setup, but no abrt reaction
i just killed -6 /bin/less and abrt caught it. dunno what was wrong with grub cores

i will try to test new version today

Comment 8 Serge Pavlovsky 2012-06-08 18:32:38 UTC
i cannot reboot yet, but i installed new version
now it says
# LANG=C /sbin/grub2-install /dev/sda1
/usr/sbin/grub2-probe: warning: the device.map entry `hd0,1' is invalid. Ignoring it. Please correct or delete your device.map.
/usr/sbin/grub2-probe: warning: the device.map entry `hd0,1' is invalid. Ignoring it. Please correct or delete your device.map.
/usr/sbin/grub2-probe: warning: the device.map entry `hd0,1' is invalid. Ignoring it. Please correct or delete your device.map.
/usr/sbin/grub2-probe: warning: the device.map entry `hd0,1' is invalid. Ignoring it. Please correct or delete your device.map.
/usr/sbin/grub2-probe: warning: the device.map entry `hd0,1' is invalid. Ignoring it. Please correct or delete your device.map.
/usr/sbin/grub2-probe: warning: the device.map entry `hd0,1' is invalid. Ignoring it. Please correct or delete your device.map.
/usr/sbin/grub2-bios-setup: warning: the device.map entry `hd0,1' is invalid. Ignoring it. Please correct or delete your device.map.
Installation finished. No error reported.
# cat /boot/grub2/device.map 
# this device map was generated by anaconda
(hd0)      /dev/sda
(hd1)      /dev/sdb
(hd2)      /dev/sdc
(hd3)      /dev/sdd
(hd0,1)      /dev/sda1
----
changing (hd0,1) to (hd0,msdos1) does not help
hope it will boot nevertheless

Comment 9 Vladimir Serbinenko 2012-06-08 18:46:41 UTC
device.map should contain partitions at all.

Comment 10 Serge Pavlovsky 2012-06-10 12:08:54 UTC
i think this bug is fixed now

Comment 11 Serge Pavlovsky 2012-06-12 17:56:08 UTC
well, i was wrong
the bug still exists
but it appears only after normal reboot
after pressing reset button grub boots fine
i can add that my boot disk is VTX3-25SAT3-120G
but i have no problems with it after boot