[Bug 789060] New: [PATCH] perl-Bootloader: unify grub2 and grub2-efi handling
https://bugzilla.novell.com/show_bug.cgi?id=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c0 Summary: [PATCH] perl-Bootloader: unify grub2 and grub2-efi handling Classification: openSUSE Product: openSUSE Factory Version: 12.3 Milestone 1 Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: arvidjaar@gmail.com QAContact: jsrain@suse.com Found By: --- Blocker: --- Created an attachment (id=512713) --> (http://bugzilla.novell.com/attachment.cgi?id=512713) Patch to remove grub2-efi-* artefacts from perl-Bootloader User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0 Per bnc#782891 remove all references to grub2-efi-* files and use explicit target platform in grub2-install calls. For GRUB2 it currently hardcodes i386-pc; is perl-Bootloader supported on other platforms besides x86? If yes, which? Tested by switching with YaST2 between grub2 and grub2-efi. Example from logs: 2012-11-09 21:46:04 <1> yast-8472.1 Core::GRUB2::new.344: Created GRUB2 instance for target i386-pc 2012-11-09 21:46:09 <1> yast-8472.1 Core::RunCommand.1661: run /usr/sbin/grub2-install --target=i386-pc --force --skip-fs-probe "(hd0)"
/var/log/YaST2/y2log_bootloader 2>&1 - ret 0 + output: /usr/sbin/grub2-bios-setup: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible. 2012-11-09 21:48:11 <1> yast-5595.1 Core::GRUB2::new.344: Created GRUB2 instance for target i386-pc 2012-11-09 21:48:23 <1> yast-5595.1 Core::GRUB2EFI::new.127: Created GRUB2EFI instance for target x86_64-efi 2012-11-09 21:48:27 <1> yast-5595.1 Core::RunCommand.1661: run /usr/sbin/grub2-install --target=x86_64-efi >/var/log/YaST2/y2log_bootloader 2>&1 - ret 0 + output: BootCurrent: 0004
Patch against github master attached. If agreed, will submit pull request. 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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jsrain@suse.com |snwint@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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c1 Steffen Winterfeldt <snwint@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |mchang@suse.com --- Comment #1 from Steffen Winterfeldt <snwint@suse.com> 2012-11-12 10:12:25 CET --- Michael, is the patch ok for 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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c2 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mchang@suse.com --- Comment #2 from Michael Chang <mchang@suse.com> 2012-11-12 11:48:14 UTC --- (In reply to comment #1)
Michael, is the patch ok for you?
I'm ok. It looks good. Thank you Steffen and Andrey. :) Btw .. I think bnc#789172 could be fixed by this patch. Let's see how the reporter replied. -- 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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c3 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- InfoProvider|mchang@suse.com |arvidjaar@gmail.com --- Comment #3 from Michael Chang <mchang@suse.com> 2012-11-12 12:19:23 UTC --- Hi Andrey and Steffen, Sorry, I found one suspicious problem. + my ($sysname, $nodename, $release, $version, $machine) = POSIX::uname(); + my $target = "$machine-efi"; + $loader->{'target'} = $target; Could it possible to use --hardware-platform rather than --machine? The grub2-install script would fail in, for ex, i686-efi as target. 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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c4 --- Comment #4 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-11-12 12:27:35 UTC --- (In reply to comment #3)
+ my ($sysname, $nodename, $release, $version, $machine) = POSIX::uname(); + my $target = "$machine-efi"; + $loader->{'target'} = $target;
Could it possible to use --hardware-platform rather than --machine? The grub2-install script would fail in, for ex, i686-efi as target.
Ah, right. Hmm ... I intended to avoid calling external uname. I think I just forgot to map i.86 => i386. Would it be OK? -- 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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c Andrey Borzenkov <arvidjaar@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|arvidjaar@gmail.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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c5 Andrey Borzenkov <arvidjaar@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #512713|0 |1 is obsolete| | --- Comment #5 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-11-12 16:09:06 UTC --- Created an attachment (id=512810) --> (http://bugzilla.novell.com/attachment.cgi?id=512810) Patch to remove grub2-efi-* artefacts from perl-Bootloader (In reply to comment #4)
(In reply to comment #3)
Ah, right. Hmm ... I intended to avoid calling external uname. I think I just forgot to map i.86 => i386. Would it be OK?
Updated patch attached. I still prefer to avoid calling "uname -i" and rather follow what grub-install does. This way we are sure that we do the same. -- 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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c6 --- Comment #6 from Michael Chang <mchang@suse.com> 2012-11-13 05:29:36 UTC --- Hi Steffen, The new patch looks good to me. Would you have any other comments? 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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c7 --- Comment #7 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-11-14 17:36:20 UTC --- OK, no comments is good :) https://github.com/openSUSE/perl-bootloader/pull/11 -- 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=789060 https://bugzilla.novell.com/show_bug.cgi?id=789060#c Ihno Krumreich <ihno@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Other |Linux -- 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