When I boot up my laptop (with only opensuse installed, no other OS on it), I'm greeted with error: failure reading sector 0x802 from 'hd0'.
and get put into GRUB rescue prompt.
I used the original installation USB to boot up a rescue Linux system. This is fdisk - l
output from the rescue shell (the disk is the 1TB HDD that arrived with the laptop, only half of it has been partitioned and in use):
sda1
is the 30 GB partition with Opensuse in it, sda3
is a 350+ GB data partition. Trying fsck /dev/sda1
gives
fsck.ext2: Input/output error while trying to open /dev/sda1
The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem.
This is followed by a suggestion to "try running e2fsck with an alternate superblock" (note: fsck
on sda3
says "clean"). Running dumpe2fsck
as suggested on the Opensuse wiki returns the same error message as above. I tried e2fsck -b <superblock> /dev/sda1
- with superblock as 8193 (said "Bad magic number in superblock"), and with superblock as 32768, which resulted in prompts to fix "Free blocks count", "Directories count", "Free inodes count" in many different groups (with a huge list of "Inode bitmap differences" in-between). But unfortunately, even the latter ultimately says "Error writing block 1 (Input/output error)" and doesn't fix the issue.
The whole saga started when the OS hung mid shutdown, and (in an attempt to save battery life) I force killed it by long-pressing the power button. I have looked under the hood and there doesn't seem to be any cable issues (and the other partitions show up fine anyway). Losing the 30GB OS partition would be an inconvenience, but losing the 380 GB data partition would be a major setback I'd rather avoid. What are the next steps to recover from this error and make the disk usable again?
smartctl
. Typically the only fix for a HDD with defects is a recent backup.sda
, and then useddrescue
to make a complete image ofsda
in your larger storage.ddrescue
can skip over failing blocks quickly to get as much of the data as possible, and then go back and fill in the problematic blocks by retrying over and over again.dd
). This will cause the disk to allocate one of the "spare" sectors for this sector, and then you can usefsck
to restore the superblock from the copy.