I have a dual boot with Ubuntu and Windows 10. I have only booted into Windows a handful of times over the last 2 years or so. I left Windows logged in overnight and it decided to update. The next morning I was greeted with grub rescue.
Following the instructions of similar questions on here, I went through each partition looking for signs of Linux using ls
and then ls (hd#,msdos#)
for each partition shown. Nothing. I then used a bootable Windows USB drive to get to the command prompt and tried the following. I don't remember if I ran the bcdedit
or bootrec
command first.
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd
This didn't fix anything and I used the Windows startup repair tool to get into Windows. Once in Windows I created a bootable Ubuntu USB drive, and booted into a live Ubuntu session. I ran the recommended function of the Boot-Repair utility and foolishly didn't save the Pastebin link. It completed successfully, but did not fix the Ubuntu boot partition and also broke ability to boot into Windows. I used the bootable Windows USB drive once again to run the startup repair tool to get back into Windows.
From here I ran the testdisk utility which sees the partition, but is unable to recover it. Testdisk partition table backup:
#1611976403 Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63
1 : start= 2048, size= 1124352, Id=07, *
2 : start= 1126400, size=346499072, Id=07, P
3 : start=347625472, size=104857600, Id=83, P
4 : start=452483072, size=524288000, Id=05, E
(I initially had individual screenshots for each step below but then realized I cannot post more than 8 links without enough reputation points so here is the whole album https://i.stack.imgur.com/iIrlc.jpg )
Windows Disk Manager sees this as free space. (see screenshot)
Gparted gives an "invalid partition table --wrong signature" error when loading. If I ignore this error it shows unknown/unallocated spaces. (see screenshot)
fdisk -l
returns similar results (see screenshot)
If I understand correctly, sbd5 is the result of moving partitions around in the past? TestDisk also has a "The hard disk seems too small" error (see screenshot).
The Disk tool shows an extended partition 4 alongside Free space. However, the sizes are incorrect. Windows disk management, GParted, and fdisk correctly show sizes of 250GB and 50GB for the two inaccessible partitions, the Ubuntu disk tool shows 268GB and 58GB. (see screenshot)
TestDisk Analyse shows: https://i.stack.imgur.com/UckRi.jpg
TestDisk Quick Search results in a partition that cannot be recovered and an error that the hard disk seems too small (remnants of adjusting partition sizes in the past?):
Continuing to the next screen:
Quick search results:
I can view files in the FAT32 LBA and Linux partitions, though the Linux partition is obviously missing a lot of files.
The next screen displays "No partition found or selected for recovery." After the deeper search I see the same "hard disk seems too small", "following partition can't be recovered", and warning about the number of heads per cylinder as the quick search (screenshots above), then:
The first Linux partition is the same as one shown in the quick search, the others all say "No file found, filesystem may be damaged."
If I go to geometry and change the number of heads to 128 as suggested, I see the following in Analyze.
And then get the same results as before with the quick search and deep search, except for warnings regarding a mismatch in number of heads/cylinder.
I booted back into the Ubuntu live instance and reran Boot-Repair, but just ran the Boot-Info option this time since I figured that running the boot-repair again would just have the same results as above (breaking the windows boot and having to rerun the Windows repair utility - potentially making matters worse?), but this time I saved the Pastebin log.
At this point I don't know what else to try. Am I screwed? I have not written any changes to the partition tables with TestDisk nor have I made any changes with fdisk. Is there any way to recover the Linux partition(s) or at least (some of) the data contained within? I was able to create an image of the 250GB partition in question using TestDisk.
sudo sfdisk -d /dev/sda > PT_sda.txt
Parted rescue seems easier than testdisk https://askubuntu.com/questions/665445/upgraded-to-windows-10-on-dual-boot-and-cant-boot-to-ubuntu-partition & https://askubuntu.com/questions/944371/grub-and-ubuntu-disappeared-after-windows-update – oldfred Jan 30 '21 at 22:35parted /dev/sdb unit s print
, it does not find them when I attempt a rescue. I also getError: Invalid partition table on /dev/sdb -- wrong signature d8b2.
I'm not sure what this means and I'm not having any luck finding more details with a search. Full terminal text in pastebin link. https://paste.ubuntu.com/p/c2wqbNvDyK/ – Cheesecycle Jan 31 '21 at 15:38invalid partition table -- wrong signature d8b2
be preventing partition rescue? Do you know anything about this? – Cheesecycle Feb 01 '21 at 16:05