0

fsck disk cannot run due to "Bad magic number in super-block" Disk is an external one (WD passport HDD), connected through usb port. It is mounted normally. I can write / delete / play / run files normally (except in a particular directory).

I would like to run fsck that may fix that problem. However, i confronted that problem.

Using sudo e2fsck /dev/sdc, with different numbers didnt work.

What to do?

"sudo fsck /dev/sdc"

elias@eliasc:/home$ 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 fdisk -l

  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

UPDATE: I Posted the solution and it was deleted. What I found out was that the linux utils of ntfs (and much more) was unable to fix my disk. Therefore, I created a virtual environment of VirtualBox running Windows enterprise Free trial edition. I run Checkdsk and my problem was fixed.

UPDATE 2: After fixing NTFS, i formatted to Ext4, entire disk. Bye bye NTFS problem. As I read, it does not need defragmation as Ext4.

  • 1
    If a NTFS file system on that drive, would be better to use Windows tools to try to fix. – crip659 Jul 14 '20 at 18:56
  • How I can see if it is a NTFS? – Estatistics Jul 14 '20 at 19:00
  • 1
    Microsoft basic data kind of points to that idea and fsck not seeing any extx types. Can Ubuntu see anything on it? Does it show as being mounted in 'files'. – crip659 Jul 14 '20 at 19:08
  • Disks Utility says NTFS. However, partition is GPt. It is external usb HDD. It is mounted normally, without problem. Howeve,r i would like to check its filesystem integrity. I cannot access a directory. I read that throught virtual environment, i can run windows. However, I dont like to download "hacked" progs. I do like to do it through linux. What options exist? – Estatistics Jul 14 '20 at 19:18
  • Is important data on it you want to keep, if not just format the whole drive to ext4 and try again. If data on it you want to keep, can download windows from microsoft, they only bug you after 30 days or something. – crip659 Jul 14 '20 at 19:30
  • I will prefer to search for another option if it exist, through linux. Thank you however. – Estatistics Jul 14 '20 at 19:35
  • 2
    Here is link for similar problem. https://askubuntu.com/questions/1167889/bad-magic-number-in-superblock-external-hdd – crip659 Jul 14 '20 at 20:08
  • Your running fsck on the disk instead of the partition... If it's NTFS make sure you have the fsck.ntfs helper – Ginnungagap Jul 15 '20 at 11:08
  • @Ginnungagap I run fsck.ntfs. Didnt help. It showed that things are ok which it was not the case. – Estatistics Jul 15 '20 at 12:43

1 Answers1

1

I assume there's a confusion between disk (partition table) and partition with a file system.

You can of course format an entire disk using a given file system but that's rarely the case in typical scenarios.

fsck will automatically invoke the proper helper when pointed at the appropriate partition. It does that by checking the magic numbers at the beginning of the partition to determine what type it is. So if your partition if formatted with NTFS, it will automatically invoke fsck.ntfs.

In your question, you run fsck on /dev/sdc directly which is as you say is GPT, for GUID Partition Table (ie. not a partition but a collection of partitions). I guess sdc1 is your NTFS partition instead of sdc which is your entire disk (which does not contain a file system but one or multiple partitions with their own file system, hence the bad magic).

mivk
  • 5,312
  • Not, exactly. Gparted shows a disk, with a single partition. There were not multiple partitions. Now, I formatted the disk to ext4. So, bye bye ntfs problem! – Estatistics Jul 16 '20 at 13:44
  • 1
    Just because your partition table contains a single partition does not mean it is not a partition table. Whether ext4, NTFS, btrfs, ZFS or any other file system, unless you format the disk directly (which I'm not sure you can do from GParted), you will still have a partition table with a partition with a file system. – Ginnungagap Jul 16 '20 at 14:27