Skip to content

Instantly share code, notes, and snippets.

@vees
Last active September 25, 2024 04:13
Show Gist options
  • Save vees/b3fb1e5b62da155a006831c16eaac8e8 to your computer and use it in GitHub Desktop.
Save vees/b3fb1e5b62da155a006831c16eaac8e8 to your computer and use it in GitHub Desktop.
Ubuntu and UEFI on Lenovo Thinkcentre M92P
Lenovo Thinkcentre M92P
When booting to USB installer disk installation proceeds as expected
1962 no operating system found
When booting into preview mode all disks load without issue, so its not the cable
Secure Boot option either not present or disabled
Last time I fixed this by adding a fake line to the boot loader from instructions on the web
Got a warning during installation about UEFI mode
Windows Fast Startup disabled
jfly comment below:
I ran into this issue on my Thinkcentre M92p and found that installing the latest bios update from
https://support.lenovo.com/us/en/downloads/ds029265-flash-bios-update-thinkcentre-edge-92-thinkcentre-m82-m92-and-m92p-thinkstation-e31
(as of 2022-04-07, that's version 9SKT9CA released on 2018-12-23) makes UEFI booting work for me without having to futz with the names of the entries.
here's a list of prerequisites to run pc in uefi mode, like:
1) GPT partitioned disk (holds true if you want to run both win and linux)
2) efi partition with bootloaders
3) Bios is set to boot in uefi mode
4) efi vars are programmed
https://forums.lenovo.com/t5/Other-Linux-Discussions/ThinkCentre-M92p-Linux-Boot-Problem/td-p/871891
UEFI vs Legacy
https://askubuntu.com/questions/647303/uefi-or-legacy-which-is-advised-and-why
http://www.daossoft.com/bios-tips/how-to-switch-from-uefi-to-legacy-on-lenovo.html
[SOLVED] UEFI BIOS not recognizing Linux EFI Bootloader (Dual Boot)
https://www.linuxquestions.org/questions/linux-newbie-8/uefi-bios-not-recognizing-linux-efi-bootloader-dual-boot-4175619918/
https://www.lifewire.com/change-the-efi-boot-order-efibootmgr-4028027
https://itsfoss.com/no-grub-windows-linux/
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
HERE IS THE MAGIC LINK
https://forums.lenovo.com/t5/ThinkStation/UEFI-Mode-installation-of-Linux-distributions-on-Thinkstation/td-p/1018555
It appears that, prior to to following the BootOrder specified in the UEFI
Boot Manager, the Lenovo BIOS first checks the UEFI Boot Manager
configuration for an entry labelled "Windows Boot Manager".[1]
More in the series of bizarre UEFI bugs
https://mjg59.dreamwidth.org/20187.html
How to install Linux on UEFI systems where GRUB fail to install?
https://forums.lenovo.com/t5/Linux-Discussion/How-to-install-Linux-on-UEFI-systems-where-GRUB-fail-to-install/td-p/674103
Delete EFI entry
https://unix.stackexchange.com/questions/223581/remove-windows-boot-manager
Using BootRepair
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows
Kernel boot
https://wiki.ubuntu.com/DebuggingKernelBoot
@jchrisweaver
Copy link

Lenovo ThinkCenter M920q
I couldn't get the Ubuntu install to see the installed SSD drive, only the USB I booted from. The trick was pressing the F12 key during boot which showed a list of bootable devices. One of the options was "USB UEFI" which worked. Ubuntu is now installed and happy.

Copy link

ghost commented Oct 3, 2022

Many of the links provided showing the details are now broken. Has Lenovo ever fixed this issue with later BIOS revisions?

I ran into this issue with a Lenovo Thinkcenter. UEFI booting looked patched in at the last minute. Lenovo didn't even put any EFI settings settings at all in the BIOS and one would think the machine is supposed to be Legacy BIOS boot only and doesn't support UEFI at all. So instead of writing any UEFI settings in the BIOS configuration they hardcoded the implementation to look for windows only on the EFI system partition and fail on everything else.

@vees
Copy link
Author

vees commented Oct 26, 2022

Many of the links provided showing the details are now broken.

I updated as many links as I could. Thanks for pointing it out.

@jfly
Copy link

jfly commented Apr 8, 2023

@eyager1, I ran into this issue on my Thinkcentre M92p and found that installing the latest bios update from https://support.lenovo.com/us/en/downloads/ds029265-flash-bios-update-thinkcentre-edge-92-thinkcentre-m82-m92-and-m92p-thinkstation-e31 (as of 2022-04-07, that's version 9SKT9CA released on 2018-12-23) makes UEFI booting work for me without having to futz with the names of the entries.

@eribertomota
Copy link

I am doing some tests around a Lenovo ThinkCentre M91p with Windows 10 / Debian 12 (Bookworm) to write a specific technical document about EFI boot.

Considering a dual boot, I installed Windows and, after this, Debian. The machine stopped to start, showing the error "1962: No operating system found". Thus, I did the boot using a flash drive with "Ventoy"[1] and rEFInd[2] on Ventoy (is needed to write the Ventoy ISO to the flash drive using dd or dcfldd and the ISO image of rEFind inside of Ventoy partition). rEFInd is able to read the \EFI partition and to boot any system found there. I booted the Debian.

[1] https://www.ventoy.net/en/download.html
[2] https://sourceforge.net/projects/refind/

On Debian, I set a label for the Debian/GRUB as "Windows Boot Manager" (Lenovo M91p always searches for this label) and I set the boot order to Debian only. On Debian I also made an update-grub to add the Windows to GRUB. My Debian is set as Boot0001 (the command # efibootmgr will show this information), so Debian = 0001. The following commands were used:

  • To remove the current Debian entry (see # efibootmgr -v):

# efibootmgr -b 0001 -B

  • To rewrite the Debian entry:

# efibootmgr -c -d /dev/sda -p 1 -l '\EFI\debian\grubx64.efi' -L "Windows Boot Manager"

  • To set 0001 as the main system in the BootOrder field.

# efibootmgr -o 0001

  • To test:

# reboot

A simple command reference: https://www.linuxbabe.com/command-line/how-to-use-linux-efibootmgr-examples

Enjoy!

@va7wv
Copy link

va7wv commented Jul 30, 2023

For the M91 there is no BIOS update that helps this issue. "Compatability module" is not available on this model no matter what you do. The last BIOS firmware was iin 2014 and it doesn't solve this problem like the M92 update does.

What worked for me when installing Fedora 38 Server is:

  • Enable "Legacy" mode in the boot menu BEFORE installing the OS. Do NOT use UEFI or Automatic.
  • Do not allow Fedora to automatically create partitions,
  • Use the standard partition scheme instead in the "Custom" menu. You can do the automatic mounts.

No need to use efibootmgr or spoof anything.

@alexklibisz
Copy link

If anyone else is still tripping over this, I found two approaches for installing the latest ubuntu server on the M91P:

  1. Flash/upgrade the BIOS to the 2018 version, from this page: https://support.lenovo.com/us/en/downloads/ds029265-flash-bios-update-thinkcentre-edge-92-thinkcentre-m82-m92-and-m92p-thinkstation-e31. I used the "Flash from operating system version". This worked for one of mine, but I seem to have bricked another one. It stopped posting and stopped accepting input during boot. So YMMV.
  2. Keep the old BIOS, instal an older version of Ubuntu server that doesn't expect UEFI support, and upgrade to the latest version. I started with Ubuntu 14.04 and upgraded all the way to 24.04. In the installer's "Partition Disk" step, I chose "Guided - use entire disk" and then on the "Install the GruB boot loader on a hard disk" step I chose Yes. It's tedious but seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment