Yikes, it's been a long day. I had a dual boot of Windows 10 and Ubuntu and everything was good but I was running out of space in Ubuntu. I attempted to shrink my windows 10 partition but because of "unmovable" files I was not able to shrink it. Searched forums and I found the utility "AOMEI Partition assistant"... it shrank my windows 10 partition no problem, but now when I boot I just get a grub> prmompt. If I had esc during boot I can choose to boot into windows 10 which seems to work fine. I opened up the partition manager in windows 10 and to my horror my Ubuntu partition is simply gone and it's space and the space I freed from Windows 10 just says "Unallocated space". Is there any chance my data is still lurking in there somewhere? Any hope for repair? I'm looking at losing 100+ hours of work. I'm going to lie on the floor and cry for a while.
1 Answers
I had the exact same problem and solved the problem in the following way.
Create a live USB with an Ubuntu version, e.g. Ubuntu 20.04, and run Ubuntu on that USB (see https://linuxhint.com/run_ubuntu_usb_stick/ for details).
Open a terminal and look at the current partition table:
sudo parted /dev/sda unit s print //this printed the current partition tableIn case your partition is still missing, you can rescue it by using parted, but you need to know the Start and End Sector of your missing partition. Therefore install TestDisk:
sudo apt update sudo apt install testdiskIf this is not working, make sure that in Software & Updates -> Ubuntu Software the Community-maintained free and open-source software (universe) option is ticked and try it again.
Run TestDisk:
sudo testdiskChose Create, then the hard disk where your partition is missing, chose the partition table which is automatically detected and select Analyze. It will the print a list of partition which should include your lost partition. Write down the Start and End Sector of your recovered partitions. (visit https://www.tecmint.com/install-testdisk-data-recovery-tool-in-linux/ for more details)
Then use parted to rescue the lost partition by using the Start and End Sector information. Repeat the process if you have several lost partitions (e.g. root and swap).
sudo parted unit s rescue Start? //Here I entered in start section End? //Here I entered in end sectionThen your partition(s) should be recovered and you can use GParted to allocate the freed space to your partition (visit https://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/ for more details). Keep working on the live USB, as a partition in use can't be modified in any way.
- 122,292
- 133
- 301
- 332