A couple of months ago I suffered a bad superblock error in my hard drive. The hard drive in question made clicking sounds and refuses to boot. I ran some terminal checks and got the bad superblock error. I have multiple hard drive devices so I booted using the other devices by changing BIOS.
But how do you repair a bad superblock?
A superblock is a summary of data kept in your hard drive. Like a table of contents if I'm not mistaken. The ext4 file system in Linux keeps a backup of the superblock somewhere else in the hard drive. Check where that is - find the location.
$sudo mke2fs -n /dev/device?/
where the device? is the hard drive you want to repair. It will output a group of numbers separated by commas. These are superblock locations.
You must restore the backup.
$sudo e2fsck -y -b output_number /dev/device?/
where the output_number is one of the group of number listed from the operation above. The device? is the hard drive you want to repair. The -y flag or switch just gives a default 'yes' answer to the interactive mode of the command.
But how do you repair a bad superblock?
A superblock is a summary of data kept in your hard drive. Like a table of contents if I'm not mistaken. The ext4 file system in Linux keeps a backup of the superblock somewhere else in the hard drive. Check where that is - find the location.
$sudo mke2fs -n /dev/device?/
where the device? is the hard drive you want to repair. It will output a group of numbers separated by commas. These are superblock locations.
You must restore the backup.
$sudo e2fsck -y -b output_number /dev/device?/
where the output_number is one of the group of number listed from the operation above. The device? is the hard drive you want to repair. The -y flag or switch just gives a default 'yes' answer to the interactive mode of the command.
Comments