How to get back Windows on the grub menu?
Bo Berglund
bo.berglund at gmail.com
Tue Oct 26 09:54:41 UTC 2021
On Mon, 25 Oct 2021 12:00:53 +0200, Bo Berglund <bo.berglund at gmail.com> wrote:
>I installed Ubuntu Desktop 20.04.5 on a Lenovo IdeaCentre 3 PC a few days ago as
>a dual boot to Windows 10 (se my other threads about tha effort).
>
>To begin with the resulting grub menu contained both Windows and Ubuntu.
>Then I used GParted Live (booted from the USB via Windows) to copy in an Ubuntu
>Server 18.04 partition from my original server.
>When I restarted the computer to the Ubuntu desktop it did some grub update too.
>After this the grub menu contained both versions of Ubuntu in addition to
>Windows 10.
>But it also contained the items from my backup disk used to transport the
>partition between the two PC:s.
>So I unplugged the backup drive and then from the Ubuntu server I issued:
>sudo update-grub
>
>Now the extraneous items disappeared from the grub menu and I had Ubuntu
>desktop, Ubuntu server and Windows.
>
>But for some reason when I reboot today the Windows entry has disappeared and I
>really need that for f/w updates to the hardware and to be able to boot from
>USB.
>
>So:
>How can I get back the Windows 10 entry on the grub menu?
>The efi partition is still intact on the disk when I inspect it using GParted in
>Ubuntu desktop.
>I have tried this inside both Ubuntu versions:
>sudo os-prober
>/dev/nvme0n1p5:Ubuntu 20.04.3 LTS (20.04):Ubuntu:linux
>
>So it only finds one os only...
>But there are 2 on the disk and on the grub menu.
>But no Windows...
It turned out that I have to do a long detour into Lenovo BIOS in order to make
it start Windows so I then can run the USB boot...
So I noted down the way I worked around the problem, for future reference here a
copy:
---------------------------------------------------------
So this is how one can select which boot menu to show on Lenovo PC:
- Shut down the PC completely
- Insert the USB Live media in an *USB2* port (**IMPORTANT!**)
- Switch on the PC
- Immediately start hitting F1 repeatedly until the Lenovo logo shows up
- Now you will get to the Lenovo BIOS
- Set Security/SecureBoot = Disabled
- Set Startup/CSM = Enabled
- Set Startup/BootMode = Auto
- Set Startup/BootPriority = UEFI first
- Exit/Save
Now the PC will boot and get to a grub menu including Windows.
(In my case containing this):
* Ubuntu
Advanced options for Ubuntu
Windows boot manager
Ubuntu 18.04.6 LTS
Advanced options for 18.04.6 LTS
UEFI Firmware Settings
(Note: the Ubuntu shown is not version 18.04, has been upgraded to 20.04)
To boot from USB:
- Select Windows to start Windows 10
- Once logged on:
Hold Shift down and use mouse to Start/Power/Restart
- A menu on blue background showing a number of actions is shown
Select "Use a device"
- On the following screen identify the button corresponding to the USB live
media
- Now the USB media will be used to boot the PC into whatever is on the USB
drive
When you have reached the USB live screen you can use GParted to edit the
partitions on the disk or else just use the shortcut to install Ubuntu on the
computer (dual boot or remove Windows).
When all is done (for example installing a new Ubuntu or using GParted Live to
manage the disk then in order to get back to the original grub boot menu do the
following:
- Shut down the PC completely
- Remove the USB Live media and other connected USB drives
- Switch on the PC
- Immediately start hitting F1 repeatedly until the Lenovo logo shows up
- Now you will get to the Lenovo BIOS
- Set Startup/BootPriority = Legacy first
- Exit/Save
The Legacy grub menu will now be shown containing whatever Ubuntu versions you
have installed plus the
"Advanced options" for each:
* Ubuntu
Advanced options for Ubuntu
Ubuntu 20.04.3 LTS (20.04) (on /dev nvme0n1p5)
Advanced options for Ubuntu 20.04.3 LTS (20.04) (on /dev nvme0n1p5)
Using Ubuntu (top line) will start the latest installed Ubuntu, in my case the
server version.
------------------------------------------------------------------
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list