2

I was formatting a 320GB Seagate HDD from NTFS TO ext4 when there was a power outage. When the power was restored my PC no longer recognized the HDD. I used the Terminal command cat /proc/partitions while the HDD was PLUGGED and the output of that is

major   minor #blocks   name
 8        0   244198584 sda
 8        1   241119232 sda1
 8        2           1 sda2
 8        5     3077120 sda5
11        0     1048575 sr0
11        1     1048575 sr1
 8       96   312571224 sdg
 8       97   312568832 sdg1

And the output for the command cat /proc/partitions when the HDD is UNPLUGGED

major   minor  #blocks  name

 8         0  244198584 sda
 8         1  241119232 sda1
 8         2          1 sda2
 8         5    3077120 sda5
11         0    1048575 sr0
11         1    1048575 sr1

The sdg and sdg1 indicates that it sees my suspect HDD drive. What should I do to get access to my external HDD? Any sort of help is totally appreciable.

Tintin
  • 130
user257667
  • 21
  • 2
  • Trying laying down a new MBR/GPT partition table on the drive (this will wipe the drive) and make it ready to create a new ext4 partition. – heynnema Mar 30 '19 at 18:31

1 Answers1

-1

From reading your question I assume or contemplate that bad blocks were created from the sudden shutting down of the processes going on in the HDD. To solve it you can do

fsck /dev/sdg

Or you can even analyze the bad blocks that were created with the command

badblocks -v /dev/sdg (not recommended according to the man page)

For any further guidance or help please refer to the following site https://www.tecmint.com/check-linux-hard-disk-bad-sectors-bad-blocks/

Tintin
  • 130
  • From the badblocks man page... it is strongly recommended that users not run badblocks directly, but rather use the -c option of the e2fsck and mke2fs programs.. – heynnema Mar 30 '19 at 18:27
  • Thanks for bringing it to my notice. I made my correction to the answer – Tintin Mar 30 '19 at 18:32
  • Best to remove the badblocks example, and replace it with the proper e2fsck example... sudo e2fsck -fck /dev/sdg1 or sudo e2fsck -fcck /dev/sdg1. Also, the fsck should be sudo fsck -f /dev/sdg1. – heynnema Mar 30 '19 at 18:38