corrupted BIOS due to Intel SPI bug in kernel

Bug #1734147 reported by tobia antoniolli
910
This bug affects 157 people
Affects Status Importance Assigned to Milestone
Boot-Repair
Fix Released
Medium
YannUbuntu
Linux
Confirmed
Medium
linux (Ubuntu)
Fix Released
Critical
Unassigned
Artful
Fix Released
Critical
Unassigned
linux-hwe-edge (Ubuntu)
Xenial
Fix Released
Critical
Unassigned
linux-oem (Ubuntu)
Xenial
Fix Released
Critical
Unassigned

Bug Description

An update to linux kernel on Ubuntu 17.10 that enabled the Intel SPI drivers results in a serial flash that is read only in Intel Broadwell and Haswell machines with serial flashes with SPI_NOR_HAS_LOCK set.

Warning: 32bit iso on sourceforge for boot-repair-disk still contains unpatched Kernel. This is especially dangerous if boot-repair fails to repair the system to a bootable state, as there will be no way of applying the Fix detailed below.

Symptoms:
 * BIOS settings cannot be saved
 * USB Boot impossible
 * EFI entries read-only.

---

Fix: The issue was fixed in kernel version 4.13.0-21 by configuring the kernel so it is not compiled with Intel SPI support. But previous affected machines still suffered from a broken BIOS.

Repair: If you still can boot into Ubuntu, you can recover your BIOS with the following steps:

1. Boot into Ubuntu
2. Download http://people.canonical.com/~ypwong/lp1734147/linux-image-4.15.0-041500rc6-generic_4.15.0-041500rc6.201712312330+20170103+1_amd64.deb
3. Install the downloaded package:
  $ sudo dpkg -i linux-image-4.15.0-041500rc6-generic_4.15.0-041500rc6.201712312330+20170103+1_amd64.deb
4. Make sure the kernel is installed without any error. Once installed, reboot.
5. At grub, choose the newly installed kernel. You can choose the "recovery" mode.
6. Reboot and go to BIOS settings to confirm your BIOS has been recovered.
7. In case your BIOS is not recovered, reboot to the new kernel, then reboot *once again* to the new kernel, do not enter BIOS settings before the reboot. After the second reboot, check BIOS.
8. If your BIOS issue remains, download another kernel from http://people.canonical.com/~ypwong/lp1734147/linux-image-4.15.0-041500rc6-generic_4.15.0-041500rc6.201712312330+clear+debug_amd64.deb, and use dpkg to install it, then repeat steps 4 to 6.

After your BIOS is fixed, the kernel packages you just installed are no longer needed, you can remove it by running 'sudo dpkg -r linux-image-4.15.0-041500rc6-generic'.

The patch used to build the linux v4.15 kernel in step 8 can be found at https://goo.gl/xUKJFR.

If you have applied updates, and find that you can not boot the above fixed kernel because of Secure Boot and that the kernel is unsigned, but can still boot another kernel for your system; here's what you can do:

1) Download http://archive.ubuntu.com/ubuntu/dists/xenial/main/uefi/grub2-amd64/current/grubx64.efi.signed:
$ wget http://archive.ubuntu.com/ubuntu/dists/xenial/main/uefi/grub2-amd64/current/grubx64.efi.signed

2) Copy grubx64.efi.signed over /boot/efi/EFI/ubuntu/grubx64.efi:
$ sudo cp grubx64.efi.signed /boot/efi/EFI/ubuntu/grubx64.efi

3) Reboot; you should now be able to load the new unsigned kernel that allows fixing firmware / SPI.

4) Once you're satisfied that things work; boot to Ubuntu with a standard, signed kernel, and re-install the right GRUB version for your system:

$ sudo grub-install

---

Test Case: Fix has been verified by our HWE team on affected hardware.

Regression Potential: Minimal, it's unlikely anyone is actually doing anything which requires this driver.

---

Affected Machines:

Lenovo B40-70
Lenovo B50-70
Lenovo B50-80
Lenovo Flex-3
Lenovo Flex-10
Lenovo G40-30
Lenovo G50-30
Lenovo G50-70
Lenovo G50-80
Lenovo S20-30
Lenovo U31-70
Lenovo Y50-70
Lenovo Y70-70
Lenovo Yoga Thinkpad (20C0)
Lenovo Yoga 2 11" - 20332
Lenovo Yoga 3 11"
Lenovo Z50-70
Lenovo Z51-70
Lenovo ideapad 100-15IBY

Acer Aspire E5-771G
Acer Aspire ES1-111M-C1LE (fixed following your new instruction (thank you))
Acer TravelMate B113
Acer Swift SF314-52 (Fixed by 4.14.9)
Toshiba Satellite S55T-B5233
Toshiba Satellite L50-B-1R7
Toshiba Satellite S50-B-13G
Toshiba Satellite L70-A-13M
Dell Inspiron 15-3531
Mediacom Smartbook 14 Ultra M-SB14UC (fixed with official fix)
Acer Aspire E3-111-C0UM
HP 14-r012la
Fujitsu Q584 (unable to fix due to non booting OS on the tablet)

---

Affected serial flash devices by manufacturer part number, JEDEC ID (SPI_NOR_HAS_LOCK set in drivers/mtd/spi-nor/spi-nor.c)
/* ESMT */
   f25l32pa, 0x8c2016
   f25l32qa, 0x8c4116
   f25l64qa, 0x8c4117
/* GigaDevice */
   gd25q16, 0xc84015
   gd25q32, 0xc84016
   gd25lq32, 0xc86016
   gd25q64, 0xc84017
   gd25lq64c, 0xc86017
   gd25q128, 0xc84018
   gd25q256, 0xc84019
/* Winbond */
   w25q16dw, 0xef6015
   w25q32dw, 0xef6016
   w25q64dw, 0xef6017
   w25q128fw, 0xef6018

---

Original Description:

Basically on Lenovo Y50-70 after installing Ubuntu 17.10, many users reported a corrupted BIOS.

It's not possible to save new settings in BIOS anymore and after rebooting, the system starts with the old settings.

Moreover (and most important) USB booting is not possible anymore since USB is not recognized. It's very serious, since our machines do not have a CDROM.

Lenovo forums at the moment are full of topics regarding this issue.

Thank you!!

Revision history for this message
In , abdo.roig (abdo.roig-linux-kernel-bugs) wrote :

Created attachment 256825
early boot log with kernel 4.11.2

My machine boots fine with kernel 4.11.3. However, on the next boot, the firmware says: "Configuration Changed - Requires restart", and the firmware settings are reset to defaults. There was no such issue with the 4.10 kernels.

My machine is a Lenovo Thinkpad Yoga (first generation) with the latest firmware revision.

I attach a piece of logs I gathered booting kernel 4.11.2 with efi=debug. Is there any other piece of data I can provide?

Revision history for this message
In , julius.bullinger+kernelorg (julius.bullinger+kernelorg-linux-kernel-bugs) wrote :

I can confirm this bug on the same hardware for all current kernel versions from 4.11 on. I tested on Fedora:

 * kernel-4.11.2-200.vanilla.knurd.1.fc25.x86_64
 * kernel-4.11.3-200.fc25.x86_64
 * kernel-4.12.0-0.rc2.git0.1.vanilla.knurd.1.fc25.x86_64

All of them suffer from the issue, while 4.10 does not.

Revision history for this message
In , julius.bullinger+kernelorg (julius.bullinger+kernelorg-linux-kernel-bugs) wrote :

*** Bug 195975 has been marked as a duplicate of this bug. ***

Revision history for this message
In , matt (matt-linux-kernel-bugs) wrote :

Could you try doing a git bisect to track down which commit introduced the issue? I looked at the EFI changes between v4.10 and v4.11 but nothing obvious stood out.

Revision history for this message
In , abdo.roig (abdo.roig-linux-kernel-bugs) wrote :

I bisected the issue to commit ff00d7a32a1b88b772981a13fc198e0d29300666: "mfd: lpc_ich: Add support for SPI serial flash host controller".

Revision history for this message
In , matt (matt-linux-kernel-bugs) wrote :

Thanks for bisecting. Re-assigning since this doesn't look like an EFI issue per se.

Revision history for this message
In , matt (matt-linux-kernel-bugs) wrote :

Mika, can you take a look?

Revision history for this message
In , mika.westerberg (mika.westerberg-linux-kernel-bugs) wrote :

Can you attach full dmesg to the bug and then revert ff00d7a32a1b88b772981a13fc198e0d29300666 and attach dmesg of that boot as well?

Revision history for this message
In , abdo.roig (abdo.roig-linux-kernel-bugs) wrote :

Created attachment 257711
dmesg log at 8afda8b2 (good)

Revision history for this message
In , abdo.roig (abdo.roig-linux-kernel-bugs) wrote :

Created attachment 257713
dmesg log at ff00d7a3 (bad)

Revision history for this message
In , abdo.roig (abdo.roig-linux-kernel-bugs) wrote :

I attached the logs you requested. The git hashes in the logs do not match the hash in the kernel version because in order to work-around a gcc7 build problem I cherry-picked 474c9015 on top.

Revision history for this message
In , mika.westerberg (mika.westerberg-linux-kernel-bugs) wrote :

Both logs say kernel v4.10 is that expected?

Revision history for this message
In , abdo.roig (abdo.roig-linux-kernel-bugs) wrote :

Yes, this is what git-describe reports. The bug was introduced in the 4.11 merge windows, so git describe reports 4.10-blah-blah.

Revision history for this message
In , mika.westerberg (mika.westerberg-linux-kernel-bugs) wrote :

Created attachment 257715
Prevent touching BCR register from lpc_ich.c

Can you try the attached patch and see if it makes a difference?

Revision history for this message
In , abdo.roig (abdo.roig-linux-kernel-bugs) wrote :

Yes, it does. With your patch on top of the bad commit, the problem disappears.

Revision history for this message
In , mika.westerberg (mika.westerberg-linux-kernel-bugs) wrote :

OK, thanks for testing. I'll prepare proper patch and send it upstream tomorrow.

Revision history for this message
In , keigh.rim (keigh.rim-linux-kernel-bugs) wrote :

I upgraded Ubuntu on my thinkpad yoga machine (1st gen) from 17.04 (kernel 4.10) to 17.10 (kernel 4.13) and this issue is introduced. I also tried Fedora 26 (kernel 4.11) live cd, and noticed the same problem.

Revision history for this message
In , josh_bell7 (joshbell7-linux-kernel-bugs) wrote :

Hi Mika, this bug also affects me. Has your patch been committed?

Revision history for this message
In , mika.westerberg (mika.westerberg-linux-kernel-bugs) wrote :

Yes, it should be included in v4.14-rc1+

tobia antoniolli (tob79)
information type: Private Security → Public
665 comments hidden view all 668 comments
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
britgreek (britgreek) wrote :

The problem also affects Lenovo G40-30. I have just installed Ubuntu 17.10 in legacy mode (dual boot with Windows 10) and the boot from USB option is gone. Very serious issue, as there is no way to format our hard drives and reinstall an OS. There was no reference in the documentation for such a serious problem that would alter/corrupt our bios.

Revision history for this message
bruno (bruno-js-carvalho123) wrote :

I have the same problem with Lenovo U31-70. Since I upgraded to Ubuntu 17.10 i'm unable to save any changes made to the bios.

tobia antoniolli (tob79)
summary: - Ubuntu 17.10 corrupting BIOS - Lenovo Y50-70
+ Ubuntu 17.10 corrupting BIOS - many LENOVO laptops models
Revision history for this message
Shaleghi (shaleghi) wrote : Re: Ubuntu 17.10 corrupting BIOS - many LENOVO laptops models

I have the same problem - Lenovo Y50-70 - I took my laptop to a professional repair shop and they could not fix it.

Revision history for this message
Toninetto (toninetto) wrote :

I've had the same problem. After trying different solutions, I had to remove the bios chip with hot air, read the content with a usb programmer, and flash a new chip. So now i can remove the secure boot and saving on exit...
I know this is an extreme solution, but I hope I can help someone find a simpler solution.

Revision history for this message
davvvidko (jannnas) wrote :

Same problem with Lenovo G50-70

Cannot boot from USB/CD rom

I dont know how we can get this repaired.

tobia antoniolli (tob79)
description: updated
Revision history for this message
Tautedorus (tautedorus) wrote :

I can also confirm this. I use the Lenovo Z50-70 laptop and I have encountered this problem. After installing Ubuntu 17.10 (and other remixes of it) and reinstalling it again, the UEFI BIOS does not save any changes except the date and time. I could not reset the UEFI BIOS settings because it did not save any changes and the CMOS battery is soldered, unfortunately. What is even worse, the UEFI BIOS does not boot any bootable media. I tried booting DVDs, USB sticks and other HDDs with no luck. The only thing that the boot menu shows is the old installation partition name and nothing else. Before that happened I used Manjaro distribution which did not have such problems even after reinstalling it multiple times. By the way, the solution to this problem was the a motherboard replacement... Two times.

The only way to boot bootable devices is to install and properly configure rEFInd: https://forums.lenovo.com/t5/forums/v3_1/forumtopicpage/board-id/ll04_en/thread-id/154203/page/2. That does not solve the UEFI BIOS corruption problem. It is just a workaround.

Maybe it is a defective Lenovo UEFI BIOS (two motherboard replacements proved that it could be defective "by design"). However, as I mentioned before, other distributions had not caused any of these problems before.

Revision history for this message
Marcin Ciosek (marcin-p-ciosek) wrote :

This is not Ubuntu bug.
I've created the workaround description (user marcin78 here) and as you can clearly see, it refers to my Antergos installation being the last one writing BIOS.
I think (I'm not system expert) that this can be related to the way the kernel update scripts (modules rebuild or mkinird or any other) is handling the process. It could be that other system users don't do so many BIOS rewrites (Windows is updated in a different way) and this problem is not affecting most of PC users. Although there are reports also from Windows installations.
So far the fix is replacing the chip. Far beyond most of our skills and definitely won't come cheap from Lenovo service.
Hope the rEFInd tip can serve you for now.
Marcin

Revision history for this message
britgreek (britgreek) wrote :

Actually, this MUST be a Ubuntu / Linux bug, as the current Ubuntu 17.10 rendered our Lenovo laptops useless in the long run, without any documentation or warning that the installation would affect the BIOS. This is a very serious issue, both legally and ethically and I think that we should demand an immediate fix. No OS should have anything to do with the modification of the BIOS without the consent of the owner. What will happen if we need to format our hard drives? How will we be able to install the OS that we want? i am not happy with any workaround. I want my computer to function as it did when I purchased it, in terms of its bios settings and booting from USB is an essential feature. What remains to be explained is the reason why it only affects Lenovo hardware and not any other brand.

Revision history for this message
sultan tell (sultantell) wrote :

Same problem with lenovo Z50-70

Revision history for this message
britgreek (britgreek) wrote :

Just found a bios update, but it fails to install. I am trying to run the exe from Lenovo website on Windows 10. The laptop just restarts without performing the update.

tobia antoniolli (tob79)
description: updated
Revision history for this message
tobia antoniolli (tob79) wrote :

I am not sure devs are working/have been informed, we need to directly involve them since this is a MAJOR issue as perfectly explained by britgreek on post #9.
Does anybody know how to speed up things here?

Revision history for this message
britgreek (britgreek) wrote :

@tobia antoniolli

I think Lenovo does not support Linux as an OS, therefore, they will claim that it is not their fault. On Lenovo forums, similar issues with similar BIOS symptoms have been reported since 2016, without any support. On the other hand, I do not see how Ubuntu devs can actually revert the current situation, as Ubuntu theoretically has no access to the BIOS or its code.

In my case, these laptops are used in a private school, and now I am left stranded with machines that do not function as they should.

Revision history for this message
britgreek (britgreek) wrote :
Revision history for this message
Lukas Bockstaller (boggy) wrote :

Lenovo Yoga Thinkpad (20C0) is also affected.

Revision history for this message
tobia antoniolli (tob79) wrote :

@britgreek

I agree with you, Lenovo has nothing to do with this issue, however I think it's Ubuntu devs responsability to take a look and try to fix this issue, since Ubuntu 17.10 has corrupted our bios. Our machines here (different models) reported this issue only after installing Ubuntu 17.10 and if you browse this forum, you would see that many others reported Ubuntu corrupting the BIOS, something that is extremely serious.

description: updated
Revision history for this message
britgreek (britgreek) wrote :

Update: I contacted Lenovo Greece today, and they said they they had never heard of the problem, despite the posts in Lenovo's forums (some of which date back to 2016), and they suggested that in such cases, a change of motherboard may be the only solution to fix the issue. So, the situation is getting even worse. They also mentioned that Lenovo does not officially support Linux.

Revision history for this message
reece callister (reecespuffs) wrote :

this is also affecting my bios on the lenovo ideapad 100 15iby however usb booting is still possible.
the troubleshooting steps i have taken are.
1) used lenovo's bios update utility from the drivers site of my bios
  https://download.lenovo.com/consumer/mobiles/cccn21ww.exe (direct link)
2)replaced CMOS battery
3)reached out to the staff of lenovo forums and support staff for help and it stumped them
4)tried different OS's (i had ubuntu 17.10 but win server 2016 killed the grub loader (unrelated))
   i tried win server 2016 & win8.1 (the modded version windows 9)
all these were in vein as its still not saving (btw the reason i need server 2016 is to host RDweb applications which you need intel virtualisation on which is how i found this issue)
if anyone has any solution to this pls email me at <email address hidden> or reply to this

Revision history for this message
reece callister (reecespuffs) wrote :

I DID NOT MEAN TO DO THAT THERE IS NO FIX ATM PLZ CHANGE THAT BACK

Changed in grub2 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
reece callister (reecespuffs) wrote :

sorry im new to this forum

tobia antoniolli (tob79)
Changed in grub2 (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
reece callister (reecespuffs) wrote :

thank you

Revision history for this message
Alexis Rico (sferadev) wrote :

This is unacceptable, right now my Lenovo G50-80 is a brick.

USB Boot does not work.
DVD Boot does not work.
BIOS Boot menu doesn't autodetect changes on the hard drive EFI paths.

And during an update grub stopped working, it reported a syscall error of I/O and on reboot I couldn't start the computer anymore. I would normally boot a live cd and boot-repair but guess what UEFI USB Boot does not work and Legacy capabilities won't work either.

And reprogramming the BIOS chip is not a viable solution by the way...

1 comments hidden view all 668 comments
Revision history for this message
Andy (andyskull-619) wrote :

Just wanted to join in and say that I am also affected by this, the exact same way as everyone else. I updated to ubuntu 17.10 and my bios died.
Like others, I also changed the CMOS battery etc. It was not a battery problem.

I followed user Marcin Ciosek's work around that he posted on the lenovo forums and was able to fix my installation. But the bios is ofcourse still bricked.
I've never experienced this before, I thought it not possible for an OS to brick a bios chip. If anyone knows how exactly this happened let us know.

Revision history for this message
tobia antoniolli (tob79) wrote :

Hi guys, just to let you know that I sent an email directly to Ubuntu Devs (<email address hidden>)

Probably I won't get a reply from them, but I am trying to get their attention.

Revision history for this message
tobia antoniolli (tob79) wrote :

I also sent an email to Canonical LTD (legal department) explaining the issue and threatening to take legal action on them. As per my previous post, I am trying to get their attention. I'll keep you informed.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Are the machines dual installed with Windows 10?
Has there been a recent upgrade to Fall Creators Update? Note that many Lenovo machines fail to boot or boot to black screen after such an update. Such an upgrade affects subsequent boots to both win10 and ubuntu.
Can you get into one-key recovery mode?
Can you get to the boot options menu?
Can you get to the bios settings menu?
Can you configure boot entries in the bios settings to boot from the /EFI/BOOTX64.EFI? SHIM? UBUNTU/GRUB2.EFI?
Have you applied all the Lenovo bios/firmware upgrades?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

To this point, I am not yet convinced that there is a bug in Ubuntu that causes this.

For one thing, the issue is far too confused here on this report for me to make sense of what is going on. The included links to Lenovo forums do not appear to me as bugs in Ubuntu.

What exactly is the problem?
What settings are changed in the BIOS and appear to not be saved?
Can your system boot into Ubuntu?
If not, what last appears on screen?
If yes, then what does 'sudo efibootmgr -v' report?

Failing to change things in the BIOS does not sound to me like anything that Ubuntu could have caused; but it also seems like there might be confusion as to how booting works on these systems. When systems are booting in UEFI mode, you can't simply add files here and there on the system and expect things to work -- this is why you have named entries in the firmware (the "BIOS") such as "ubuntu": there is some configuration involved, which can be done using 'efibootmgr' on Linux.

If you can't change time/date in firmware, or any other option that is not boot related, you need to consult Lenovo. There is nothing I can do about those. If you are having issues changing boot entries in firmware, it's possible that it is simply not supported -- the firmware might not allow you to set the ordering; and to disable UEFI you may need to first disable Secure Boot. The best is again to consult Lenovo for help and describe exactly what you want to do. They know how their firmware is supposed to work; and what is and is not possible to do.

Please also try using F12 or Fn-F12 (whatever the key combination is on that particular hardware. I have Lenovo hardware here, but none of the affected systems) to get to the Boot Selection Menu and see if then you can boot to USB or to Windows (if it's still installed) from that menu.

Please avoid using rEFInd if possible, as I cannot provide support for its use. It is known to change settings incorrectly; and that can cause issues on upgrade. The fewer extra changes on a system once it stops working is always better to figure out what is wrong.

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → High
Revision history for this message
bruno (bruno-js-carvalho123) wrote :

I dont have a dual boot system, i just have ubuntu 17.10 and since the upgrade (17.04 to 17.10) im unable to save changes made to the bios such as boot order, secure boot, intel virtualization, etc.

I can boot into Ubuntu and the output of 'sudo efibootmgr -v' is:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,2003,2001,2002
Boot0000* ubuntu HD(1,GPT,ef50adca-c79c-4471-8c88-4a641917c23d,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* EFI Network 0 for IPv4 (1C-39-47-18-3F-55) PciRoot(0x0)/Pci(0x1c,0x2)/Pci(0x0,0x0)/MAC(1c3947183f55,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)RC
Boot0002* EFI Network 0 for IPv6 (1C-39-47-18-3F-55) PciRoot(0x0)/Pci(0x1c,0x2)/Pci(0x0,0x0)/MAC(1c3947183f55,0)/IPv6([::]:<->[::]:,0,0)RC
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC

My machine is a Lenovo U31-70.

Revision history for this message
tobia antoniolli (tob79) wrote :

@Mathieu Trudel-Lapierre (cyphermox)
@Dimitri John Ledkov (xnox)

Hi, thank you for having a look.

To be more clear about this issue:

I had Linux Mint before switching to Ubuntu 17.10 few days ago - no dual boot, just Ubuntu

I can access BIOS (either via f12 or one-key recover mode)

I can change all BIOS settings, but the issue is that when rebooting, the BIOS keeps the old settings so the machine keeps rebooting in safe-mode. Thus usb is not recognized.

https://ibb.co/fHntcm (bios, boot menu)

before installing Ubuntu 17.10, USB was present as third option under the sub-section Legacy.
Now it's not recognized.

I hope this make things clearer.

The USB option is not present obviously even when pressing f12 at startup (for selecting the boot source) https://ibb.co/msfziR

Ubuntu 17.10 is working properly for me, and within Ubuntu USB ports work properly.

Let us know if you need more details, thanks

Revision history for this message
tobia antoniolli (tob79) wrote :

If I run 'sudo efibootmgr -v'
the message is: EFI variables are not supported on this system.

Revision history for this message
Alexis Rico (sferadev) wrote :

@Mathieu Trudel-Lapierre (cyphermox)
@Dimitri John Ledkov (xnox)

My Lenovo G50-80 was running a Ubuntu 17.10 with no dualboot. The BIOS didn't allow me to change ANY of the options and USB/DVD boot did not work for a few weeks or maybe months (I don't check BIOS every day).

Also it seems that grub failed when doing an apt upgrade (gave me a syscall error I/O) and the laptop turned itself into a brick because the "ubuntu"EFI entry also stopped working.

Right now I've set up a PXE server and I'm trying to install Windows 10 over LAN. If I can get it to boot, I'll try to apply the latest BIOS patch (only available for install through Windows) and see if everything goes back to normal.

Revision history for this message
Alexis Rico (sferadev) wrote :

Status update: Attempt to install Windows over PXE won't work.

The BIOS is really derped. The error of Windows Installer is: "Windows could not update the computer's boot configuration. Installation cannot proceed.".

I'm out of ideas...

Revision history for this message
reece callister (reecespuffs) wrote :

wow idk who stuffed it up but they stuffed up bad
i guess im lucky i can boot from usb and optical drive i just can change my bios settings
(lenovo ideapad 100 15iby)

Revision history for this message
reece callister (reecespuffs) wrote :

cant*

Revision history for this message
Steve Langasek (vorlon) wrote :

Bruno's efibootmgr output from comment #29 shows the same damaged boot entry syntax that has previously been seen on Acer laptops.

https://bugs.launchpad.net/ubuntu/+source/efibootmgr/+bug/1437797/comments/5

To my knowledge this is not compliant with the EFI spec.

Did Lenovo recently switch firmware vendors on this product line?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

@tobia; contact Lenovo support. If USB does not show up, it's not an Ubuntu issue. Your USB system may be failing, or the USB key is not recognized (which would make it not show up as a boot option). You might want to try with a different USB key. Was 'ubuntu' listed before under UEFI? You should also not change the boot settings unless you know what you are doing, as doing so can obviously keep your system from booting correctly. If things are being reset at boot (presumably after a few seconds of delay at a blank screen), then you might be dealing with a bad firmware; you should contact Lenovo for help to upgrade or revert the last firmware update.

@Alexis Rico (sferadev); I suspect your hard drive is failing, or you are dealing with a bad firmware. GRUB would not cause this. What options are you trying to change in BIOS? What happens exactly when you try it? Is there an error, does it allow you to save, but then you get a blank screen for a while, and the system "reboots" again?

@bruno; as above: what happens? What settings do you try to change? What happens exactly when you do? What precise steps do you take?

In general, if you are unable to save setting changes in BIOS, you *need* to contact Lenovo support, especially if at "reboot" you see a blank screen for a while before anything happens. This may mean the firmware is confused, and its safety mechanisms will attempt to recover by settings back to their defaults.

Revision history for this message
bruno (bruno-js-carvalho123) wrote :

@Mathieu Trudel-Lapierre (cyphermox)

My problem is very much like @tobia described, I make some changes in the bios (like disabling secure boot or enabling legacy mode) press Save and exit then the computer reboots and bios settings go back to default.
I guess that the reason why @tobia doesn't see the USB drive listed in the boot options is because he cant disable secure boot.

And I dont see any blank screen, the boot process seems pretty normal.

@Steve Langasek (vorlon)

Im sorry i dont really know what lenovo is doing. As far as I know I didnt do any bios upgrades.

Revision history for this message
Alexis Rico (sferadev) wrote :

@Mathieu Trudel-Lapierre Yes, I have two issues:

1) BIOS Doesn't work fine. Same problem as @bruno USB Boot doesn't work, DVD boot doesn't work and saving bios settings are lost of exit and save. No white screen just the changes don't persist across reboots.

2) The hard drive failed leaving system non-bootable.

Today I've also tried installing the OS on a new drive and a different computer, booting through PXE to a Ubuntu Live CD and trying to insert a new entry for the new os through efibootmgr.

So far I've learnt that efibootmgr is unable to create a new entry as it errors No such File. And deleting the old EFI entries seems to work but when rebooting to bios the old EFI entries are still there.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1734147] Re: Ubuntu 17.10 corrupting BIOS - many LENOVO laptops models

On Tue, Nov 28, 2017 at 08:57:08PM -0000, Alexis Rico wrote:
> @Mathieu Trudel-Lapierre Yes, I have two issues:

> 1) BIOS Doesn't work fine. Same problem as @bruno USB Boot doesn't work,
> DVD boot doesn't work and saving bios settings are lost of exit and
> save. No white screen just the changes don't persist across reboots.

> 2) The hard drive failed leaving system non-bootable.

> Today I've also tried installing the OS on a new drive and a different
> computer, booting through PXE to a Ubuntu Live CD and trying to insert a
> new entry for the new os through efibootmgr.

> So far I've learnt that efibootmgr is unable to create a new entry as it
> errors No such File. And deleting the old EFI entries seems to work but
> when rebooting to bios the old EFI entries are still there.

All of this appears to point to a firmware implementation that does not
conform to the EFI standard. If Ubuntu is doing something "wrong" here, it
is very difficult to discern what it is.

In the past, we have seen problems with the Linux kernel filling up the
firmware's available nvram space and as a result causing boot problems.
This could be another instance of that problem, but that doesn't seem to fit
with the idea of efibootmgr successfully allowing boot entries to be
deleted.

Steve Langasek (vorlon)
affects: grub2 (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Incomplete → New
Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: artful
tobia antoniolli (tob79)
tags: added: apport-collected wayland-session
description: updated
description: updated
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tobia antoniolli (tob79)
description: updated
description: updated
Changed in linux (Ubuntu):
importance: High → Critical
Changed in linux (Ubuntu Artful):
importance: Undecided → Critical
status: New → Confirmed
tags: added: kernel-key
description: updated
description: updated
description: updated
Pouria Maleki (pouria1)
description: updated
Tasos (tkatsoulas1)
description: updated
description: updated
kevh (kevhennessey)
description: updated
MAX KOVALENKO (hawo0451)
description: updated
description: updated
description: updated
Steve Langasek (vorlon)
description: updated
description: updated
description: updated
description: updated
MAX KOVALENKO (hawo0451)
description: updated
Rushabh Shah (rmshah99)
description: updated
Seth Forshee (sforshee)
description: updated
description: updated
Changed in linux (Ubuntu Artful):
status: Confirmed → Fix Committed
Changed in linux-hwe-edge (Ubuntu Artful):
status: New → Invalid
Changed in linux-oem (Ubuntu Artful):
status: New → Invalid
Changed in linux (Ubuntu Xenial):
status: New → Invalid
Changed in linux-hwe-edge (Ubuntu Xenial):
status: New → Fix Committed
Changed in linux-oem (Ubuntu Xenial):
status: New → Fix Committed
Changed in linux-hwe-edge (Ubuntu):
status: New → Confirmed
Changed in linux-oem (Ubuntu):
status: New → Confirmed
tags: added: verification-needed-artful
nic00 (nic00)
tags: added: verification-failed-artful
removed: verification-needed-artful
tags: added: verification-done-artful
removed: verification-failed-artful
Artur (radium88)
description: updated
Jeremy Keiper (jkeiper)
description: updated
Changed in linux (Ubuntu Artful):
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Paul Sladen (sladen)
description: updated
Paul Sladen (sladen)
description: updated
allen (krell)
description: updated
allen (krell)
description: updated
Steve Langasek (vorlon)
description: updated
Elena (itzuki87)
description: updated
Changed in linux-hwe-edge (Ubuntu Xenial):
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Changed in linux-oem (Ubuntu Xenial):
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
description: updated
description: updated
oussama saghiri (osm1)
description: updated
description: updated
description: updated
description: updated
allen (krell)
description: updated
description: updated
description: updated
Alexis Rico (sferadev)
description: updated
Mathew Hodson (mhodson)
no longer affects: linux (Ubuntu Xenial)
no longer affects: linux-hwe-edge (Ubuntu)
no longer affects: linux-hwe-edge (Ubuntu Artful)
affects: linux (openSUSE) → ubuntu-translations
no longer affects: ubuntu-translations
Mathew Hodson (mhodson)
no longer affects: linux-oem (Ubuntu)
no longer affects: linux-oem (Ubuntu Artful)
Changed in linux-hwe-edge (Ubuntu Xenial):
importance: Undecided → Critical
Changed in linux-oem (Ubuntu Xenial):
importance: Undecided → Critical
allen (krell)
description: updated
description: updated
Juan Felipe (hacktt)
description: updated
Seb (seb-y)
Changed in linux (Ubuntu Artful):
assignee: nobody → Seb (seb-y)
assignee: Seb (seb-y) → nobody
description: updated
description: updated
description: updated
Changed in linux (Ubuntu):
assignee: nobody → ramdas chormale (ramdaschormale)
Derek Ashby (delsubuntu)
Changed in linux (Ubuntu Artful):
assignee: nobody → Derek Ashby (delsubuntu)
Changed in linux (Ubuntu Artful):
assignee: Derek Ashby (delsubuntu) → nobody
Changed in linux (Ubuntu):
assignee: ramdas chormale (ramdaschormale) → nobody
description: updated
description: updated
tags: added: patch
tags: removed: kernel-key
description: updated
description: updated
description: updated
summary: - Ubuntu 17.10 corrupting BIOS - many LENOVO laptops models
+ corrupted BIOS due to Intel SPI bug in kernel
description: updated
allen (krell)
description: updated
description: updated
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Steve Langasek (vorlon)
Changed in linux (Ubuntu):
status: Fix Released → Fix Committed
description: updated
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
description: updated
description: updated
Changed in linux (Ubuntu):
assignee: nobody → tovagliari amos (tovatamos)
tags: added: dell-inspiron-13-7352
Mathew Hodson (mhodson)
Changed in linux (Ubuntu):
assignee: tovagliari amos (tovatamos) → nobody
Gino Amon (gmartel.amon)
Changed in linux (Ubuntu):
assignee: nobody → Gino Amon (gmartel.amon)
Steve Langasek (vorlon)
Changed in linux (Ubuntu):
assignee: Gino Amon (gmartel.amon) → nobody
description: updated
Fujinaga Daiki (fr099)
Changed in linux (Ubuntu):
assignee: nobody → Fujinaga Daiki (fr099)
Steve Langasek (vorlon)
Changed in linux (Ubuntu):
assignee: Fujinaga Daiki (fr099) → nobody
Brad Figg (brad-figg)
tags: added: cscc
588 comments hidden view all 668 comments
Revision history for this message
johnmario (johnmario) wrote :

Fix: The issue was fixed in kernel version 4.13.0-21 by configuring the kernel so it is not compiled with Intel SPI support. But previous affected machines still suffered from a broken BIOS.

Repair: If you still can boot into Ubuntu, you can recover your BIOS with the following steps:

1. Boot into Ubuntu
2. Download http://people.canonical.com/~ypwong/lp1734147/linux-image-4.15.0-041500rc6-generic_4.15.0-041500rc6.201712312330+20170103+1_amd64.deb
3. Install the downloaded package:
  $ sudo dpkg -i linux-image-4.15.0-041500rc6-generic_4.15.0-041500rc6.201712312330+20170103+1_amd64.deb
4. Make sure the kernel is installed without any error. Once installed, reboot.
5. At grub, choose the newly installed kernel. You can choose the "recovery" mode.
6. Reboot and go to BIOS settings to confirm your BIOS has been recovered.
7. In case your BIOS is not recovered, reboot to the new kernel, then reboot *once again* to the new kernel, do not enter BIOS settings before the reboot. After the second reboot, check BIOS.
8. If your BIOS issue remains, download another kernel from http://people.canonical.com/~ypwong/lp1734147/linux-image-4.15.0-041500rc6-generic_4.15.0-041500rc6.201712312330+clear+debug_amd64.deb, and use dpkg to install it, then repeat steps 4 to 6.

After your BIOS is fixed, the kernel packages you just installed are no longer needed, you can remove it by running 'sudo dpkg -r linux-image-4.15.0-041500rc6-generic'.

The patch used to build the linux v4.15 kernel in step 8 can be found at https://goo.gl/xUKJFR.

If you have applied updates, and find that you can not boot the above fixed kernel because of Secure Boot and that the kernel is unsigned, but can still boot another kernel for your system; here's what you can do:

1) Download http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/uefi/grub2-amd64/2.02~beta2-36ubuntu3.20/grubx64.efi.signed:
$ wget http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/uefi/grub2-amd64/2.02~beta2-36ubuntu3.20/grubx64.efi.signed

2) Copy grubx64.efi.signed over /boot/efi/EFI/ubuntu/grubx64.efi:
$ sudo cp grubx64.efi.signed /boot/efi/EFI/ubuntu/grubx64.efi

3) Reboot; you should now be able to load the new unsigned kernel that allows fixing firmware / SPI.

4) Once you're satisfied that things work; boot to Ubuntu with a standard, signed kernel, and re-install the right GRUB version for your system:

$ sudo grub-install

---

Test Case: Fix has been verified by our HWE team on affected hardware.

Regression Potential: Minimal, it's unlikely anyone is actually doing anything which requires this driver.

---
For more tech related support visit https://bit.ly/2OUHlbu

Revision history for this message
Subham Satyajeet (subhamsatyajeet) wrote :

To fix the issue if you lost access to all operating systems on your machine:

Using Virtualbox in any Windows/Linux machine, create a regular installation of Ubuntu on a flash drive (16GB or more space), since you can't create an installation on your hard drive due to problems in the kernel. If you install Ubuntu on the flash drive, you also install the bootloader into the flash drive. (Notice the "Device for Bootloader installation" during the installation process).

Reboot, you should see the new entry for the operating system on the flash drive. Now proceed to download the updated kernel as described in the bug description. That would fix the issue.

Revision history for this message
Ivan Preocanin (ivan.preocanin) wrote :

Is there still a way to download grubx64.efi.signed file?

http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/uefi/grub2-amd64/2.02~beta2-36ubuntu3.20/grubx64.efi.signed

The download link is dead.

Revision history for this message
Steve Langasek (vorlon) wrote :

These instructions are for a bug related to a 3-year-old non-LTS Ubuntu release. Are you sure this is relevant to you? This would mean you've had your firmware in a broken state for almost 3 years without recovering it.

Revision history for this message
Ivan Preocanin (ivan.preocanin) wrote :

I had an old laptop sitting on a shelf for quite some time. It's still working but I can't boot from usb unless I fix this.

1 comments hidden view all 668 comments
Revision history for this message
axt (axt.) wrote :

Before you have to scrap the notebook: http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/uefi/grub2-amd64/current/grubx64.efi.signed is much newer, but should also work.

Revision history for this message
Steve Langasek (vorlon) wrote :

> Before you have to scrap the notebook...
> http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/uefi/grub2-amd64/current/grubx64.efi.signed
> is much newer, but should also work.

For the moment this is true. But it is not guaranteed that the latest published grub in xenial-updates will support booting unsigned kernels. The intention is that in the near future it will NOT support booting unsigned kernels when SecureBoot is enabled.

So it is probably better to grab the one from the release pocket: http://archive.ubuntu.com/ubuntu/dists/xenial/main/uefi/grub2-amd64/current/grubx64.efi.signed

description: updated
Revision history for this message
Ivan Preocanin (ivan.preocanin) wrote :

It worked! Thanks a lot! <3

Revision history for this message
Vicky Jadhav (trickyj) wrote :

As per my previous comment https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1734147/comments/626

I have Lenovo z50 70

I had dual os installed on it.

1) Ubuntu 17x

2) Windows 8

As soon as I boot the laptop. It takes me to the GUNU GRUB Version 2.02~beta2-36Ubuntu3.22 black screen where I see Grub> prompt.

I usually type exit and it shows me boot screen, I then select windows 8 and use windows 8.

Earlier I have errased ubuntu partiations and now stuck with this Grub screen only.

I am not sure how can I boot into Linux and fix this grub :(

Please help.

Regards,

Vicky Jadhav

Revision history for this message
axt (axt.) wrote :

Vicky, your current issue has nothing to do with the UEFI issue in this thread.

> I then select windows 8 and use windows 8.

Technically you only had to do an in-place upgrade to Win10.
This reliably ;-) overwrites Grub.

Officially, this has been possible free of charge for up to 1 year after the release of Win10. With several time extensions.

Then you can install an up-to-date Linux distribution in dualboot.

But if you can boot normally from a USB stick, you don't have the problem in this thread anyway and can install Linux as the only OS.

Revision history for this message
axt (axt.) wrote :

Btw., Vicky, if Win8 is already running, the first thing I would do would be to flash the last available UEFI, unfortunately also almost 5 years old.

https://pcsupport.lenovo.com/de/en/products/laptops-and-netbooks/lenovo-z-series-laptops/lenovo-z50-70/downloads/DS100528

Revision history for this message
Vicky Jadhav (trickyj) wrote :
Revision history for this message
Vicky Jadhav (trickyj) wrote :

@axt thank you for the update. But the problem is my BIOS has now become read only. Earlier last year, I tried to upgrade ubuntu from 17 to 19 and since then the BIOS has become read only. If I make any changes it will not get saved. That's my main issue.
I cannot boot from USB,
I cannot boot from DVD etc..

My default first boot device is Ubuntu and then windows and then USB and network.. etc..

Even if I do f12 and select boot from USB it doesn't work.

@axt I even tried flashing the BIOS it does not boot from my Pen drive. I downloaded the latest version of UEFI as per BIOS Update for Windows 7 (32-bit, 64-bit), Windows 8 (64-bit) , Windows 8.1 (64-bit), Windows10 (64-bit) - Lenovo Z40-70, Z50-70
 and tried to execute the package from windows 8 os but after reboot nothing happens. the Bios version is not changed and the bios is still not saving any changes what ever changes I do in it.

now I have removed the ubuntu and deleted few partitations of Linux using partition magic.

but now the system partition where the UEFI files are there is still there.

Last night I tried to run pratation magic. Assigned a drive letter to the system partation
then using powershell with admin rights I tried to replace the grubx64.efi.signed in UEFI folder under Ubuntu but it didn't work

Now I have removed the Ubuntu folder from that partition and now it directly boots to windows as soon as I start my laptop but my main concern is to fix the BIOS which is not saving my changes in it.

1 comments hidden view all 668 comments
Revision history for this message
Eitan (emosenkis) wrote :

I ran into this problem and resolved it by deleting /sys/firmware/efi/efivars/dump-type0-*

Revision history for this message
Mike (delgonna) wrote :

I used 32bit boot-repair-disk iso yesterday to try fix a grub problem. Looks like it's built on unpatched Ubuntu 17.10. My bios is now corrupt and unable to boot from USB, worse grub wasn't fixed so my tablet is now a paperweight (maybe a powerbank, suppose it has some use. Fujitsu Q584 using InsydeH20 v5.0 bios.

Can't boot anything so only fix appears to involve a lot of soldering on miniature components, not something I'd be confident doing. Really disappointed Canonical consider this problem solved and have not done more to remove unpatched Ubuntu from the wild.

I've read through all the comments and I don't see any fix that would work in this circumstance. I know it's an old machine but was really responsive and usable from my very brief experience on Linux. I'm concerned others may try to revive old machines with Linux and suffer same fate.

Mike (delgonna)
description: updated
Mike (delgonna)
description: updated
description: updated
YannUbuntu (yannubuntu)
Changed in boot-repair:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → YannUbuntu (yannubuntu)
Revision history for this message
YannUbuntu (yannubuntu) wrote :

boot-repair-disk-32bit updated, based on 18.04.5 instead of 17.10.

Changed in boot-repair:
status: Triaged → Fix Released
Revision history for this message
m0l0c0 (mateus1) wrote :

Hello, I need help, I have an old HP Pavilion computer with problems that no one can fix. He had ubuntu 17.10 installed. Your HD has been removed and formatted, but still not resolved. I don't know much about linux I need to install Windows 10. I was able to boot it with a USB stick with lubuntu 22 :

lubuntu@lubuntu:/boot$ efibootmgr -v
BootCurrent: 003D
Timeout: 2 seconds
BootOrder: 0000,2001,3000,2002,2003
Boot0000* ubuntu HD(1,GPT,9db0df4a-8506-492a-87ff-3bf8dc8c8678,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Ubuntu HD(1,GPT,9db0df4a-8506-492a-87ff-3bf8dc8c8678,0x800,0x100000)/File(\EFI\ubuntu\grubx64.efi)RC
Boot2001* USB Drive (UEFI) RC
Boot2002* Internal CD/DVD ROM Drive (UEFI) RC
Boot3000* Internal Hard Disk or Solid State Disk RC
Boot3003* Internal Hard Disk or Solid State Disk RC

Could anyone tell me what should I do now? Thanks

Revision history for this message
Gero Cammans (gerrygames) wrote :

Can whoever is responsible for this issue please post how to fix it? I can't change any settings in my BIOS. Either tell me how to fix this or buy me a new laptop.

19 comments hidden view all 668 comments
Revision history for this message
In , gecam59 (gecam59-linux-kernel-bugs) wrote :

Whoever is responsible for this should provide a fix or buy me a new laptop. I can't change any BIOS settings.

Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
Displaying first 40 and last 40 comments. View all 668 comments or add a comment.