installing or upgrading to Ubuntu 14.10 kills Boot Manager on ThinkPad W540

Bug #1387654 reported by graingert
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
EFI Boot Manager
New
Undecided
Unassigned
efibootmgr (Ubuntu)
Incomplete
Critical
Unassigned
Nominated for Utopic by Alberto Salvia Novella

Bug Description

When you install or upgrade to Ubuntu 14.10 on a Lenovo ThinkPad W540 after a reboot the machine prints:

Boot Manager recover from critical error. Some essential variables are absent or corrupted and Boot Manager has restored them from default configuration. Press Esc to continue or F1 to enter Setup.

Then restores to default configuration (eg only Windows boots)

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: ubuntu-release-upgrader-core 1:14.10.9
ProcVersionSignature: Ubuntu 3.16.0-23.31-generic 3.16.4
Uname: Linux 3.16.0-23-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CrashDB: ubuntu
CurrentDesktop: Unity
Date: Thu Oct 30 13:10:43 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-10-27 (3 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
Symptom: release-upgrade
UpgradeStatus: Upgraded to utopic on 2014-10-28 (2 days ago)
VarLogDistupgradeTermlog:

Revision history for this message
graingert (tagrain) wrote :
Revision history for this message
graingert (tagrain) wrote :

Please ignore the files attached by ubuntu-bug, I ran this on another system.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Emerson (chris-ulp) wrote :

I had exactly the same problem on my W540.

I think it's an efibootmgr issue: https://github.com/vathpela/efibootmgr/issues/7

I "fixed" it from a live CD by manually downgrading the efibootmgr package to 0.5.4-7ubuntu1 (ie the one from 14.04 that was previously working) and rerunning "grub-install /dev/sda", "grub-install --recheck /dev/sda" and "update-grub" from a chroot.

Revision history for this message
Chris Emerson (chris-ulp) wrote :

Looking at the efibootmgr commit log, I think this is probably fixed in v0.8 (but I haven't verified this).

Revision history for this message
graingert (tagrain) wrote : Re: [Bug 1387654] Re: installing or upgrading to Ubuntu 14.10 kills Boot Manager on ThinkPad W540

I might try pinning the package during an upgrade

Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Darcy Casselman (dscassel) wrote :

Had the same problem on a new Lenovo X140e. Tried to wipe Windows and install 14.10 and it refused to boot, giving this error.

Installed 14.04 without problem.

Revision history for this message
Mojmir Vinkler (mojmir-vinkler) wrote :

Same problem on Lenovo ThinkPad E540.

Chris, could you please explain in more detail how did you downgraded efibootmgr? I wasn't able to find that version 0.5.4-7ubuntu1.

Revision history for this message
graingert (tagrain) wrote :

I believe Chris installed the old version from 14.04 using a live cd and
chroot. I'm assuming you can pin that package on 14.04 then upgrade. Either
way this is a game breaking bug
On 30 Nov 2014 23:00, "Mojmir Vinkler" <email address hidden> wrote:

> Same problem on Lenovo ThinkPad E540.
>
> Chris, could you please explain in more detail how did you downgraded
> efibootmgr? I wasn't able to find that version 0.5.4-7ubuntu1.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1387654
>
> Title:
> installing or upgrading to Ubuntu 14.10 kills Boot Manager on ThinkPad
> W540
>
> Status in ubuntu-release-upgrader package in Ubuntu:
> Confirmed
>
> Bug description:
> When you install or upgrade to Ubuntu 14.10 on a Lenovo ThinkPad W540
> after a reboot the machine prints:
>
>
> Boot Manager recover from critical error. Some essential variables are
> absent or corrupted and Boot Manager has restored them from default
> configuration. Press Esc to continue or F1 to enter Setup.
>
> Then restores to default configuration (eg only Windows boots)
>
> ProblemType: Bug
> DistroRelease: Ubuntu 14.10
> Package: ubuntu-release-upgrader-core 1:14.10.9
> ProcVersionSignature: Ubuntu 3.16.0-23.31-generic 3.16.4
> Uname: Linux 3.16.0-23-generic x86_64
> NonfreeKernelModules: wl
> ApportVersion: 2.14.7-0ubuntu8
> Architecture: amd64
> CrashDB: ubuntu
> CurrentDesktop: Unity
> Date: Thu Oct 30 13:10:43 2014
> EcryptfsInUse: Yes
> InstallationDate: Installed on 2014-10-27 (3 days ago)
> InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64
> (20140722.2)
> PackageArchitecture: all
> SourcePackage: ubuntu-release-upgrader
> Symptom: release-upgrade
> UpgradeStatus: Upgraded to utopic on 2014-10-28 (2 days ago)
> VarLogDistupgradeTermlog:
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1387654/+subscriptions
>

Revision history for this message
Chris Emerson (chris-ulp) wrote :

That's right - I installed the older package from a 14.04 live DVD/chroot, and used "sudo aptitude hold efibootmgr" to stop it being updated to the broken version.

There may be simpler way of doing the live/chroot way, but I had to do a bunch of bind mounts into the mounted fs (eg for /dev, /proc, /boot, etc.) before chroot. If you're having problems I can try to recreate and write down all the steps (but it might take a few days for me to get around to it).

Revision history for this message
Julian Kalinowski (julakali) wrote :

Thanks for the workaround.
I was doing a fresh install and tried various settings to make ubuntu boot with uefi on a lenovo thinkpad T440s.
Installing the efibootmgr from 14.04 worked fine, you can get it here:
http://packages.ubuntu.com/de/trusty/amd64/efibootmgr/download

I use apt-get, so "sudo apt-mark hold efibootmgr" helped to avoid updates.

graingert (tagrain)
Changed in efibootmgr (Ubuntu):
status: New → Confirmed
Changed in efibootmgr (Ubuntu):
importance: Undecided → Critical
Revision history for this message
graingert (tagrain) wrote :

I can confirm that putting a hold on efibootmgr and upgrading works fine.

I'd like to be able to remove the hold on this package though.

Revision history for this message
Fabio Somenzi (somenzi-fabio) wrote :

I seem to have run into this problem with a new Lenovo T440p (same message and same behavior). I don't seem to be able to make the workaround work, though. I've created a live "CD" for 14.04.1, and I can boot from it. However, when the installer starts, it says that there is no other OS and only gives me the option to erase everything currently on the fixed disk. Windows 8.1 is still there, however. I can still boot it, and the 14.10 live "CD" still sees it. Any suggestions?

Revision history for this message
graingert (tagrain) wrote :

Yes the 14.04 installer won't detect Windows 8.1. What I did was install using 14.10, disover it had broken my system then manually install into the partitions created by the 14.10 installer in the 14.04 installer.

I then put a hold on efibootmgr and upgraded

Revision history for this message
Fabio Somenzi (somenzi-fabio) wrote :

Thanks! I got it to work.

Revision history for this message
Zdenek (balderys) wrote :

Lenovo T440s

I used solution from http://superuser.com/questions/376470/how-to-reinstall-grub2-efi in combination with installation of efibootmgr mentioned above after chrooting and before grub commands and it works.

Another solution could be:
mkdir /mnt/efi
mount /dev/sda1 /mnt/efi
mkdir /mnt/efi/EFI/boot
cp /mnt/efi/EFI/ubuntu/grubx64.efi /mnt/efi/EFI/boot/bootx64.efi

but then SecureBoot doesn't pass

Revision history for this message
Adam Edgley (adam-edgley) wrote :

Thanks for the above.

My process was to boot into live environment, then (as root):
- Set up my chroot as per http://superuser.com/questions/376470/how-to-reinstall-grub2-efi
- Add deb http://au.archive.ubuntu.com/ubuntu/ trusty main restricted to my /etc/apt/sources.list
- apt-get update
- apt-get install efibootmgr=0.5.4-7ubuntu1
- update-grub
- efibootmgr -c --disk /dev/sda --part 2
- efibootmgr -v # verify a new record called Linux is there

Reboot and happy days
Thanks everyone for your contributions

Revision history for this message
Andrew Pope (popenz) wrote :

Thanks @addam-edgley et al! I was thrashing on this for most of last night but figured it out in the morning.

I had a slightly different experience (mainly encrypted root with LVM), so recording it in full for The People Of The Future™. This is very similar to Adam's post and the answer at http://superuser.com/questions/376470/how-to-reinstall-grub2-efi

- Boot live CD and open terminal.
- Connect to wifi and ensure that your resolv.conf has a good nameserver (e.g. you can `dig google.com`).
- $ sudo su -
- Use gdisk (or fdisk) to check which disk is your HDD. Mine was /dev/sda
- # cryptsetup open /dev/sda3 myroot ## You will need the passphrase for this.
- # lvdisplay ## Find the path of your root volume. Mine was /dev/ubuntu-vg/root
- # mount /dev/ubuntu-vg/root /mnt
- # mount /dev/sda2 /mnt/boot ## Required for doing update-grub later.
- # mkdir /mnt/boot/efi ; mount /dev/sda1 /mnt/boot/efi
- # for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
- # cp /etc/resolv.conf /mnt/etc/ ## Makes the network available after chrooting.
- # modprobe efivars
- #chroot /mnt
- Add "deb http://au.archive.ubuntu.com/ubuntu/ trusty main restricted" to /etc/apt/sources.list
- # apt-get update
- # apt-get install efibootmgr=0.5.4-7ubuntu1
- # update-grub
- # ls /boot/efi/EFI/ubuntu ## Find the efi files that you might need. Mine was shimx64.efi & grubx64.efi
- # efibootmgr -c --disk /dev/sda --part 1 --loader '\EFI\ubuntu\shimx64.efi' --label 'Linux shim' ## Where ' --part 1' is your EFI partition number on '--disk /dev/sda'.
- # efibootmgr -c --disk /dev/sda --part 1 --loader '\EFI\ubuntu\grubx64.efi' --label 'Linux grub'
- # efibootmgr -v ## Verify the new records.
- Ctrl+D to leave the chroot.
- # umount /dev/sda1 # dismount EFI volume
- # umount /dev/sda2 # dismount boot volume
- # reboot

Thanks again everyone - you saved my weekend.

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Please:
1. Report this bug to <https://github.com/rhinstaller/efibootmgr/issues>.
2. Paste the new report URL here.
3. Set this bug status back to "confirmed".

Thank you.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Incomplete
Changed in efibootmgr (Ubuntu):
status: Confirmed → Incomplete
no longer affects: ubuntu-release-upgrader (Ubuntu)
tags: added: asked-to-upstream
Revision history for this message
Chris Emerson (chris-ulp) wrote :

Hi Alberto,

Are you asking the reporter or someone else to report this upstream? What's the relationship of the Red Hat installer to the ubuntu installer? (As far as I can tell the bug has already been fixed months ago in upstream efibootmgr)

Regards,

Chris

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.