[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 <fvogt@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |snwint@suse.com Flags| |needinfo?(snwint@suse.com) --- Comment #1 from Fabian Vogt <fvogt@suse.com> --- @snwint: As perl-Bootloader maintainer, would it be possible to have some autodetection whether to update/install grub2/grub2-efi? If not, I'll try to refactor the snippet in jeos-firstboot which adjusts LOADER_TYPE on JeOS and shove it into a systemd firstboot service in a subpackage. -- 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#c2 Steffen Winterfeldt <snwint@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(snwint@suse.com) | --- Comment #2 from Steffen Winterfeldt <snwint@suse.com> --- 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. -- 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#c3 --- Comment #3 from Steffen Winterfeldt <snwint@suse.com> --- Or even a new LOADER_TYPES var in sysconfig that holds a list of loaders. -- 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#c4 --- Comment #4 from Fabian Vogt <fvogt@suse.com> --- (In reply to Steffen Winterfeldt from comment #2)
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 <snwint@suse.com> --- It's the long standing debate why there's a grub2-efi at all. -- 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#c6 --- Comment #6 from Steffen Winterfeldt <snwint@suse.com> --- 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. Adding some switch to plb would be more limited. -- 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#c7 --- Comment #7 from Steffen Winterfeldt <snwint@suse.com> --- Having three variants like grub2, grub2-legacy, grub2-efi might be more logical to begin with. grub2 would imply some autodetection and the other two are for enforcing something else. But as said, a lot of people will have some opinion here. -- 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#c8 --- Comment #8 from Fabian Vogt <fvogt@suse.com> --- (In reply to Steffen Winterfeldt from comment #6)
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 <snwint@suse.com> --- grub2-auto looks weird to me. In any case, to have a new LOADER_TYPE you'd have to get the involved parties together to have a chat. Going for grub2 (= auto) and, e.g. grub2-xxx with xxx = something related to those grub2 subpackage names looks more natural to me. -- 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#c10 --- Comment #10 from Steffen Winterfeldt <snwint@suse.com> --- 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. -- 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#c12 --- Comment #12 from Fabian Vogt <fvogt@suse.com> --- (In reply to Steffen Winterfeldt from comment #10)
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 <fvogt@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(fvogt@suse.com) | --- Comment #14 from Fabian Vogt <fvogt@suse.com> --- (In reply to Joed L from comment #13)
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 <snwint@suse.com> --- Looking at the original problem: you set up an image and boot it with a boot loader that does not match the stored type. And then want pbl to update the 'correct' boot config. 'correct' being the loader last used, assuming you never change your mind in the future. Wouldn't it be more straightforward to have a systemd service run the first time that adjusts the loader type (or maybe even always)? Or simply disallow legacy booting. BTW, aren't you aiming for systemd-boot for micro-os anyway in the future? -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com