[Bug 911243] New: SUSE_BTRFS_SNAPSHOT_BOOTING=true breaks resume after hibernate
http://bugzilla.opensuse.org/show_bug.cgi?id=911243 Bug ID: 911243 Summary: SUSE_BTRFS_SNAPSHOT_BOOTING=true breaks resume after hibernate Classification: openSUSE Product: openSUSE Distribution Version: 13.2 Hardware: x86-64 OS: openSUSE 13.2 Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader Assignee: jsrain@suse.com Reporter: wbauer@tmo.at QA Contact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) konqueror/4.14.3 Safari/537.21 Build Identifier: If SUSE_BTRFS_SNAPSHOT_BOOTING is set to true in /etc/default/grub (the default), the hibernate scripts (/usr/bin/systemd-sleep-grub, /usr/lib/pm-utils/sleep.d/99Zgrub) get confused by the "menuentry" added to the 00_header in grub.cfg. So they set the wrong (off by one) entry to be booted. Reproducible: Always Steps to Reproduce: 1. set SUSE_BTRFS_SNAPSHOT_BOOTING=true (that's the default anyway) 2. boot a previous kernel in "Advanced Options" 3. hibernate, then resume Actual Results: The wrong boot entry is booted (recovery mode), therefore no resume is actually taking place. And now that boot entry is even set permanently because of bug#856391. Expected Results: The system resumes successfully. Here's the debug output (from the pm-utils script, systemd-sleep-grub says basically the same though): INFO: running prepare-grub Skipping grub entry #3, because it has the noresume option Skipping grub entry #5, because it has the noresume option Skipping grub entry #6, because it has no root= option running kernel is grub menu entry 4 (vmlinuz-3.16.6-2-desktop) preparing boot-loader: selecting entry 4, kernel /boot/3.16.6-2-desktop grub-once: saving original /boot/grub2/grubenv running '/usr/sbin/grub2-once 4' while those are the menu entries: # grub2-once --list 0 openSUSE 1 Advanced options for openSUSE>openSUSE, with Linux 3.16.7-7-desktop 2 Advanced options for openSUSE>openSUSE, with Linux 3.16.7-7-desktop (recovery mode) 3 Advanced options for openSUSE>openSUSE, with Linux 3.16.6-2-desktop 4 Advanced options for openSUSE>openSUSE, with Linux 3.16.6-2-desktop (recovery mode) 5 openSUSE Memtest 6 Microsoft Windows XP Professional (on /dev/sda1) (I booted #3 here) Of course #3 and #5 do _not_ have the "noresume" option, but #2 and #4 have. The problem is this: if "SUSE_BTRFS_SNAPSHOT_BOOTING" is true (in /etc/default/grub) the following is created in the menu header: if [ -n "$extra_cmdline" ]; then submenu "Bootable snapshot #$snapshot_num" { menuentry "If OK, run 'snapper rollback $snapshot_num' and reboot." { true; } The hibernate scripts look for the string "menuentry " to identify menu entries, so this gets counted as entry#0 and the following real menu entries are off by one. If you are running the default kernel, there is not really a problem though, as entry#0 and entry#1 are actually the same (#1 is the default kernel entry inside the "Advanced Options" submenu). I think this is the reason why this has gone through unnoticed until now... ;-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=911243
Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=911243
Andrei Borzenkov
http://bugzilla.opensuse.org/show_bug.cgi?id=911243
Jiri Srain
http://bugzilla.opensuse.org/show_bug.cgi?id=911243
http://bugzilla.opensuse.org/show_bug.cgi?id=911243#c4
Wolfgang Bauer
participants (1)
-
bugzilla_noreply@novell.com