[Bug 822770] New: Install of grub2-efi failed
https://bugzilla.novell.com/show_bug.cgi?id=822770 https://bugzilla.novell.com/show_bug.cgi?id=822770#c0 Summary: Install of grub2-efi failed Classification: openSUSE Product: openSUSE Factory Version: 13.1 Milestone 0 Platform: x86-64 OS/Version: SUSE Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: nrickert@ameritech.net QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0 During the initial install, an error window popped up during boot install. It indicated a failure of "mkinitrd". However, "initrd" appears to have been correctly built. I believe it to be a grub2-efi install failure. I managed to get into the system (booting with the grub menu from a 12.3 system). I attempted to reinstall grub2-efi again. There was a similar popup window indicating a grub2-efi install failure. I tried several times, each with the same result. The initial install problem might be related to Bug 812266 comment 6. At least some of my attempts were after fixing that problem, disabling secure boot, and making sure that there would be no nvram conflicts. I'll note that all of the relevant files were installed in "/boot/efi/EFI/opensuse_alt". The NVRAM entry was not installed (probably the cause of the error), and "/boot/grub2/grub.cfg" was not built. I ran "grub2-mkconfig" to correct that latter problem. Shortly after the failure (before booting into the system), I booted the install DVD in rescue mode. I attempted to force-add an NVRAM entry with "efibootmgr -c". There was no error message, but "efibootmgr -v" done immediately afterward showed that no entry had been added. I'm not sure whether that is related. I was able to force-add an entry by booting the 12.3 rescue live CD, and using "efibootmgr -c" from there. Here are a few lines extracted from "y2log": 2013-06-01 17:49:26 <1> nwr8.cs.niu.edu(2407) [pbl] yast-0930.1 Core::UpdateBoot loader.1603: rename /etc/default/grub.new -> /etc/default/grub 2013-06-01 17:49:26 <1> nwr8.cs.niu.edu(2407) [pbl] yast-0930.1 Core::RunCommand .1641: run /usr/sbin/shim-install --config-file=/boot/grub2/grub.cfg
/var/log/Y aST2/y2log_bootloader 2>&1 - ret 256 + output: 2013-06-01 17:49:26 <3> nwr8.cs.niu.edu(2407) [pbl] yast-0930.1 Core::RunCommand.1642: Error: Command '/usr/sbin/shim-install --config-file=/boot/grub2/grub.cfg >/var/log/YaST2/y2log_bootloader 2>&1' failed with code 256 and output: 2013-06-01 17:49:26 <1> nwr8.cs.niu.edu(2407) [YCP] bootloader/routines/lib_iface.ycp:281 return value from updateBootloader: false
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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c1
Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c2
Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c3
--- Comment #3 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c4
Andrey Borzenkov
/var/log/YaST2/y2log_bootloader 2>&1 - ret 256 + output:
Could you test whether shim-install called manually works? -- 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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c5
Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c6
--- Comment #6 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c7
--- Comment #7 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c8
--- Comment #8 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c9
--- Comment #9 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c10
Andrey Borzenkov
I take that back.
The shim-install did not work. It silently failed.
If it had worked, there should have been an entry there for "opensuse_alt-secureboot" and there isn't.
What is shim-install exit code in this case (echo $? immediately after running shim-install)? Could you manually run efibootmgr -c -d /dev/sda -p 1 -w -L opensuse_alt-secureboot -l '\EFI\opensuse_alt\shim.efi' echo $? Does it fail to add menu entry as well? If it fails - could you run strace -f -o /tmp/efibootmgr.log efibootmgr -c -d /dev/sda -p 1 -w -L opensuse_alt-secureboot -l '\EFI\opensuse_alt\shim.efi' and attach here /tmp/efibootmgr.log? I wonder if your firmware places restriction on modifying some of environment variables in secure boot mode ... you are running with secure boot enabled, right? -- 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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c11
--- Comment #11 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c12
Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c13
--- Comment #13 from Andrey Borzenkov
Created an attachment (id=542221) --> (http://bugzilla.novell.com/attachment.cgi?id=542221) [details] requested strace output
open("/sys/firmware/efi/vars/new_var", O_WRONLY) = 3 write(3, "B\0o\0o\0t\0000\0000\0000\0003\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2084) = -1 ENOSPC (No space left on device)
As expected, the command fails.
I then reran the same command on the same box, while running 12.3. And that worked just fine. If you want a transcript of that, I can attach.
If the same command works on the same system under different kernel version it becomes kernel issue and has to be reassigned to it. OTOH in installation logs we have seen that grub2-install apparently worked and immediately following shim-install failed. Both use the same efibootmgr with the only difference that grub2-install should point to \EFI\opensuse_alt\grubx64.efi. Does it fail too? I.e. efibootmgr -c -d /dev/sda -p 1 -w -L opensuse_alt-secureboot -l '\EFI\opensuse_alt\shim.efi' Also you somewhere else suggested that your firmware allows only one boot entry per hard disk. Could you remove existing boot entries on this ESP and retry? I'm not sure how many do you have, but at least Windows and openSUSE ones point to different partitions. -- 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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c14
--- Comment #14 from Andrey Borzenkov
Does it fail too? I.e.
efibootmgr -c -d /dev/sda -p 1 -w -L opensuse_alt-secureboot -l '\EFI\opensuse_alt\shim.efi'
\EFI\opensuse_alt\grubx64.efi' of course -- 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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c15
--- Comment #15 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c16
--- Comment #16 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c17
Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c18
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c19
--- Comment #19 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c20
--- Comment #20 from Neil Rickert
Related to https://bugzilla.novell.com/show_bug.cgi?id=815170 ?
Yes, it is very likely to be related. I notice in 815170#c12 that shim.efi will be copied to /EFI/Boot/bootx64.efi I am not sure that works. After my failed install of 13.1M1, the BIOS boot menu included an item to boot my second hard drive, where I had manually done that copy. And that did not work. When shim.efi is copied there, how does it know where the rest of the files are? Or should the entire directory be copied? While I am off-topic, grub.cfg somewhere uses "set root='hd1,gpt4' to reference the second drive. My tests show that should be 'hd2,gpt4'. Apparently the BIOS device numbering puts the DVD before the second hard drive. (Not a big deal, since the uuid check overrides 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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c21
--- Comment #21 from Neil Rickert
- before you do it, could you please test updated efibootmgr
I changed the "add" to "ar" (zypper did not like "add") However, when I try to refresh, it says that the URI is invalid. Can you recheck. -- 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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c22
--- Comment #22 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c23
--- Comment #23 from Andrey Borzenkov
However, when I try to refresh, it says that the URI is invalid. Can you recheck.
Sorry, my fault. zypper ar obs://home:arvidjaar:branches:Base:System/openSUSE_Factory efibootmgr -- 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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c24
--- Comment #24 from Andrey Borzenkov
I am not sure that works. After my failed install of 13.1M1, the BIOS boot menu included an item to boot my second hard drive, where I had manually done that copy. And that did not work. When shim.efi is copied there, how does it know where the rest of the files are? Or should the entire directory be copied?
Yes. EFI provides interface to find out from where program was loaded. So all files related to shim must be in the same location. -- 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=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c25
Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c26
--- Comment #26 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c27
--- Comment #27 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c28
dale ritchey
https://bugzilla.novell.com/show_bug.cgi?id=822770
https://bugzilla.novell.com/show_bug.cgi?id=822770#c29
--- Comment #29 from Andrey Borzenkov
i got this error with secure boot
umount: /sys: umount failed: No such file or directory Perl-Bootloader: 2013-06-20 10:21:40 <3> pbl-6646.2 FileIO::ReadFile.85: Error: Failed to open /proc/misc: No such file or directory Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/vendor_perl/5.16.2/Bootloader/Tools.pm line 431. There was an error generating the initrd (2)
That's entirely different problem. Please open separate bug report if it persists. -- 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