5

It's already some time that my HP250G3 computer didn't want to start up, so I installed Ubuntu 16.04 LTS on my flash disk to recover some data before resetting the hard disk (hard reset + reinstall of windows 8.1).
Then I found out that my HDD is in a giant mess. When I open the terminal and enter sudo fdisk -lu /dev/sda it shows me this:

terminal

And when I type sudo parted -l I get this:

Model: ATA ST750LM022 HN-M7 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number  Start  End    Size   File system  Flags
 1      0.000  750GB  750GB  ntfs

The only problem with this is that my hard disk had around 500GB memory, not 1800GB. So I decided to check what Disks say:

Disks

And here is what GParted says:

GParted

Now, what can I do to save at least the most important data (~200MB)? Can I solve this by resizing the partitions? It's crucial for me, so please help.

I'll give any missing information.

  • You mentioned that the computer had Windows 8.1. Is the computer booting in BIOS mode or UEFI mode? If it is booting via UEFI, ignore the output of fdisk -l and plese post the output of sudo parted -l. – Andrea Lazzarotto Jun 26 '16 at 18:16
  • PS: the title is kinda misleading. It seems to me that you are discussing about recoverying data, not resizing partitions. The data-recovery tag should be added as well, if it is so. – Andrea Lazzarotto Jun 26 '16 at 18:17
  • Related: askubuntu.com/questions/463076/… – Elder Geek Jul 6 '16 at 22:02
6
+50

my hard disk had around 500GB memory, not 1800GB

I am not sure where you got those numbers from, but the size of your hard drive is 750 GB.

what can I do to save at least the most important data (~200MB)?

You probably just need to recover the partition table. Most likely, the file system is not corrupted and you only have to tell the system how to find it.

However, it might also be that the file system is corrupted. I will discuss both alternatives.

Can I solve this by resizing the partitions?

No, absolutely not. Do not attempt to mess up the partitions before restoring the data.

If The File System is Fine

While your question is about NTFS and this one was about exFAT, my answer still applies. I've adapted the instructions to your specific scenario.

The point is to connect an external hard drive where you will copy your files. Install TestDisk and run it on the device:

sudo apt install testdisk
sudo testdisk /dev/sda

If you cannot install it, open the Software & Updates program and verify that all repositories are activated. Some of them may not be by default.

As I wrote in this answer on the Unix & Linux Stack Exchange website:

The essential steps are:

  • scanning the drive
  • selecting the partition
  • pressing P to show the files
  • copying the files with C

If pressing P results in an error message, then the file system is corrupted.

If The File System is Corrupted

Disclaimer: I am the developer of RecuperaBit.

If the file system is corrupted you need to use a program able to perform forensic file system reconstruction. I actually wrote one for NTFS which is called RecuperaBit.

Briefly, the steps would be:

  • clone the drive (/dev/sda) to an image file (optional, but highly recommended)
  • run RecuperaBit either on the drive (/dev/sda) or on the bitstream copy
  • type recoverable at the RecuperaBit prompt
  • recover all files with the following commands (replace [X] with the partition number found in the previous step):

    restore [X] 5
    restore [X] -1
    

I provided detailed guidance with an example in this answer.

  • Wow! Now time to try this before I hit the check mark! – RudolfJelin Jun 26 '16 at 18:50
  • Oh... I got an error at the first command: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package testdisk – RudolfJelin Jun 26 '16 at 18:50
  • 2
    Please open the Software & Updates program and verify that all repositories are activated. Some of them may not be by default. – Andrea Lazzarotto Jun 26 '16 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.