Problem:
Since about one week ago, my Ubuntu system encounters various severe and strange problems. Sometimes the whole system suddenly freezes. I have to push the power button to shut down the machine by brute force. Sometimes, all files suddenly become read-only. I have to reboot the machine, and then it seems normal, but might have the above problems later. When I am trying to shut down Ubuntu, sometimes a black screen shows message about disk error.
Attempts to Fix:
I think my WD 1T hard drive has some errors that needed to be fixed. So I run the following commands in Ubuntu installation disc or Ubuntu in another hard drive, after unload the hard drive in problem. However, I cannot fix the problem. In particular, when I try to run sudo e2fsck -b 8193 /dev/sda1
, there is error message saying "invalid argument". The details are as follows,
1) first of all, fdisk -l
shows the following message (copy only the part relevant to /dev/sda1
I am trying to fix):
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: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 1953525167 976762583+ ee GPT Partition 1 does not start on physical sector boundary.
2) run sudo fsck.ext4 -ck /dev/sda1
, trying to fix the hard drive
e2fsck 1.42.5 (29-Jul-2012) ext2fs_open2: Bad magic number in super-block fsck.ext4: Superblock invalid, trying backup blocks... fsck.ext4: Bad magic number in super-block while trying to open /dev/sda1 The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 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
3) sudo e2fsck -b 8193 /dev/sda1
, trying to recover super block from block 8193
e2fsck 1.42.5 (29-Jul-2012) e2fsck: Invalid argument while trying to open /dev/sda1 The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 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
4) sudo mke2fs -n /dev/sda1
, to locate other backup blocks
mke2fs 1.42.5 (29-Jul-2012) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=4 blocks, Stripe width=4 blocks 48768 inodes, 194560 blocks 9728 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 24 block groups 8192 blocks per group, 8192 fragments per group 2032 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729
5) redo step 3 for all other superblock backups returned in 4. The same error is shown as step 3.
PS: according to comments, I paste the output of gdisk
and parted
as follows:
sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.5 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Disk /dev/sda: 1953525168 sectors, 931.5 GiB Logical sector size: 512 bytes Disk identifier (GUID): 6166B96C-AD2A-4EF1-8967-1ACFA23FE2E4 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 1953525134 Partitions will be aligned on 2048-sector boundaries Total free space is 3437 sectors (1.7 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 391167 190.0 MiB EF00 2 391168 890879 244.0 MiB 0700 3 890880 1953523711 931.1 GiB 8E00
`sudo parted -l `
Model: ATA WDC WD10EZEX-00R (scsi) (note: this is the disk in problem) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 200MB 199MB fat32 boot 2 200MB 456MB 256MB ext2 3 456MB 1000GB 1000GB lvm Model: ATA SAMSUNG HD103SJ (scsi) (note: this is another normal disk) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 30.0GB 30.0GB primary ext4 4 30.0GB 1000GB 970GB extended lba 6 30.0GB 983GB 953GB logical ext4 5 983GB 1000GB 16.9GB logical linux-swap(v1) Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/ubuntu-root: 983GB Sector size (logical/physical): 512B/4096B Partition Table: loop Number Start End Size File system Flags 1 0.00B 983GB 983GB ext4 Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/ubuntu-swap_1: 16.9GB Sector size (logical/physical): 512B/4096B Partition Table: loop Number Start End Size File system Flags 1 0.00B 16.9GB 16.9GB linux-swap(v1)