LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to repair a HDD and am getting this error message (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-repair-a-hdd-and-am-getting-this-error-message-4175631309/)

Jsonic2634 06-05-2018 05:22 PM

Trying to repair a HDD and am getting this error message
 
e2fsck /dev/sda
e2fsck 1.42.13 (17-May-2015)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sda

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>



How do I fix the super block, also, i am getting i/o errors when attempting to format the drive. the drive is a internal 320gb hdd.

RandomTroll 06-05-2018 11:36 PM

One e2fscks a volume, not a drive. What does
Code:

e2fsck /dev/sda1
return? (or whatever partition you want to check).

mrmazda 06-06-2018 02:39 AM

/dev/sda1 could be a swap partition, so if what RandomTroll wrote returns another error, do e2fsck /dev/sda2. You can first run
Code:

fdisk -l /dev/sda
to see which partition is swap.

FlinchX 06-06-2018 11:58 PM

fsck does not fix hard drives, it attempts to fix filesystem errors. A filesystem is a higher, logical layer on top of a hard drive hardware device. If you're getting i/o errors, your drive might be broken and you may need to replace it. If you need to learn more about its status, I suggest looking into smartctl.

ondoho 06-07-2018 01:46 PM

additionally, fsck should not be used on mounted filesystems.
https://serverfault.com/questions/29...nted-partition

smallpond 06-07-2018 02:33 PM

Also, the filesystem is on a block device which could be a partition, like sda1, or it could be on a logical volume. lsblk will list all block devices.


All times are GMT -5. The time now is 08:47 PM.