[Bug 963610] New: systemd-sleep-grub may fail to call grub2-once because of comments in /etc/sysconfig/bootloader
http://bugzilla.opensuse.org/show_bug.cgi?id=963610 Bug ID: 963610 Summary: systemd-sleep-grub may fail to call grub2-once because of comments in /etc/sysconfig/bootloader Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.1 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader Assignee: jsrain@suse.com Reporter: bjoernv@arcor.de QA Contact: jsrain@suse.com Found By: --- Blocker: --- If /etc/sysconfig/bootloader contains a commented line for LOADER_TYPE like ## Path: System/Bootloader ## Description: Bootloader configuration ## Type: list(grub,grub2,grub2-efi,none) ## Default: grub2 # # Type of bootloader in use. # For making the change effect run bootloader configuration tool # and configure newly selected bootloader # # #LOADER_TYPE="grub2-efi" LOADER_TYPE="grub2" then "systemctl hibernate" does not call "grub2-once". As a result hibernate does not work correctly if the running kernel is not the default kernel. grub2-once normally handles this. The problem can be found in 13.2 and Leap 42.1, but not in Tumbleweed. Here is the failing shell script: /usr/bin/systemd-sleep-grub: [...] prepare-parameters() { eval `grep LOADER_TYPE= /etc/sysconfig/bootloader` if [ x"$LOADER_TYPE" = "xgrub2" -o x"$LOADER_TYPE" = "xgrub2-efi" ]; then GRUBONCE="/usr/sbin/grub2-once" [...] -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=963610
http://bugzilla.opensuse.org/show_bug.cgi?id=963610#c2
Andrei Borzenkov
If /etc/sysconfig/bootloader contains a commented line for LOADER_TYPE ... then "systemctl hibernate" does not call "grub2-once".
Which is correct. If we do not know what bootloader is used we should not attempt to configure random bootloader. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=963610
Thomas Blume
http://bugzilla.opensuse.org/show_bug.cgi?id=963610
Franck Bui
http://bugzilla.opensuse.org/show_bug.cgi?id=963610
http://bugzilla.opensuse.org/show_bug.cgi?id=963610#c3
Thomas Blume
http://bugzilla.opensuse.org/show_bug.cgi?id=963610
http://bugzilla.opensuse.org/show_bug.cgi?id=963610#c4
Björn Voigt
I've build some testpackages with a proposed fix at:
http://download.opensuse.org/repositories/home:/tsaupe:/branches:/openSUSE:/ Leap:/42.1:/Update:/boo963610-systemd/standard/
Can you please test and report wheter the issue is fixed therwith?
I tested this. It doesn't work alone. The function prepare-parameters in /usr/bin/systemd-sleep-grub alone now works for the given example with the comment line. Personally I would prefer . /etc/sysconfig/bootloader over eval `grep ^LOADER_TYPE= /etc/sysconfig/bootloader` because sourcing /etc/sysconfig/bootloader also works with spaces, e.g. #LOADER_TYPE="grub2-efi" LOADER_TYPE="grub2" But the other problem is, that grub2 has a problem too with the comment line. With #LOADER_TYPE="none" LOADER_TYPE="grub2-efi" in /etc/sysconfig/bootloader grub2-once does not work: # grub2-once --list no grub2_dir at /usr/sbin/grub2-once line 85. These lines in /usr/sbin/grub2-once need a patch too: [..] open(SYSCONF, "
http://bugzilla.opensuse.org/show_bug.cgi?id=963610
http://bugzilla.opensuse.org/show_bug.cgi?id=963610#c5
--- Comment #5 from Björn Voigt
participants (1)
-
bugzilla_noreply@novell.com