fsck -fy /dev/sda1

dumpe2fs /dev/sda1|grep superblock查看 备份的superblock

root@Defcon:/tmp# dumpe2fs /dev/sda1|grep super

dumpe2fs 1.42 (29-Nov-2011)

Filesystem features:      ext_attr resize_inode dir_index filetype sparse_super

  Primary superblock at 1, Group descriptors at 2-2

  Backup superblock at 8193, Group descriptors at 8194-8194

  Backup superblock at 24577, Group descriptors at 24578-24578

  Backup superblock at 40961, Group descriptors at 40962-40962

  Backup superblock at 57345, Group descriptors at 57346-57346

  Backup superblock at 73729, Group descriptors at 73730-73730

  Backup superblock at 204801, Group descriptors at 204802-204802

  Backup superblock at 221185, Group descriptors at 221186-221186

然后执行 fsck -b 8193 /dev/sda1,如果成功,尝试mount 系统,如果失败,继续使用下一个备份superblock

mount sb=8193 /dev/sda1 /mnt

如果以上步骤都失败,需要用dd 备份坏掉的磁盘到新的硬盘上

dd conv=noerror if=/dev/sda of=/mnt/recovery/sdap_w_picpath.dd

然后执行

fsck /mnt/recovery/sdap_w_picpath.dd

如果是一个单独的分区,可以这样

mount -o loop /mnt/recovery/sdap_w_picpath.dd /mnt/sdap_w_picpath

如果是多个分区中的一个坏掉,可以这样

fdisk -lu /mnt/recovery/sdap_w_picpath.dd

如果是第二个分区柱面从80300开始,单位是512bit,那么总共是80300×512=4113600bit 

那就要这样执行

mount -o loop,offset=41113600 /mnt/recover/sdap_w_picpath.raw /mnt/sdap_w_picpath

然后写一个新磁盘

dd if=/mnt/recovery/sdap_w_picpath.raw of=/dev/sdb