Bug 863409

Summary: EFI No Longer Boots; Yast Bootloader Apparently Has No Effect
Product: [openSUSE] openSUSE 13.1 Reporter: andrew cooke <andrew>
Component: YaST2Assignee: Michael Chang <mchang>
Status: RESOLVED WONTFIX QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: gs, snwint
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 13.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2log (latest log)
all yast logs
bootloader log from last week (last patch applied?)

Description andrew cooke 2014-02-12 01:00:14 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0

I installed OpenSuse 13.1 on an ASUS 1015e (which has EFI) soon after release.  Everything worked fine, and I could reboot the computer.

I updated the system regularly, and then turned it off last week, to go on holiday (so the system was update to around Feb 6 2014).  When I tried to turn it on in my hotel room, it simply entered the BIOS config pages.

As far as I can tell, the BIOS thinks that there is no EFI bootloader or whatever it is called.

If I boot up a rescue system from DVD I can see everything.  If I chroot into the existing system everything looks OK.  In particular

  efibootmgr -v

displays what looks like a good entry.

However, if I try to re-run Yast and re-install the bootloader it seems to do nothing.  This may be the same as issue https://bugzilla.novell.com/show_bug.cgi?id=862015 or https://bugzilla.novell.com/show_bug.cgi?id=857451

I don't really know what to do next.  I can reboot into the rescue chroot and follow instructions, if anyone can provide any.

FWIW, /dev/sda1 is /boot/efi, /dev/sda2 is swap, and /dev/sda3 is /

Reproducible: Always

Steps to Reproduce:
1. Turn on my laptop
2.
3.
Actual Results:  
Get the BIOS config screens

Expected Results:  
Get the GRUB menu
Comment 1 andrew cooke 2014-02-12 01:02:06 UTC
I forgot to add that my best guess is that the Yast bootloader is broken, and the system updated a kernel, and the bootloader wasn't written.  Perhaps?  Something vaguely like that?  So perhaps if I re-install by hand in the rescue chroot things will work again?
Comment 2 Gabriele Mohr 2014-02-12 09:36:39 UTC
Please attach YaST log files showing the re-install of the boot loader and the last update (how to get complete logs see http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
Comment 3 andrew cooke 2014-02-12 12:09:05 UTC
Hi.  Thanks for the fast response.  I'm in the rescue chroot now, and the yast log seems to indicate that there should be an "install bootloader" option.  I don't see that in Yast.  All I see is:

 - a progress menu on selectig the bootloader screen (using curses yast)

 - a screen with title "bootloader settings" and a single section "bootloader installation" that has a "type" box and a "secure boot" box.  At the bottom of the screen are "help", "cancel" and "ok" buttons.  The "type" is "grub2-efi" and I can go into another screen for "boot loader options", but I never see an "install" button.

Anyway, I a copying various log files to USB and will post them here:

  - y2log seems to be the log file.

  - y2log_bootloader is dated 6 Feb which would probably be the last update I applied.

  - ylog-kRUsMf.tar.gz was created by save_y2logs
Comment 4 andrew cooke 2014-02-12 12:23:44 UTC
Created attachment 578237 [details]
y2log (latest log)
Comment 5 andrew cooke 2014-02-12 12:32:37 UTC
Created attachment 578239 [details]
all yast logs
Comment 6 andrew cooke 2014-02-12 16:49:28 UTC
Created attachment 578297 [details]
bootloader log from last week (last patch applied?)
Comment 7 andrew cooke 2014-02-14 23:18:59 UTC
Could someone give me an idea of whether or not this is likely to be looked at soon?

I don't know whether to try fixing and/or reinstalling something, or whether I should keep it around for more tests.

Thanks!
Comment 8 andrew cooke 2014-02-15 13:52:12 UTC
I had another look at the output from efibootmgr -v and decided it was missing anything related to grub.  So I ran efibootmgr -c with what seemed like the correct parameters, and that added a new entry visible from the BIOS (before, in the BIOS, there were no boot options listed).

However, it still fails to boot.
Comment 9 Michael Chang 2014-02-17 08:56:38 UTC
Is it helpful running "update-bootloader --reinit" ?
Comment 10 andrew cooke 2014-02-17 16:57:40 UTC
if i boot into rescue mode (from a cd) and then start chroot following instructions at http://johnlange.wordpress.com/2009/09/22/suse-broken-dont-fear-the-chroot/ (but mounting correctly for /boot/efi) then i get (retyping, so possible typos):

> update-bootloader --reinit
Perl-Bootloader 2014-02-17 13:46:43 <3> Core::RunCommand.1642: Error: Command '/usr/bin/grub2-install --target=x86_64-efi > /var/log/Yast2/y2log_bootloader 2>&1' failed with code 256 and output: Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.
[...]

> modprobe efivars
Fatal: Could not load /lib/modules/3.11.6-4-default/modules.dep: No such file or directory

> ls /lib/modules
3.11.10-7-desktop 3.11.6-4-desktop

> cd /lib/modules

> ln -s [desktop to default]

> cd /

> modprobe efivars

> update-bootloader --reinint
[same error as before]

> cd /lib/modules

> rm [soft link]

Note that I did mount --bind proc, sys and dev for the chroot.

Hope that helps; thanks for the reply.
Comment 11 Michael Chang 2014-02-18 06:46:31 UTC
Hi Andrew,

modprobe efivars in chrooted / won't work as long as the running kernel from rescue system mismatches with the chrooted one.

Try modprobe efivars before chroot ?
Comment 12 andrew cooke 2014-02-19 18:06:32 UTC
AWESOME!

ok, so that worked fine.  no errors and now i can boot the machine.

so i am happy, but it seems like there is still some kind of bug?  how did it get like that?  is there any more info you need from me?

thanks!!
Comment 13 Michael Chang 2014-02-21 03:34:59 UTC
(In reply to comment #1)
> I forgot to add that my best guess is that the Yast bootloader is broken, and
> the system updated a kernel, and the bootloader wasn't written.  Perhaps? 

It wouldn't be the case because it's perl bootloader, not yast2 which writes bootloader during package update. The update-bootloader is the utility by means of perl bootloader modules to update and install bootloader in command line and invoked during rpm package's scrip-lets (eg %post). 

But it looked fine here (update-bootloader --reinit).

> Something vaguely like that?  So perhaps if I re-install by hand in the rescue
> chroot things will work again?

While YaST2 bootloader did have some odd problems because it renews the bootloader config and reluctant to reinstall. In legacy bios this is a problem because bootloader location is changeable, but in UEFI it's a hard to say ... (well, probably distributor means same thing as location in legacy bios but it'
s not obvious anyway ..)

Actually force to reinstall bootloader in yast2 bootloader regardless what settings were done is not good implementation either. Most settings in yast2 bootloader doesn't require reinstall bootloader to be effective and as we know the fact that reinstall bootloader in UEFI would require to rewriting the nvram and would potential trigger some firmware/kernel bug if too frequently.
Comment 14 andrew cooke 2014-05-11 23:48:56 UTC
Hi, I don't know if this is any help, but I ran into this issue again and can describe in detail when it happens.

The issue above was with an ASUS 1015-DS03 (a "netbook-like" computer that comes with Ubuntu pre-installed).  I spilt coke on that and it died, so I bought a replacement, which is an ASUS 1015-DS02.  I am unsure why the newer(?) model has a smaller number (02 v 03) but it appears identical, except for the lid (matte instead of glossy).

So anyway, with the new ASUS 1015-DS02, I did a new install of openSuse 13.1 from the DVD (64 bit).  As far as I remember the only options I changed were language (US to UK), date/time, and deselecting the separate user partition.  The install went fine and the computer booted into KDE as expected.

I then updated all software.  First, yast updates and a reboot.  Then a complete update for hundreds of packages, including kernel.  Rebooting after that, I hit this problem.  And the steps above fix it.

So it seems that something in the updates (presumably the kernel) is messing up the UEFI bios thing.

The kernel is now 3.11.10-7.1
Comment 15 Michael Chang 2015-01-28 09:58:55 UTC
Hi andrew,

Please test latest factory or tumbleweed and reopen if the update problem still exist.

Thanks.