I am a fairly new user to Xubuntu. I had it installed a few days ago as a dual boot beside my windows 10.
I installed it inside of a extended portion of my disk (1TB WD - MBR). It originally had 5 drives: C:, D: (Audio), E: (Files), F: (Video) and G: (Games). Out of these 5, only 3 were marked as part of the extended drive which I can't remember exactly. The only thing I remember is inside of Windows 10 Disk Partition tool, the last 3 were inside of a green/blue box marked as extended partition. It had some free space of around 105GB and I decided to install Xubuntu in it. I had to runsudo grub-install /dev/sda to install grub because it was not showing up.
I completed the installation from a bootable live pendrive and was using it without any issues up until last night. I ran the sudo apt-get upgrade && sudo apt-get update and then shut down the laptop using Shut down option in xubuntu menu.
Today when I tried to start my laptop it showed me a black screen with GRUB error. It was saying: Error: no such partition. Entering grub rescue... grub rescue>
I still had the live bootable pendrive so I am currently inside of a live boot. I tried to fix the partition using ChatGPT's help. But when I ran the command sudo fdisk -l it didn't show my xubuntu partition which was /dev/sda8 and /dev/sda9 (swap partition).
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10JPVX-75J
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xf8fe467f
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT
/dev/sda2 1026048 275777535 274751488 131G 7 HPFS/NTFS/exFAT
/dev/sda3 275777536 695007840 419230305 199.9G 7 HPFS/NTFS/exFAT
/dev/sda4 695009278 1953521071 1258511794 600.1G f W95 Ext'd (LBA)
/dev/sda5 900012704 1217043824 317031121 151.2G 7 HPFS/NTFS/exFAT
/dev/sda6 5512009135 9806976429 4294967295 2T ff BBT
Partition 4 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
In panic, I asked search online but couldn't find any solutions. I turned to chatGPT and with it's instruction I installed TestDisk. After I ran it from terminal it showed:
The harddisk (1000 GB/931GiB) seems too small! (<1297GB/1208GiB)
Check the harddisk size: HD jumper settings, BIOS detection
The following partition can't be recovered:
Partition: HPFS - NTFS
Start: 121601 57 56
End: 167764 51 46
Size in sectors: 580958208
and after using Quick Search it showed the following ones after a long time of scanning:
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63
Partition Start End Size in sectors
>D HPFS - NTFS 0 32 33 63 221 30 1024000 [System Reserved]
D HPFS - NTFS 63 221 31 17166 91 13 274751488
D HPFS - NTFS 17166 91 14 43262 83 21 419231744 [Files]
D Linux 43262 83 22 54204 29 33 175779840
D Linux Swap 54204 62 3 56023 7 48 29218816
D HPFS - NTFS 56023 50 60 75757 120 60 317031121 [Audio]
D HPFS - NTFS 75757 121 61 101865 207 22 419430400 [Video]
D HPFS - NTFS 85438 64 3 121601 57 56 580958208
I tried accessing the files using p to list files I could see most drives except for Linux and the last one D HPFS - NTFS 85438 64 3 121601 57 56 580958208. For these two instead of listing the files it showed Can't open filesystem. Filesystem seems damaged.
By process of elimination I can guess the last one is the G: Games drive. I tried the following combination of selecting drive types to recover but I kept getting Bad structure warning.
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63
Partition Start End Size in sectors
P HPFS - NTFS 0 32 33 63 221 30 1024000 [System Reserved]
P HPFS - NTFS 63 221 31 17166 91 13 274751488
>L HPFS - NTFS 17166 91 14 43262 83 21 419231744 [Files]
P Linux 43262 83 22 54204 29 33 175779840
L Linux Swap 54204 62 3 56023 7 48 29218816
L HPFS - NTFS 56023 50 60 75757 120 60 317031121 [Audio]
L HPFS - NTFS 75757 121 61 101865 207 22 419430400 [Video]
D HPFS - NTFS 85438 64 3 121601 57 56 580958208
Structure: Bad. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable P=Primary L=Logical E=Extended D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
Enter: to continue
NTFS, blocksize=4096, 214 GB / 199 GiB
I tried many times but it won't let me select the E=Extended option for any of the drives. I didn't get the warning if I selected them in this way: (Excluding the Files drive)
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63
Partition Start End Size in sectors
P HPFS - NTFS 0 32 33 63 221 30 1024000 [System Reserved]
P HPFS - NTFS 63 221 31 17166 91 13 274751488
D HPFS - NTFS 17166 91 14 43262 83 21 419231744 [Files]
P Linux 43262 83 22 54204 29 33 175779840
L Linux Swap 54204 62 3 56023 7 48 29218816
L HPFS - NTFS 56023 50 60 75757 120 60 317031121 [Audio]
L HPFS - NTFS 75757 121 61 101865 207 22 419430400 [Video]
>D HPFS - NTFS 85438 64 3 121601 57 56 580958208
But I am scared to continue fearing I will mess something more. I don't want to lose data in Games drive. I can sacrifice Linux and Linux Swap if needed be. I didn't know a simple update and upgrade would destroy my files like this. Please I need urgent help!