Problem. I'm trying to setup a dual-boot Ubuntu/Windows installation. This has so far only succeeded partially: grub seems to detect my Windows installation, but cannot boot into it. When I select it, it provides a message saying 'error: not a valid root device."
Disks. I've constructed the dual-boot installation on two disks:
/dev/sda
contains Windows 10, UEFI. This OS was installed first, on one of the two drives. To prevent contamination, I had the other drive removed during installation. The drive contains four partitions:/dev/sda1
, EFI system partition, FAT32, 100MB/dev/sda2
, Microsoft reserved partition, unknown, 16MB/dev/sda3
, Basic data partition, NTFS, 237+GB/dev/sda4
, >>unnamed partition<<, NTFS, 530MB
/dev/nvme0n1
, the second drive, contains Ubuntu 22.04.1, UEFI. This OS was installed second. During installation, I opted for the "install along-side Windows" option. The drive contains two partitions:/dev/nvme0n1p1
, EFI System partition, FAT32, 512 MB/dev/nvme0n1p2
, >>unnamed partition<<, EXT4, 890+ GB
After installation.
Following the installation, grub immediately recognized the Windows install, however, it returns "error: not a valid root device" each time I attempt to select it. I have executed sudo os-prober
and sudo update-grub
, both to no avail. The grub boot sequence is as follows:
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 64DE-E837
else
search --no-floppy --fs-uuid --set=root 64DE-E837
fi
chainloader /efi/Microsoft/Boot/bootmgfw.efi
Peculiarity. There is one thing that happens that I think is rather odd. Let's discuss three situations:
- When I turn my pc on, wait for grub to appear and select Windows, the error occurs.
- When I turn my pc on, enter the boot menu and select 'UEFI - Windows Boot Manager', I do boot into Windows.
- When I turn my pc on, enter the boot menu, select 'UEFI - Ubuntu' and then select Windows in grub, it also boots to Windows.
I'm baffled by the whole situation. Any input is much appreciated!