1

I have a dual-boot dual-drive Dell Optiplex 7060, with a SATA SSD and an NVME stick.

Ubuntu Linux 22.04 is installed on /dev/nvme0. Windows 11 is installed on /dev/sda. I first installed Ubuntu on the NVME, then installed Windows 11 on a previous SATA drive. Recently I replaced the SATA drive with another one larger one and did a clean install of Windows 11. I disconnected the NVME drive during the install to prevent Windows from writing on it.

Both OS's work fine, and I can select between them in grub. The EFI boot order in the BIOS is Ubuntu first, then Windows Boot Manager.

However, when os-prober runs during update-grub, it finds an extra Windows Boot Manager. The grub menu looks like this:

*Ubuntu
Advanced options for Ubuntu
Windows Boot Manager (on /dev/nvmeon1p1) # <--This is a phantom and does not work.
Windows Boot Manager (on /dev/sda1)
UEFI Firmware Settings

Selecting the Windows Boot Manager (on /dev/sda1) works fine. Selecting the /dev/nvmeon1p1 one causes a Windows blue screen:

Your PC/Device needs to be repaired

A required device isn't connected or can't be accessed.

Error Code: 0xc000000e

This is not surprising: it may be trying to find the previous SATA drive.

efibootmgr does not show the phantom entry:

BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0000
Boot0000* Windows Boot Manager
Boot0002* ubuntu

How do I remove the phantom Windows entry? I assume there's something os-prober is finding in EFI partition on nvme0. I've tried listing things with BCDEDIT in Windows and but I don't see how to edit the NVME EFI partition to preserve the Ubuntu entry and remove the useless Windows one.

1 Answer 1

1

I fixed my own problem by removing /boot/EFI/Microsoft/ on the drive with the phantom entry.

$ sudo mount /dev/nvme0n1p1 /mnt
$ sudo su       # avoid "Permission denied" when browsing around /mnt
# cd /mnt/EFI
# ls
BOOT  Dell  Microsoft  ubuntu
# rm -rf Microsoft
# exit
$ sudo umount /mnt
$ sudo update-grub

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .