Score:0

How to repair Windows boot manager from Ubuntu

us flag

I have Windows pre-installed in PC SSD. I also installed Ubuntu alongside. But now i can not switch to Windows from ubuntu grub. I want to switch to Windows without losing previous data. How to fix this problem.

Here are the boot sectors Notice that currently, windows boot looks inactive with no asterisk *.

sudo efibootmgr -v BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0000,0002,9999
Boot0000* ubuntu    HD(3,GPT,59108669-fc30-4e68-b318-04cba847c3c9,0x53d1800,0x2f800)/File(\EFI\ubuntu\grubx64.efi)
Boot0001  Windows Boot Manager  HD(1,GPT,0c04522d-d18d-4d8f-8e6d-0cc6acf4ca98,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...&................
Boot0002* Solid State Disk  PciRoot(0x0)/Pci(0xe,0x0)/NVMe(0x1,5C-D2-E4-56-11-91-B7-5F)/HD(3,GPT,59108669-fc30-4e68-b318-04cba847c3c9,0x53d1800,0x2f800)..BO
Boot9999* USB Drive (UEFI)  PciRoot(0x0)/Pci(0x1d,0x0)/USB(16,0)..BO

I notice that the Microsoft boot EFI file not available in ubuntu:

HP-Spectre-x360:~$ sudo tree /boot/efi
/boot/efi
└── EFI
    ├── BOOT
    │   ├── bkpbootx64.efi
    │   ├── bootx64.efi
    │   ├── fbx64.efi
    │   ├── grubx64.efi
    │   └── mmx64.efi
    ├── Microsoft
    │   └── Boot
    └── ubuntu
        ├── BOOTX64.CSV
        ├── grub.cfg
        ├── grubx64.efi
        ├── mmx64.efi
        └── shimx64.efi

I notice that Windows SSD Disk partition in EFI system

sudo fdisk -l
Device            Start        End   Sectors   Size Type
/dev/nvme0n1p1 88084480 1000214527 912130048 434.9G Linux filesystem
/dev/nvme0n1p2 29296640   87889919  58593280  27.9G Linux filesystem
/dev/nvme0n1p3 87889920   88084479    194560    95M EFI System

enter image description here

Also, Boot-Repair can not fix the Windows boot. enter image description here

oldfred avatar
cn flag
Do you have another drive? You show no NTFS partitions on SSD. If only SSD, then you deleted Windows when installing Ubuntu. The erase disk option tells you it is erasing the entire disk. You need to use your Windows backup to restore Windows, it will want lots of space and multiple partitions. Erasing Windows does not remove the UEFI boot entry which looks like it was for a different ESP that is now missing.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.