1st clean install in 10 years, and I messed it up. Had a working dual boot win10 / kubuntu 18.04 prior to installing 20.04. The installer wouldn't let me just install it into the existing linux partition, and then failed to load grub. I ended up reformatting what I thought was the EFI partition, which destroyed the windows boot info. Or did it? Looking at it now I see "Partition Table: msdos", so I wonder if it is actually MBR with a "BIOS" that can go both ways. Anyway, I thought I'd see if you folks know of a fix before I give up on the win10 partitions. I use it rarely, but often enough to make it worth keeping.
After the install it booted straight into linux. I found a /boot/grub/custom.cfg suggestion (I don't even remember a /boot/grub directory before):
Code:
"Windows (UEFI)" {
search --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
that brought grub out with a windows entry (I used to have 2 entries), but the windows entry failed with, "no such device: /EFI/Microsoft/Boot/bootmgfw.efi".
So then I had the great idea to try boot-repair! Of course I had it write grub into both locations it suggested, because it said that was a thing to do, and I wonder now if I overwrote the MBR sector. If it was MBR. The pastebin is:
https://paste.ubuntu.com/p/gNMGRHKxx4/.
It booted straight into linux again, so I ran boot-repair again, because I had seen an option to make the windows partition the first boot choice. To see if it would force a boot attempt. Now grub shows up with a windows selection, but of course it won't boot (silently returns to grub). The pastebin for that one is:
https://paste.ubuntu.com/p/fPZxRJXjwr/ . The option in boot-repair to repair the windows boot sector was not enabled.
So the questions I have are:
Is this MBR or EFI?
If MBR, is it possible that there is a working win10 MBR record that I might recover? Perhaps via a new linux installation eliminating the EFI block? Maybe it was a win10 restore partition, not EFI?
If EFI, is it possible to recover the windows EFI block from within linux? There is a copy of bootmgfw.efi present in a backup location.
Or maybe /dev/sda1 is where the answer lies? It is a System_Reserved windows primary partition that can be flagged as boot.
Some additional information:
$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-28-generic
Found initrd image: /boot/initrd.img-5.4.0-28-generic
Found linux image: /boot/vmlinuz-5.4.0-26-generic
Found initrd image: /boot/initrd.img-5.4.0-26-generic
Adding boot menu entry for UEFI Firmware Settings
done
(What's the deal with 5.4.0-28 AND 5.4.0-26, above?)
$ sudo parted -l
Model: ATA ST1000DM003-1CH1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary ntfs
2 106MB 506GB 506GB primary ntfs
3 506GB 506GB 512MB primary fat32 boot, esp
4 506GB 1000GB 494GB extended
5 506GB 516GB 9999MB logical linux-swap(v1)
6 516GB 1000GB 484GB logical ext4
KDE Partition Manager:
/dev/sda1 ntfs Primary Not mounted System_Reserved 100MB boot flag not set, can be set (enabled).
/dev/sda2 ntfs Primary mounted Windows 10 471GB boot flag not set, cannot be set (disabled).
/dev/sda3 fat32 Primary Not mounted EFI created during linux install 488MB boot flag set, can be unset (enabled).
/dev/sda4 extended Not mounted 460GB boot flag not set, can be set (enabled).
/dev/sda5 linuxswap Logical mounted "none" linuxswap 9.31GB boot flag not set, cannot be set (disabled).
/dev/sda6 ext4 Logical mounted "/" kubuntu 20.04 451GB boot flag not set, cannot be set (disabled).
Any insight would be appreciated. Thanks
Paul