[Bug 1018280] New: yast bootloader fails on AArch64 if grub2 not installed or grub.cfg unavailable
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280 Bug ID: 1018280 Summary: yast bootloader fails on AArch64 if grub2 not installed or grub.cfg unavailable Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: aarch64 OS: SUSE Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 Assignee: yast2-maintainers@suse.de Reporter: afaerber@suse.com QA Contact: jsrain@suse.com CC: agraf@suse.com, dmueller@suse.com, mbrugger@suse.com, yousaf.kaukab@suse.com Found By: --- Blocker: --- Observed: 1) Using a JeOS rootfs tarball with a TFTP-booted kernel on an AArch64 board results in a fatal error dialog, complaining about not being able to read /etc/default/grub. This can be worked around by installing grub2-arm64-efi. 2) After grub2 is installed it will show a fatal error dialog complaining that /boot/grub2/grub.cfg cannot be read. This can be worked around by grub2-mkconfig -o /boot/grub2/grub.cfg. 3) With grub2 installed and grub.cfg in place, it will start up normally. Expected: a) Absence of grub2 packages should be ignored. When selecting grub2 in the YaST UI install, the necessary packages should be installed, as done for others. b) If grub.cfg doesn't exist yet, it should be generated. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c2
--- Comment #2 from Andreas Färber
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c3
Andreas Färber
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c4
Josef Reidinger
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c5
--- Comment #5 from Josef Reidinger
Created attachment 708872 [details] y2logs for /etc/default/grub error
This is after:
zypper rm grub2 rm -rf /boot/grub2/ yast bootloader
in this case problem is that rm of grub2 removes also /etc/default/grub so result is that it failed during initialize of module. Is suitable for you if we report error and then allow user to prepose configuration from scratch, which will also install package back? I worry we do not have way how to restore configuration in such case. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c6
--- Comment #6 from Andreas Färber
(In reply to Andreas Färber from comment #2)
Created attachment 708872 [details] y2logs for /etc/default/grub error
This is after:
zypper rm grub2 rm -rf /boot/grub2/ yast bootloader
in this case problem is that rm of grub2 removes also /etc/default/grub so result is that it failed during initialize of module.
Please keep in mind that the above commands were just to reproduce the virgin system state. I did not originally run those commands.
Is suitable for you if we report error and then allow user to prepose configuration from scratch, which will also install package back? I worry we do not have way how to restore configuration in such case.
Actually I would've expected that absence of GRUB packges would lead to YaST selecting "Not Managed" as Boot Loader option. Then, if the user actively selects "GRUB2 for EFI" and saves with "OK", the same way it installs kexec-tools it could just install the necessary grub2-* packages. Observed is that absence of /etc/sysconfig/bootloader leads to a default of "GRUB2 for EFI", which may in turn cause this module initialization problem. But yes, if the file is not there I expect YaST to (silently) handle this by choosing appropriate defaults that the user can then tweak before saving to disk. Again, if the file never existed, there is no way to restore anything anyway. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c7
--- Comment #7 from Andreas Färber
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c8
Josef Reidinger
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c9
--- Comment #9 from Alexander Graf
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c10
--- Comment #10 from Andreas Färber
We could also add a dummy /etc/sysconfig/bootloader inside the JeOS-rootfs target that sets it to "no bootloader". That way the image we generate would end up consistently.
Sounds like a plan: zypper rm grub2 rm -rf /boot/grub2/ # edit /etc/sysconfig/bootloader to have LOADER_TYPE="none" yast bootloader However, in that case manually selecting "GRUB2 for EFI" and then switching to the "Bootloader Options" tab leads to an error for /usr/bin/grub2-editenv. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c11
--- Comment #11 from Andreas Färber
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c12
Josef Reidinger
We could also add a dummy /etc/sysconfig/bootloader inside the JeOS-rootfs target that sets it to "no bootloader". That way the image we generate would end up consistently.
I would prefer not to change the default configuration for a non-existent entry to "no bootloader" since IIUC that default may get used during installation - and there we basically always want to have grub2-efi.
sounds good for me (In reply to Andreas Färber from comment #10)
(In reply to Alexander Graf from comment #9)
We could also add a dummy /etc/sysconfig/bootloader inside the JeOS-rootfs target that sets it to "no bootloader". That way the image we generate would end up consistently.
Sounds like a plan:
zypper rm grub2 rm -rf /boot/grub2/ # edit /etc/sysconfig/bootloader to have LOADER_TYPE="none" yast bootloader
However, in that case manually selecting "GRUB2 for EFI" and then switching to the "Bootloader Options" tab leads to an error for /usr/bin/grub2-editenv.
yeah, that is real bug, I will fix it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c13
--- Comment #13 from Josef Reidinger
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c14
--- Comment #14 from Andreas Färber
However, in that case manually selecting "GRUB2 for EFI" and then switching to the "Bootloader Options" tab leads to an error for /usr/bin/grub2-editenv.
... but if I just select OK after the selection, it installs grub2-arm64-efi as expected and after a while finishes fine. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280
http://bugzilla.opensuse.org/show_bug.cgi?id=1018280#c15
Josef Reidinger
participants (1)
-
bugzilla_noreply@novell.com