[kubic-bugs] [Bug 1167780] New: MicroOS images don't update grub if booted without EFI
http://bugzilla.suse.com/show_bug.cgi?id=1167780 Bug ID: 1167780 Summary: MicroOS images don't update grub if booted without EFI Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: MicroOS Assignee: fvogt@suse.com Reporter: fvogt@suse.com QA Contact: qa-bugs@suse.de CC: kubic-bugs@opensuse.org Found By: --- Blocker: --- The .qcow2 images are meant to work fine on systems with EFI (optionally secure boot) and without, so they have both i386-pc and x86_64-efi targets of grub2 installed by kiwi during image building. Kiwi sets LOADER_TYPE="grub2-efi" for this. When booting the image without EFI though, this is not changed by anything and so update-bootloader only manages the x86_64-efi target of grub2. As the grub.cfg file is in the same location, there aren't any immediate issues, but it means that grub is never updated in those deployments. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c1
Fabian Vogt
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c2
Steffen Winterfeldt
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c3
--- Comment #3 from Steffen Winterfeldt
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c4
--- Comment #4 from Fabian Vogt
In theory, making LOADER_TYPE a list would do what you want but that would break basically all tooling we have around that setting.
I see no huge obstacle adding an option or environment var to pbl that specifies the bootlaoder to update, if that helps.
Ideally this would work automatically, so no special code just for those images would have to be added. If "update-bootloader" is run on an EFI system it would install grub2-efi, otherwise grub2. Not sure how that would work with YaST, maybe a new option "grub2-auto"? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c5
--- Comment #5 from Steffen Winterfeldt
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c6
--- Comment #6 from Steffen Winterfeldt
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c7
--- Comment #7 from Steffen Winterfeldt
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c8
--- Comment #8 from Fabian Vogt
Anyway, it's a question about how big you want the changes to get.
Autodetection with LOADER_TYPE=auto (or whatever) needs to be synced with a number of people. As it is now I would guess quite some people have both bootloaders installed while using only one of them. So autodetection might imply some surprises.
At least "grub2-auto" (not full "auto") would just select between i386-pc and efi depending on how the system is currently booted. Neither installing i386-pc on an EFI system nor installing x86_64-efi on a legacy system would have the desired result without manual work in addition anyway, so I can't imagine a case where this would be a step backwards.
Adding some switch to plb would be more limited.
Yes, but also wouldn't work OOTB as those would have to be added to every caller of update-bootloader IIUC. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c9
--- Comment #9 from Steffen Winterfeldt
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c10
--- Comment #10 from Steffen Winterfeldt
http://bugzilla.suse.com/show_bug.cgi?id=1167780
http://bugzilla.suse.com/show_bug.cgi?id=1167780#c12
--- Comment #12 from Fabian Vogt
But if you want a specialized solution just for microos and are sure no-one else will look at LOADER_TYPE: supporting grub2-auto on the pbl side just means adding scripts in /usr/lib/bootloader/grub2-auto that delegate to their grub2 resp grub2-efi counterpart.
Then I'd just use the jeos-firstboot snippet to set it based on the type of the first boot. Otherwise I'd have to maintain a pbl script forever, just for MicroOS. It's also possible that someone installs yast on microos, so I can't even be sure that LOADER_TYPE isn't read by anything else. (In reply to Neil Rickert from comment #11)
Just a note on this.
I have Tumbleweed installed on an external USB drive, for booting with either MBR/BIOS booting or UEFI booting. Installing that way works (the install succeeds) even if the installer is booted with UEFI.
This would be a use case for having both targets installed, but with one important difference: "--removable". If efivarfs is available, "grub2-efi" with SECURE_BOOT=yes would not install into /EFI/BOOT but /EFI/opensuse and create a boot entry for it. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1167780
https://bugzilla.suse.com/show_bug.cgi?id=1167780#c14
Fabian Vogt
Have folks landed on this? If so, should we document/close?
Nope, no progress here. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1167780
https://bugzilla.suse.com/show_bug.cgi?id=1167780#c15
--- Comment #15 from Steffen Winterfeldt
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com