0

I have an external 1TB hard drive which contains a corrupted file system. I cannot format it in windows anyway. I tried command prompt, diskpart and many 3rd party softwares. I get "Data Error (Cyclic Redundancy Check)" error in some stage.

I learnt it has become RAW.

So I am wondering if I could format (NTFS) it using Linux. I have a ubuntu 18.04 guest os in my virtual box.

I really appreciate someone's help in this regard as I am novice to Linux.

EDIT:

S.M.A.R.T. information output when I run following command

sudo smarctl -d sat -a /dev/sdb | less

Output

SMART overall-health self-assessment test result: PASSED

there were more details of course like device name and id etc...

Tried to Repair the partition table and file system with following commands which gave errors. I guess that's because of the file system (RAW)(Not FAT or linux file system)

sudo dosfsck -a /dev/sdb
sudo e2fsck -cfk /dev/sdb

Result:

Read 512 bytes at 0:Input/output error
e3fsck: Input/output error while trying to open /dev/sdb

Wiped the first mibibyte using this command.

sudo mkusb-nox wipe-1

Output:

Wiping the first megabyte (Mibibyte) of /dev/sdb ... :
gpt_zap: done
< /dev/zero pv | dd bs=4096 count=256 of=/dev/sdb
please wait for sync (flushing file system buffers to the device)
until 'Done' is written ...
256+0 records in[3.42KiB/s] [ <=>
256+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00294777 s, 356 MB/s
1.00MiB 0:00:37 [27.4KiB/s] [ <=>
Syncing the device ...
Done :-)

And now the hdd is displayed on GParted but cannot create a partition table. An input/output error comes.

  • You can try creating a new partition table: Install and run gparted, then chose the correct drive on the upper right dropdown menu. Then go to Device -> Create Partition Table ... – pLumo Jul 04 '18 at 14:40
  • What did you try to do in Diskpart? – Paul Benson Jul 04 '18 at 16:10
  • @PaulBenson I tried to clean and format the disk using Diskpart. But it didn't work. It lists the disk but no volume for the hdd. – amsandun Jul 06 '18 at 06:48
  • In Diskpart you used the commands, clean, create partition primary and format fs=ntfs quick consecutively and you got an error message? – Paul Benson Jul 06 '18 at 14:53
  • @PaulBenson yes first I cleaned it and it worked well. when I type the command "create partition primary", I get this error. DiskPart has encountered an error: Data error (cyclic redundancy check). See the System Event Log for more information. – amsandun Jul 09 '18 at 04:16
  • Well if you're getting such an error after cleaning the HDD, clearly it's fit for the bin. – Paul Benson Jul 09 '18 at 21:36

1 Answers1

0

Steps

I suggest that you

  • check the S.M.A.R.T. information to make sure that the drive hardware is healthy,

  • try to repair the file system (you did not tell us what is is/was (before Windows started saying it is 'raw'),

  • try to create a new partition table and file system (and if necessary start by wiping the first mibibyte).

Links

S.M.A.R.T. information of HDD and SSD

Repair the partition table and file system of a pendrive

Gparted & maybe wipe the first mibibyte

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • I tried all of them. but still the error remains. I wiped the first mibibyte too. Still I can't do anything with the HDD. I guess it was a normal NTFS drive before. this is not mine actually. – amsandun Jul 06 '18 at 06:53
  • Please tell us what response you get, when you 1. check the smart info; 2. try to repair the file system; 3. try to create a new partition table. What output is there from the software in the three cases? Please help us help you. Otherwise it is hard to understand what is wrong and impossible to give good advice. – sudodus Jul 06 '18 at 09:32
  • @amsandun, Please edit your original question to describe the output from the software in the three cases: Indent each line 4 spaces to render output to a terminal window as 'code'. – sudodus Jul 06 '18 at 09:38
  • I edited the question to put the output of the command above. After I wiped the first mibibyte for the 2nd time, gparted displays the external HDD as unallocated. When I try to create a partition table using GParted, I still get an input/output error. – amsandun Jul 09 '18 at 06:15
  • You should check/repair a file system in a partition, sudo dosfsck -a /dev/sdbm or sudo e2fsck -cfk /dev/sdbn where m is a number (for example 1 and n is another number, for example 2, and b might be another 'drive letter' for example c. – sudodus Jul 09 '18 at 06:25
  • @amsandun, Please reboot the computer. What do you see in gparted after the reboot? Can you select the drop-down menu 'Device -- Create partition table ...' and that way create a partition table? After that you can create partitions. – sudodus Jul 09 '18 at 06:30
  • I rebooted the Virtual Box and again I cannot see /dev/sdb in GParted. I get "input/output error during read on /dev/sdb". I don't think there is any partition in this drive as when I run lsblk command, it shows only as sdb and no any number attached with it. I also ran dmesg command when I plugged in the HDD. I saw the output "critical medium error, dev sdb, sector 0". Could it be any hardware failure in the disk? – amsandun Jul 09 '18 at 06:49
  • @amsandun, /dev/sdb is an external hard disk drive. Are you trying to see it via an operating system in VirtualBox? If the external hard disk drive is connected via USB, there are complications, because of VirtualBox, that can have problems to implement connections via USB. It would be better to create a live Ubuntu system in a USB pendrive or DVD disk, boot the computer from it and run gparted from there. Then you would have 'direct' access to USB, and it is more likely, that you would be able to manage to create the partitions you want on the external hard disk drive. – sudodus Jul 09 '18 at 06:57
  • I will try it and update this thread ASAP @sudodus. Thanks for the advises. – amsandun Jul 09 '18 at 09:42
  • So I tried that as well with no luck. got the same errors. I think there maybe a severe hardware failure in the disk. I don't have any option now but to let go. – amsandun Jul 11 '18 at 16:35
  • @amsandun, I'm sorry to read that, but I think you are right. – sudodus Jul 11 '18 at 21:36