3

Windows 10 is unable to boot after installing Ubuntu 24.04 as dual-boot.

I have very recently installed Ubuntu 24.04.2 LTS on a Dell Precision Tower 3620 which was previously running just Windows 10. I followed these instructions and I have a nicely working Ubuntu installation - yay!, however GRUB doesn't recognize that Windows 10 exists, and if I try to start Windows 10 by reordering the BIOS boot then it just hangs on the Dell OEM screen.

I suspect the issue is because I have ended up with two efi boot partitions, one at /dev/sda1 and the (new?) other at /dev/sda6 which has automounted as /boot/efi. This is the current hard-drive layout according to GParted:

gparted screenshot showing two EFI partitions

By going into the BIOS start-up order, I have somehow managed to activate the Windows boot recovery process (I can't remember how!), but it shows a black screen with this error message and enters a restart loop:

Microsoft Secure Boot Recovery Version 1.0
Visit https://aka.ms/securebootrecovery to learn more about this application.
Checking Secure Boot Certificate Configuration...
The Secure Boot Certificate database already contains the Microsoft UEFI 2023 certificate.
No changes required. If you continue to see this message each time the system starts, 
the UEFI firmware boot configuration may be missing an entry for 'Windows Boot Manager'  
or the Windows entry was moved too low in the boot order.
System will reboot in 10 seconds.

Other thoughts:

  • This PC only has one hard drive, but I have access to a bootable USB stick.
  • I have tried not to alter any UEFI/BIOS settings apart from the boot start-up order (eg secure boot is still enabled)
  • I can mount and view the whole of the /dev/sda3 partition which is the original Win10 location. Nothing seems corrupted on there.

This is the output from find /boot/efi.

/boot/efi
/boot/efi/EFI
/boot/efi/EFI/ubuntu
/boot/efi/EFI/ubuntu/grubx64.efi
/boot/efi/EFI/ubuntu/shimx64.efi
/boot/efi/EFI/ubuntu/mmx64.efi
/boot/efi/EFI/ubuntu/BOOTX64.CSV
/boot/efi/EFI/ubuntu/grub.cfg
/boot/efi/EFI/BOOT
/boot/efi/EFI/BOOT/fbx64.efi
/boot/efi/EFI/BOOT/mmx64.efi
/boot/efi/EFI/BOOT/bkpbootx64.efi
/boot/efi/EFI/BOOT/bootx64.efi
/boot/efi/EFI/BOOT/grubx64.efi

sudo os-prober runs without printing any output

This is my /etc/default/grub (with comment lines removed):

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_OS_PROBER=false
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
#GRUB_TERMINAL=console
#GRUB_GFXMODE=640x480
#GRUB_DISABLE_LINUX_UUID=true
#GRUB_DISABLE_RECOVERY="true"
GRUB_INIT_TUNE="480 440 1"

This is the output from sudo mount /dev/sda1 /mnt/efi1; find /mnt/efi1 -maxdepth 3 ;

/mnt/efi1
/mnt/efi1/EFI
/mnt/efi1/EFI/ubuntu
/mnt/efi1/EFI/ubuntu/shimx64.efi
/mnt/efi1/EFI/ubuntu/grubx64.efi
/mnt/efi1/EFI/Microsoft
/mnt/efi1/EFI/Microsoft/Boot
/mnt/efi1/EFI/Microsoft/Recovery
/mnt/efi1/EFI/Boot
/mnt/efi1/EFI/Boot/bkpbootx64.efi
/mnt/efi1/EFI/Boot/bootx64.efi
/mnt/efi1/EFI/Boot/grubx64.efi
/mnt/efi1/EFI/dell
/mnt/efi1/EFI/dell/bios
/mnt/efi1/System Volume Information

How can I get Windows 10 to boot?

Follow-up questions (if relevant):

  • Will I have to somehow merge the two boot partitions and delete one of them? If so, idiot guide pointers / instructions would be hugely appreciated. I hardly ever touch partitioning or alter boot setups because I know I'll brick something!
  • If/when I can get Windows 10 to boot, will os-prober detect Windows 10 automatically?
W.H.
  • 41
  • 5

1 Answers1

1

Finally managed to get Win10 working. In the absence of a more expert answer I'm going post my own. With thanks to @oldfred for the initial pointers. Although the final solution was Windows-orientated, I'm not going to post in a Windows forum because:

  • the root cause was attempting to install Ubuntu
  • the desired result was to get a dual-booted Ubuntu to work with Win10
  • about half the steps along the way were Linux-related

Steps taken to solve (starting from a working Ubuntu dual-booted with Windows 10 which was hanging on the OEM screen):

  1. In Ubuntu, changed fstab mount to /dev/sda1 (using UUID given by lsblk -f)
  2. In Ubuntu, used gparted to remove boot, esp flags from /dev/sda6 It seems these flags then need to be applied to /dev/sda1 for the next step to work
  3. In Ubuntu, sudo os-prober which now picks up Windows as an available OS
  4. In Ubuntu, sudo update-grub which adds Windows as an option in the Grub menu
  5. In UEFI settings, change from RAID to AHCI. This allows the Windows boot to try diagnosing/fixing automatically, but it still doesn't actually boot into Win10.
  6. In Windows Recovery Cmd Prompt: changed the Windows partition (/dev/sda3 which should be available as C:\ but is only visible in diskpart) GUID type "Linux-filesystem" (0F63DAF-8483-4772-8E79-3D69D8477DE4) to GUID type "basic partition". Types are given here: https://en.wikipedia.org/wiki/GUID_Partition_Table I think this was one of the key stages. When re-entering Windows Recovery Cmd Prompt, /dev/sda3 now automounts as C:\ (Yay!). But it still won't boot! With info given here https://www.techtarget.com/searchenterprisedesktop/tip/Four-ways-to-solve-Windows-10-boot-problems viewing C:\Windows\System32\Logfile\Srt\SrtTrail in notepad.exe hints that the booter is still getting confused between partitions (X:\ the recovery partition and C:\ the actual Windows partition).
  7. From Win Recovery Cmd Prompt. Using instructions given here: https://www.tenforums.com/installation-upgrade/102737-win-10-1703-how-fix-broken-dism-hence-windows-update.html ran dism /image:c:\ /cleanup-image /restorehealth /source:wim:X:\source\install.wim:1. This took about 20mins to run and the next reboot gave the usual Win10 login screen.

Summary: I think the Ubuntu installation somehow changed the GUID-type of the Windows partition to "Linux-filesystem" which then confused all attempts by Windows Recovery to repair the boot settings. I don't think Linux pays any attention to the GUID type, but Windows will completely ignore a partition if it's set incorrectly.

Other useful info came from here: https://forums.tomshardware.com/threads/windows-10-bootrec-rebuildbcd-and-scanos-say-0-windows-installations-detected.3661383/ (eg diskpart list disk select disk 0 list partition list volume select volume 3 assign letter C:)

W.H.
  • 41
  • 5