[Bug 1022880] New: system-sleep/grub2.sleep fails to find the correct grub target
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880 Bug ID: 1022880 Summary: system-sleep/grub2.sleep fails to find the correct grub target Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: x86-64 OS: openSUSE 42.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: carlos.e.r@opensuse.org QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 712324 --> http://bugzilla.opensuse.org/attachment.cgi?id=712324&action=edit /boot/grub2/grub.cfg file I see this in the log while trying to hibernate, and a delay: <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - INFO: running /usr/lib/systemd/system-sleep/grub2.sleep for hibernate <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - INFO: Running prepare-grub .. <3.6> 2017-01-30 20:23:20 Telcontar systemd 1 - - Stopping Deferred execution scheduler... <3.6> 2017-01-30 20:23:20 Telcontar systemd 1 - - Stopped Deferred execution scheduler. <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - service: no such service upsd.service <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sda1) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sda1) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sda1) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because it has the noresume option <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sda1) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because it has the noresume option <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb2) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb2) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb2) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb2) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb7) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb7) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb7) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb7) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #, because its root= parameter (/dev/sdb7) <3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - does not match the current root device (/dev/sdb8). <3.4> 2017-01-30 20:23:25 Telcontar systemd-sleep 10697 - - /usr/lib/systemd/system-sleep/grub2.sleep failed with error code 2. <3.6> 2017-01-30 20:23:25 Telcontar systemd-sleep 10692 - - Suspending system... <0.6> 2017-01-31 12:04:55 Telcontar kernel - - - [158874.187341] PM: Syncing filesystems ... done. Then, on come back, I see the boot menu of grub waiting for a boot selection. Fortunately it is the default one and boot proceeds after some seconds correctly, and hibernation image is found. It is true that the string "/dev/sdb8" is not found on /boot/grub2/grub.cfg. It is an UUID: linux /vmlinuz-4.4.36-8-default root=UUID=c6a59497-85b9-454c-a5d1-1dcafa6eed3d splash=verbose loglevel=3 console=tty0 vga=0x31a resume=/dev/disk/by-label/Swap_0 splash=verbose showopts cer@Telcontar:~> l /dev/disk/by-uuid/c6a59497-85b9-454c-a5d1-1dcafa6eed3d lrwxrwxrwx 1 root root 10 Jan 27 13:47 /dev/disk/by-uuid/c6a59497-85b9-454c-a5d1-1dcafa6eed3d -> ../../sdb8 cer@Telcontar:~> -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
Carlos Robinson
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c1
Andrei Borzenkov
<3.6> 2017-01-30 20:23:20 Telcontar systemd-sleep 10692 - - Skipping grub entry #,
Indeed, ${J} in script is not defined anywhere. I suppose it actually meant ${I} which is current menu number. ...
cer@Telcontar:~> l /dev/disk/by-uuid/c6a59497-85b9-454c-a5d1-1dcafa6eed3d lrwxrwxrwx 1 root root 10 Jan 27 13:47 /dev/disk/by-uuid/c6a59497-85b9-454c-a5d1-1dcafa6eed3d -> ../../sdb8 cer@Telcontar:~>
Please show "blkid -U c6a59497-85b9-454c-a5d1-1dcafa6eed3d", this is what script is using to resolve UUID. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c2
--- Comment #2 from Carlos Robinson
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c3
Michael Chang
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c4
Carlos Robinson
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c5
Michael Chang
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c6
--- Comment #6 from Andrei Borzenkov
Created attachment 712715 [details] grub2-systemd-sleep.sh
Note that it won't reset back "set +e" when it takes "continue" branch. Is it intentional? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c7
--- Comment #7 from Michael Chang
(In reply to Michael Chang from comment #5)
Note that it won't reset back "set +e" when it takes "continue" branch. Is it intentional?
No. It's a bug. Thank you for reminding this. I'll update later another version. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c8
--- Comment #8 from Michael Chang
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c9
Carlos Robinson
Created attachment 712715 [details] grub2-systemd-sleep.sh
Thanks a lot for your information. It became clear that the blkid return code aborted the execution prematurely but not skipping the offending entry and continue to process the rest of config file as what we would expect.
I see.
Would you please help to verify the attached script grub2-systemd-sleep.sh ? You could start by backup original grub2.sleep file
Sure. [...] Yes, I think this one worked. Messages log here: <3.6> 2017-02-03 19:10:00 Telcontar systemd 1 - - Reached target Sleep. <3.6> 2017-02-03 19:10:00 Telcontar systemd 1 - - Starting Hibernate... <0.7> 2017-02-03 19:10:00 Telcontar kernel - - - [324347.653997] PM: Hibernation mode set to 'platform' <3.6> 2017-02-03 19:10:00 Telcontar systemd-sleep 22332 - - INFO: running /usr/lib/systemd/system-sleep/grub2.sleep for hibernate <3.6> 2017-02-03 19:10:00 Telcontar systemd-sleep 22332 - - INFO: Running prepare-grub .. <3.6> 2017-02-03 19:10:00 Telcontar systemd-sleep 22332 - - service: no such service upsd.service <3.6> 2017-02-03 19:10:00 Telcontar systemd 1 - - Stopped Deferred execution scheduler. <3.6> 2017-02-03 19:10:00 Telcontar systemd-sleep 22332 - - 2017-02-03 19:10:00+01:00 - Hibernating the system now... <3.4> 2017-02-03 19:10:01 Telcontar systemd-sh - - - Hibernating the system now... <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.3 (x86_64) (on /dev/sda1), because its root= parameter (/dev/sda1) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.3 (on /dev/sda1), because its root= parameter (/dev/sda1) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.3, with Linux 3.7.10-1.16-desktop (on /dev/sda1), because its root= parameter (/dev/sda1) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.3, with Linux 3.7.10-1.16-desktop (recovery mode) (on /dev/sda1), because it has the noresume option <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.3, with Linux 3.7.10-1.11-desktop (on /dev/sda1), because its root= parameter (/dev/sda1) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.3, with Linux 3.7.10-1.11-desktop (recovery mode) (on /dev/sda1), because it has the noresume option <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 42.1 (x86_64) (on /dev/sdb2), because its root= parameter (/dev/sdb2) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE Leap 42.1 (on /dev/sdb2), because its root= parameter (/dev/sdb2) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE Leap 42.1, with Linux 4.1.36-41-default (on /dev/sdb2), because its root= parameter (/dev/sdb2) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE Leap 42.1, with Linux 4.1.27-24-default (on /dev/sdb2), because its root= parameter (/dev/sdb2) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.1 (x86_64) (on /dev/sdb7), because its root= parameter (/dev/sdb7) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.1 (x86_64) (on /dev/sdb7), because its root= parameter (/dev/sdb7) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.1 (x86_64) (on /dev/sdb7), because its root= parameter (/dev/sdb7) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.1 (x86_64) (on /dev/sdb7), because its root= parameter (/dev/sdb7) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 12.1 (x86_64) (on /dev/sdb7), because its root= parameter (/dev/sdb7) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 13.1 (x86_64) (on /dev/sdb9), because its root device 00eb9a40-d067-459e-a22f-1d3b667dddbb is not found <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 13.1 (on /dev/sdb9), because its root device 00eb9a40-d067-459e-a22f-1d3b667dddbb is not found <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 13.1, with Linux 3.11.10-21-desktop (on /dev/sdb9), because its root device 00eb9a40-d067-459e-a22f-1d3b667dddbb is not found <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 13.1, with Linux 3.11.10-21-desktop (recovery mode) (on /dev/sdb9), because it has the noresume option <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 13.1, with Linux 3.11.10-7-desktop (on /dev/sdb9), because its root device 00eb9a40-d067-459e-a22f-1d3b667dddbb is not found <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 13.1, with Linux 3.11.10-7-desktop (recovery mode) (on /dev/sdb9), because it has the noresume option <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping openSUSE 11.4 (x86_64) (on /dev/sdc5), because its root= parameter (/dev/disk/by-label/b_test1) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping Desktop -- openSUSE 11.4 - 2.6.37.6-0.5 (on /dev/sdc5), because its root= parameter (/dev/disk/by-label/b_test1) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping Failsafe -- openSUSE 11.4 - 2.6.37.6-0.5 (on /dev/sdc5), because it has the noresume option <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping Desktop -- openSUSE 11.4 - 2.6.37.1-1.2 (on /dev/sdc5), because its root= parameter (/dev/disk/by-label/b_test1) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - does not match the current root device (/dev/sdb8). <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - Skipping Failsafe -- openSUSE 11.4 - 2.6.37.1-1.2 (on /dev/sdc5), because it has the noresume option <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - running kernel is grub menu entry openSUSE Leap 42.2 (vmlinuz-4.4.36-8-default) <3.6> 2017-02-03 19:10:01 Telcontar systemd-sleep 22332 - - preparing boot-loader: selecting entry openSUSE Leap 42.2, kernel /boot/4.4.36-8-default <9.6> 2017-02-03 19:10:03 Telcontar CRON 22611 - - (wwwrun) CMD ( php /srv/www/cacti/poller.php > /dev/null 2>&1) <3.6> 2017-02-03 19:10:04 Telcontar systemd-sleep 22332 - - running /usr/sbin/grub2-once "openSUSE Leap 42.2" <3.6> 2017-02-03 19:10:05 Telcontar systemd-sleep 22332 - - time needed for sync: 3.0 seconds, time needed for grub: 0.7 seconds. <3.6> 2017-02-03 19:10:05 Telcontar systemd-sleep 22332 - - INFO: Done. <3.6> 2017-02-03 19:10:05 Telcontar systemd-sleep 22332 - - Suspending system... <0.6> 2017-02-03 19:11:17 Telcontar kernel - - - [324353.660865] PM: Syncing filesystems ... done. <0.6> 2017-02-03 19:11:17 Telcontar kernel - - - [324354.271120] Freezing user space processes ... (elapsed 0.002 seconds) done. It takes 0.7 seconds to run. I haven't looked at the script, but I wonder if that can be improved :-? Anyway, as now it does not wait on recover 8 seconds for grub menu, it runs faster. Thanks! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880
http://bugzilla.opensuse.org/show_bug.cgi?id=1022880#c10
Michael Chang
participants (1)
-
bugzilla_noreply@novell.com