How restore Grub after Windows10 update
Have XUbuntu 20.04 and Windows-10 in a duel boot configuration. Both OS working well for about 6 months. Boot default was set to Windows-10. Used MBR rather than EFI for boot (12 yr old motherboard but still had UEFI option). Windows-10 update removed Grub and apparently formatted the boot & other partitions ntfs?
I'd like to get Grub back so I can boot into Windows at least. Should Grub be in the /dev/sda1 partition; which is currently formatted ntfs?
I can boot to a Xubuntu 20.04 DVD and run GParted. If I just try to install Grub I get a "install device isn't specified" error.
When I boot from the XUbuntu DVD I can't find my old Linux partitions. I plan to get a 2nd harddrive & put XUbuntu on that so it doesn't get overwritten again.
Any help would be greatly appreciated!
Results from TestDisk scans of /dev/sda
Results from a deeper scan of the Linux partition:
Just crawled inside computer & checked. Harddrive is a 1 TB Hitachi mfgd Aug., 2009.
It appears that there are no recovery options available. I don't have a "backup boot sector". I've gone thru the Testdisk documentation and it appears that what I want to do isn't available. That would be to fix the Linux partition EXT4 and add Grub to it. I'm guessing that I can do a clean Linux install from a CD and maybe install Grub there?
Latest update: I decided to reinstall XUbuntu from the "Live CD"; which is neither live nor a CD. It's the XUbuntu 20.04 boot DVD. The "Live CD" wouldn't pick up a wireless Network, but I plugged in a wire & it worked fine. I selected the custom install option and it picked up & installed to it's previous 142 GB partition. There was no keyboard at boot, thus I had to default to XUbuntu OS. After boot I was able to have some keyboard commands and I did the apt-upgrade & changed my Grub to load Windows. Special characters don't work so I have to access Stack Exchange from a cellphone.
At the Windows-10 boot the PC picked up that it was 86% thru it's update and it completed this. It was then able to boot Windows normally and all my files & data were there.
I'm sure I can eventually get the keyboard working and boot to XUbuntu. My concern is that this not happen in the future again. I think I have 2 options.
- Change my boot from MBR to UEFI. This seems a bit complex to do.
- Buy a second 2TB HDD and install XUbuntu & all it's data there. MBR would be on drive #1 (1 TB) but the data on drive #2. During a Windows update I could disconnect or protect drive #2. This seems like the easier solution.
I'd like to thank oldfred for his many comments and helpful suggestions. It allowed me to work thru the various recovery methods even tho I wasn't quite able to get GParted, gpart, or TestDisk to recover my Linux partition. The Linux swap partition was unaffected as you can see.
Windows in BIOS mode, is known to update partition table and "forget" to include a Linux logical partition. Data & partition is still there, but you have to update partition table to include ext4 partition and then you can reinstall grub. Without partition grub has nothing to boot.
You can use parted rescue or testdisk
Parted rescue seems easier than testdisk
'Upgraded' to Windows 10 on dual boot, and can't boot to Ubuntu partition
https://www.gnu.org/software/parted/manual/parted.html#rescue
http://www.cgsecurity.org/wiki/TestDisk
Windows 7 to Windows 10 MBR partition missing
http://ubuntuforums.org/showthread.php?t=2288988
http://ubuntuforums.org/showthread.php?t=2290190