[Bug 782891] New: Unify grub2 and grub2-efi package
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c0 Summary: Unify grub2 and grub2-efi package Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: Other OS/Version: openSUSE 12.2 Status: NEW Severity: Enhancement Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: arvidjaar@gmail.com QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1 Current split between grub2 and grub2-efi is confusing. Configuration files appear in different directories (/boot/grub2 and /boot/grub2-efi), moreover, they are split between both for grub2-efi. Command names are rather unexpected - if grub2 prefix is more or less known, grub2-efi comes as surprise. Separate prefix for grub2 and grub2-efi is really nor needed and more. Grub2 fully supports multi-architecture setup, and grub-install does the right thing by default. Actually, I do not think that separating grub2 and grub2-efi is required at all today. So suggestion is to merge them in single grub2 package. Or - if there are reasons not to - at least build grub2-efi with the same prefix as grub2. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jsrain@suse.com |mchang@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c1 --- Comment #1 from Michael Chang <mchang@suse.com> 2012-10-15 04:15:51 UTC --- Andrey, You're right. The tricky part is that we have many tools which manipulates grub2 settings with hard coded name (grub2-efi ..). They have to be sorted out in case they would break in the new package. Afaics, the tools affected are wildly spread perl-bootloader , pm-utils, kiwi and other probably tools for configuring xen host And this implies YaST shouldn't have loader type grub2-efi. It's overall a right direction to go but will take more effort than expected. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c2 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Enhancement |Critical --- Comment #2 from Michael Chang <mchang@suse.com> 2012-10-15 10:07:53 UTC --- This is critical really. We have to fix this one as soon as possible. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c3 --- Comment #3 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-10-20 09:22:56 UTC --- (In reply to comment #1)
Andrey,
You're right.
Please check out home:arvidjaar:bnc782891/grub2.devel_openSUSE_Factory. It builds grub2-efi with "grub2" transform. It still does not combine packages for two reasons - grub2-efi builds and installs \EFI\opensuse\grub.efi. What is it used for? It is created during build time so may not match user system at all and it is not referenced by anything after that. I really think it can be dropped. - grub2-efi pulls in egibootmgr. This probably is not needed on non-UEFI systems.
The tricky part is that we have many tools which manipulates grub2 settings with hard coded name (grub2-efi ..). They have to be sorted out in case they would break in the new package.
Afaics, the tools affected are wildly spread perl-bootloader , pm-utils, kiwi and other probably tools for configuring xen host
Package installs compatibility links for those commands used by perl-Bootloader and migrates configuration from /boot/grub2-efi into /boot/grub2 if current loader is grub2-efi. I have tested it for - update from previous version (migrating configuration) - update from updated version (just to make sure it does not do something funny) - switch from grub2-efi to elilo - switch from elilo back to grub2-efi Seems to work. I do not have possibility to test it in other environments.
And this implies YaST shouldn't have loader type grub2-efi.
It depends on whether you want to keep separate grub2-efi package. If yes, you need to know when perform bootloader refresh on update. Also UEFI is still sufficiently different so having is as separate loader type may prove useful. But that is something for YaST2 experts. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c4 --- Comment #4 from Michael Chang <mchang@suse.com> 2012-10-22 03:11:53 UTC --- (In reply to comment #3)
(In reply to comment #1)
Andrey,
You're right.
Please check out home:arvidjaar:bnc782891/grub2.devel_openSUSE_Factory. It builds grub2-efi with "grub2" transform. It still does not combine packages for two reasons
- grub2-efi builds and installs \EFI\opensuse\grub.efi. What is it used for? It is created during build time so may not match user system at all and it is not referenced by anything after that. I really think it can be dropped.
It can be dropped for now, but we'll need it in the future for the secure boot as module loading would have to be disabled. We'll thus have to use a monolithic image, compared to the one build and installed by grub2-install which is a basic minimum image and loads module by request or implicitly auto loaded by command. For now, it could only be useful for debugging, afaics, as with correct prefix and root environment set in rescue mode it could almost work to tackle any circumstance as most relevant modules are built-in and ready to go.
- grub2-efi pulls in egibootmgr. This probably is not needed on non-UEFI systems.
Yes. I think it's a good movement to make it only required by grub2-efi.
The tricky part is that we have many tools which manipulates grub2 settings with hard coded name (grub2-efi ..). They have to be sorted out in case they would break in the new package.
Afaics, the tools affected are wildly spread perl-bootloader , pm-utils, kiwi and other probably tools for configuring xen host
Package installs compatibility links for those commands used by perl-Bootloader and migrates configuration from /boot/grub2-efi into /boot/grub2 if current loader is grub2-efi. I have tested it for
- update from previous version (migrating configuration) - update from updated version (just to make sure it does not do something funny) - switch from grub2-efi to elilo - switch from elilo back to grub2-efi
Seems to work. I do not have possibility to test it in other environments.
I could help to test the media installation and other scenarios I could comprehend to have potential impact, please be patient and wait my result (I'll probably have to branch from yours and would SR for any new fixings)
And this implies YaST shouldn't have loader type grub2-efi.
It depends on whether you want to keep separate grub2-efi package. If yes, you need to know when perform bootloader refresh on update. Also UEFI is still sufficiently different so having is as separate loader type may prove useful. But that is something for YaST2 experts.
Yeah, you made very good point. The grub2-efi loader type should be kept, I made those comment is too quick and without much thinking. The only benefit we don't have a separate grub2-efi package is less or no code duplicate (in yast and perl bootloader) but the optimization have to be compromised with our current practice. JFYI. I've created a branch and working on this topic as well.. home:michael-chang:branches:devel:openSUSE:Factory grub2 But since you're moving faster than me and let's based on yours (I'll see if I could merge any thing from my change to yours) Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c5 --- Comment #5 from Michael Chang <mchang@suse.com> 2012-10-22 10:38:16 UTC --- I met a weird issue that the symbolic link grub2-efi -> grub2 created in %post somehow disappeared in my media installation testing which was using "driver update disk" to update new grub2 package. The process eventually failed in the creation of mkinitrd. No good idea why it would be missing. My guess is that because /boot/grub2-efi is not managed by new grub2-efi package which used to manage it. The created symlink get deleted in Step 5 in the regular package update process. 1 Run the %pre section of the RPM being installed. 2 Install the files that the RPM provides. 3 Run the %post section of the RPM. 4 Run the %preun of the old package. 5 Delete any old files not overwritten by the newer version. (This step deletes files that the new package does not require.) 6 Run the %postun hook of the old package. But if above true why it would only be found by media installation process ? :/ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c6 --- Comment #6 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-10-23 11:25:35 UTC --- (In reply to comment #5)
But if above true why it would only be found by media installation process ? :/
I think because at this point directories are still empty. What is even worse, it also removes fresh generated grub.cfg at this point :( Please try updated package. I added trigger to be run on grub2-efi uninstall so it is possible to test now. Updating will be a real challenge ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c7 --- Comment #7 from Michael Chang <mchang@suse.com> 2012-10-24 05:53:56 UTC --- (In reply to comment #6)
(In reply to comment #5)
But if above true why it would only be found by media installation process ? :/
I think because at this point directories are still empty. What is even worse, it also removes fresh generated grub.cfg at this point :(
Please try updated package. I added trigger to be run on grub2-efi uninstall so it is possible to test now.
Just tried and everything work fine. :) A quick question, why you choose to use %triggerpostun but not %postun? It seems to me that we are not monitoring "other" package as the package itself is what we interested (thus a hook should be suffice)?
Updating will be a real challenge ...
Indeed, it's not a minority mission as it seems, especially you have to wrestling with packaging stuff to get things done in order to providing compatibility kluges to work. Any subtle issue can be hard to be addressed. I think now is time to submit to factory to get full extent of testing. Please submit, Thanks. :) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c8 --- Comment #8 from Michael Chang <mchang@suse.com> 2012-10-24 06:02:19 UTC --- (In reply to comment #7)
(In reply to comment #6)
(In reply to comment #5)
But if above true why it would only be found by media installation process ? :/
I think because at this point directories are still empty. What is even worse, it also removes fresh generated grub.cfg at this point :(
Please try updated package. I added trigger to be run on grub2-efi uninstall so it is possible to test now.
Just tried and everything work fine. :)
A quick question, why you choose to use %triggerpostun but not %postun? It seems to me that we are not monitoring "other" package as the package itself is what we interested (thus a hook should be suffice)?
More specifically .. the question is %triggerpostun -- %{name}-efi vs %postun efi
Updating will be a real challenge ...
Indeed, it's not a minority mission as it seems, especially you have to wrestling with packaging stuff to get things done in order to providing compatibility kluges to work. Any subtle issue can be hard to be addressed.
I think now is time to submit to factory to get full extent of testing.
Please submit, Thanks. :)
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c9 --- Comment #9 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-10-24 15:56:53 UTC --- (In reply to comment #7)
A quick question, why you choose to use %triggerpostun but not %postun?
because %postun of *old* package does not know anything about it and we obviously cannot change it. And %postun of *new* package does not run when removing *old* package. (In reply to comment #8)
More specifically .. the question is
%triggerpostun -- %{name}-efi vs %postun efi
What happens on update is 1. new version of grub2-efi is installed 2. %post of *new* version runs and creates /boot/grub2-efi -> grub2 3. *old* version of grun2-efi is uninstalled. It removes /boot/grub2-efi/grub.cfg I could not add /boot/grub2-efi/grub.cfg to new version as ghost, it conflicts with /boot/grub2-efi being symlink. And the only way to add code that runs after removal of *old* package was trigger (and trigger on different package too, trigger on grub2-efi would not work :) )
Please submit
It needed some work, in particular, link was not created on new install or when bootloader was not grub2-efi (could happen e.g. for elilo). I updated it and appreciate if you could verify it once more. Thank you. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c10 --- Comment #10 from Michael Chang <mchang@suse.com> 2012-10-25 07:16:44 UTC --- (In reply to comment #9)
(In reply to comment #7)
A quick question, why you choose to use %triggerpostun but not %postun?
because %postun of *old* package does not know anything about it and we obviously cannot change it. And %postun of *new* package does not run when removing *old* package.
(In reply to comment #8)
More specifically .. the question is
%triggerpostun -- %{name}-efi vs %postun efi
What happens on update is
1. new version of grub2-efi is installed 2. %post of *new* version runs and creates /boot/grub2-efi -> grub2 3. *old* version of grun2-efi is uninstalled. It removes /boot/grub2-efi/grub.cfg
I could not add /boot/grub2-efi/grub.cfg to new version as ghost, it conflicts with /boot/grub2-efi being symlink. And the only way to add code that runs after removal of *old* package was trigger (and trigger on different package too, trigger on grub2-efi would not work :) )
Thanks for explanation, now I understand.
Please submit
It needed some work, in particular, link was not created on new install or when bootloader was not grub2-efi (could happen e.g. for elilo). I updated it and appreciate if you could verify it once more. Thank you.
I've tested your new package, still no problem found. This time is a new installation as you requested. My procedure. 1. New installation using elilo 2. When system boots, remove grub2 grub2-efi package 3. rm -rf /boot/grub2 and /boot/grub2-efi, make sure no left in the system 4. Install new grub2 grub2-efi downloaded from your repo 5. Run yast2 bootloader, select grub2-efi and install 6. Reboot, grub2-efi was used and booted with any problem Great, and really appreciate your hard work on this. :) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c11 --- Comment #11 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-10-25 17:16:02 UTC --- request 139330 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c12 --- Comment #12 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-10-26 06:00:10 CEST --- This is an autogenerated message for OBS integration: This bug (782891) was mentioned in https://build.opensuse.org/request/show/139364 Factory / grub2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c13 --- Comment #13 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-10-28 05:55:39 UTC --- grub2-efi now needs strict versioned requires on grub2. Request 139589. How to proceed further. Separate bug report on each product to remove grub2-efi paths? Is there any need in tracking bug or this one can be used as such? I will do for those I am aware of, but how to submit so it is accepted by maintainer? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c14 --- Comment #14 from Michael Chang <mchang@suse.com> 2012-10-29 08:56:09 UTC --- Maybe we decide a target release to remove these compatibility links and public the message in opensuse-factory. And notice them again when target release is about to release. Thus the track of it is on the mailing list. For those changes you're already aware of, I think the procedure is no difference you done to the grub2 package. Branch from the devel project and submit your patch. They could maintain their sources in github or somewhere but it's maintainer's duty to sync their sources with OBS packages. The packages will have to be checked in my mind. perl-Bootloader pm-utils (in the pm hook scripts (sleep.d)) grub2-branding-opensuse (probably in %post section) kiwi (not sure, need check maintainer is his on-going work has any support for installation media based grub2-efi and reference the old name) xen (not sure what's package has to check, better ask the maintainer but I'm sure they would check grub2 when setting xen hypervisor host) I can do the perl-Bootloader as I'm one of maintainer of it. :D It's up to you for the rest of the packages. Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c15 --- Comment #15 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-11-10 08:53:19 UTC --- (In reply to comment #14)
perl-Bootloader
bnc#789060, patch proposed
pm-utils (in the pm hook scripts (sleep.d)) bnc#788013, change upstream
grub2-branding-opensuse (probably in %post section) request 140800
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c16 --- Comment #16 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-11-14 14:29:52 CET --- This is an autogenerated message for OBS integration: This bug (782891) was mentioned in https://build.opensuse.org/request/show/140843 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c17 --- Comment #17 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-02-04 14:00:13 CET --- This is an autogenerated message for OBS integration: This bug (782891) was mentioned in https://build.opensuse.org/request/show/151094 Factory / pm-utils -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c18 --- Comment #18 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-04-12 16:00:23 CEST --- This is an autogenerated message for OBS integration: This bug (782891) was mentioned in https://build.opensuse.org/request/show/163752 Maintenance / -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c19 Benjamin Brunner <bbrunner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #19 from Benjamin Brunner <bbrunner@suse.com> 2013-04-22 16:53:04 CEST --- Update released for openSUSE 12.2. Resolved fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c20 --- Comment #20 from Swamp Workflow Management <swamp@suse.de> 2013-04-22 15:04:52 UTC --- openSUSE-RU-2013:0705-1: An update that has 7 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 633491,768867,782891,797966,806632,806635,806641 CVE References: Sources used: openSUSE 12.3 (src): pm-utils-1.4.1-26.5.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=782891 https://bugzilla.novell.com/show_bug.cgi?id=782891#c21 --- Comment #21 from Swamp Workflow Management <swamp@suse.de> 2013-05-02 08:05:06 UTC --- openSUSE-RU-2013:0733-1: An update that has 7 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 633491,768867,782891,797966,806632,806635,806641 CVE References: Sources used: openSUSE 12.2 (src): pm-utils-1.4.1-18.10.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com