So i installed Ubuntu 20.04 and it wiped my whole data (i had windows 10 and 2 partitions C and D). Now i only have one partition of total hard drive space.Image 1 I want to make 2 partitions reason for i tried using Gparted but the problem i had is that i can't reduce the size of my main partition (minimum size equals maximum size). Is there another way to do it? And is there any chance i can get the data i had in the partition D?
-
Ubuntu installer did what you told it to do, "erase and install...", any other option wouldn't have erased and installed. Now, two notes: (1) the chances a recovering data are very slim but if you wanna try then STOP using that drive and run data recovery software and (2) if, OTOH, you want to make it harder to recover something from it by changing partitions you also can but from a live session as you can't manage partitions that are in use. – ChanganAuto Aug 10 '21 at 18:00
-
1Restore your data from backups. It is no longer accessible except the possibility that files could be found using advanced data recovery tools like photorec or testdisk. In that case you must stop using the disk to avoid further data loss. You will need to reinstall both operating systems. Install Windows first but Ubuntu will need enough unpartitioned free space for the Ubuntu installer to give you the "install alongside Windows" option. – Nmath Aug 10 '21 at 18:11
-
Also see How to resize partitions? – user68186 Aug 10 '21 at 19:39
1 Answers
"I installed Ubuntu 20.04 and it wiped my whole data" – I think ChanganAuto commented on that already – If you left "erase and install" option checked, the installer did just that. Next time – read before you click.
As for spliting the drive – you can't modify partition that is mounted (I assume this is where Ubuntu is installed), and you can't unmount system partition (Ubuntu is using it). You need to boot from USB stick (any Linux, Ubuntu installer will do just fine - use try Ubuntu button, open gparted), and then you will have access to do whatever you want.
As for data recovery – you can't do anything while using your drive. You would need another system (run from USB stick, again any Linux will do), and use scanning tools to see if they can find any removed partitions. I would recomend using testdisk (I had some success with it). There is a simple guide to testdisk: https://www.makeuseof.com/how-to-recover-deleted-files-on-linux-using-testdisk/
Keep in mind data recovery is not simple, you might want someone with some experance to look into it. If you mess something up, the damage will be irreversible (it's bad already).
Make sure you've got other storage to copy your files to. Keep in mind this is going to be lengthy operation (several hours). From your screenshot, I would say there's a good chance for total recovery, since the aft part of disk appears to be untoughed, but the more you use this drive, the bigger chance of corrupting the data (assuming the D drive was at the aft of the drive). Good luck :-)

- 66