How to restore my superblocks?

by Mokum   Last Updated January 14, 2018 00:02 AM

user@localhost:$ LC_ALL=C sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! 
The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xe4948bbb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

trying to dumpe2fs my /dev/sda1 :

sudo dumpe2fs /dev/sda1 | grep -i superblock

dumpe2fs: Ongeldig magisch getal in superblok tijdens openen van /dev/sda1

[ dumpe2fs: magic number not valid during opening /dev/sda1 ]

How can I repair my superblocks ?

Answers 1

List backup superblocks:

sudo dumpe2fs /dev/sda1 | grep -i backup

then use backup superblock, 32768 just an example, try several

sudo fsck -b 32768 /dev/sda1

One user could not get partition unmounted (may have needed swapoff), but used another live distro

Only the newer fdisk in 16.04 will correctly show gpt partitions. Use parted or gdisk.

sudo parted /dev/sda unit s print

sudo gdisk -l /dev/sda
July 08, 2016 14:48 PM

Related Questions

Force format an external HDD

Updated June 18, 2015 01:01 AM

Formatting external and giving 755 rights?

Updated July 28, 2017 16:02 PM

SSD total capacity <> free space + used space

Updated August 05, 2017 00:02 AM