[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
https://bugzilla.novell.com/show_bug.cgi?id=789060
https://bugzilla.novell.com/show_bug.cgi?id=789060#c1
Steffen Winterfeldt
https://bugzilla.novell.com/show_bug.cgi?id=789060
https://bugzilla.novell.com/show_bug.cgi?id=789060#c2
Michael Chang
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
https://bugzilla.novell.com/show_bug.cgi?id=789060
https://bugzilla.novell.com/show_bug.cgi?id=789060#c4
--- Comment #4 from Andrey Borzenkov
+ 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
https://bugzilla.novell.com/show_bug.cgi?id=789060
https://bugzilla.novell.com/show_bug.cgi?id=789060#c5
Andrey Borzenkov
(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
https://bugzilla.novell.com/show_bug.cgi?id=789060
https://bugzilla.novell.com/show_bug.cgi?id=789060#c7
--- Comment #7 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=789060
https://bugzilla.novell.com/show_bug.cgi?id=789060#c
Ihno Krumreich
participants (1)
-
bugzilla_noreply@novell.com