In linux, fsck gpt external hard disk fail

2.1k Views Asked by At

In linux, fsck gpt external hard disk fsck fail to check a gpt partitioned external hdd.

What to do? I cannot fsck the filesystem of that disk! How I can check my filesystem? What I am doing wrong?

Below is some information on my external HDD.

  elias@eliasc:~$ sudo fdisk -l /dev/sdc
    Disk /dev/sdc: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: 66BAEFE2-F3F9-491C-B40F-C964F28AE483
    
    Device     Start        End    Sectors   Size Type
    /dev/sdc1   2048 1953456127 1953454080 931.5G Microsoft basic data

 elias@eliasc:~$ sudo fsck  /dev/sdc
    fsck from util-linux 2.31.1
    e2fsck 1.44.1 (24-Mar-2018)
    ext2fs_open2: Bad magic number in super-block
    fsck.ext2: Superblock invalid, trying backup blocks...
    fsck.ext2: Bad magic number in super-block while trying to open /dev/sdc
    
    The superblock could not be read or does not describe a valid ext2/ext3/ext4
    filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
    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 <device>
     or
        e2fsck -b 32768 <device>
    
    Found a gpt partition table in /dev/sdc

sudo  gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): i
Using 1
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 593BA7FF-C46F-4A0E-BAAF-FF505C0425F8
First sector: 2048 (at 1024.0 KiB)
Last sector: 1953456127 (at 931.5 GiB)
Partition size: 1953454080 sectors (931.5 GiB)
Attribute flags: 0000000000000000
Partition name: 'MyPassport'

Command (? for help): v

No problems found. 4029 free sectors (2.0 MiB) available in 2
segments, the largest of which is 2015 (1007.5 KiB) in size.
1

There are 1 best solutions below

0
On

As of 15Jul2020, There is no option to check filesystem integrity of a Hard disk formatted as NTFS under Linux.

What I did?

  • I downloaded the free trial of Windows Enterprise as ISO
  • sudo apt-get remove Virtualbox virtualbox-dkms virtualbox*
  • Install the latest Virtualbox from here
  • Download the matched version of Virtualbox extpack
  • Add to disk group, me, as user, due to access deny hard disk error
    • sudo usermod -a -G disk $USER
    • sudo usermod -a -G vboxusers $USER
  • Run sudo /sbin/vboxconfig
  • Run VirtualBox, and add Virtualbox extpack at File -> Preferences -> Extentions
  • Restart your Computer
  • Create a link to your physical Hard Disk which is NTFS (either usb or not) using VBoxManage internalcommands createrawvmdk -filename "</path/to/file>.vmdk" -rawdisk /dev/sdX
  • Create Machine -> New -> Windows 10 (64bit) (whatever match) -> Create a Virtual Disk
  • Attach the Downloaded Windows Enterprise Free trial ISO image
  • At your newly created Virtual Windows Image --> preferences -> Storage -> attach the vmdk image of your ntfs hdd
  • It may fail. Dont worry. To me failed too. I refer to it, because I found it. It may work for you.
  • Go to Virtual Windows Image --> preferences -> USB, check USB 3, add your NTFS HDD
  • Run your Virtual "Windows Enterprize Free Trial" machine.
  • Click Continue, Repair your computer (at left down side), Troubleshooting, Run Command Prompt
  • Go to your disk by writing eg. C:
  • Check that it is your disk somehow eg. dir
  • Run chkdsk /f when you are on your disk

This process fixed my NTFS filesystem that it was fault. I hope it helpt you too.

If you find any easier solution, only under Linux, please post it.