I recently connected a pen-drive after many years. When I opened my pen-drive it showed me 'no valid superblock found'. I did some google and tried to fix it.
I tried to use backup superblocks to main superblock by testdisk
(if that's a thing or at-least what i think i did) :)
It became worse, at first my pen-drive was at-least detected by OS and now it does not.
When I run sudo dumpe2fs /dev/sdb
or sudo dumpe2fs /dev/sdb | grep superblock
it shows
dumpe2fs 1.46.5 (30-Dec-2021)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb
Couldn't find valid filesystem superblock.
Found a dos partition table in /dev/sdb
I also ran sudo badblocks -w /dev/sdb
for almost 48hrs on formated pen-drive(unallocated) only to find out it stopped executing after it as there was no input/output shown in iotop
by this command.
According to one answer I found in ask-ubuntu, it asked to run testdisk
. So I performed boot sector recovery and found it of no use (for me at-least).
(Before running testdisk
I first created exFat partition)
(I once also ran testdisk
command on ntfs partition also. I know i messed up :) )
Here is the log file of testdisk(on exFat partition) of which I have no clue of what it says,
Sun Feb 19 16:20:33 2023
Command line: TestDisk
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Linux, kernel 5.19.0-29-generic (#30-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 4 12:14:09 UTC 2023) x86_64
Compiler: GCC 11.2
ext2fs lib: 1.46.5, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.3
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 976773168 sectors
/dev/sda: user_max 976773168 sectors
/dev/sda: native_max 976773168 sectors
/dev/sda: dco 976773168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop4 - 0 B - 0 sectors (RO), sector size=512
Warning: can't get size for Disk /dev/loop5 - 0 B - 0 sectors (RO), sector size=512
Hard disk list
Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - ST500LT012-1DG142, S/N:S3P979G2, FW:0001SDM1
Disk /dev/sdc - 34 GB / 31 GiB - CHS 131449 255 2, sector size=512, FW:1.10
Disk /dev/loop0 - 52 MB / 49 MiB - 102048 sectors (RO), sector size=512
Disk /dev/loop1 - 250 MB / 239 MiB - 489712 sectors (RO), sector size=512
Disk /dev/loop10 - 270 MB / 257 MiB - 528080 sectors (RO), sector size=512
Disk /dev/loop11 - 4096 B - 8 sectors (RO), sector size=512
Disk /dev/loop12 - 290 KB / 284 KiB - 568 sectors (RO), sector size=512
Disk /dev/loop13 - 58 MB / 55 MiB - 113888 sectors (RO), sector size=512
Disk /dev/loop14 - 632 MB / 602 MiB - 1234888 sectors (RO), sector size=512
Disk /dev/loop15 - 66 MB / 63 MiB - 129600 sectors (RO), sector size=512
Disk /dev/loop16 - 48 MB / 45 MiB - 94064 sectors (RO), sector size=512
Disk /dev/loop17 - 52 MB / 49 MiB - 102072 sectors (RO), sector size=512
Disk /dev/loop18 - 58 MB / 55 MiB - 113888 sectors (RO), sector size=512
Disk /dev/loop19 - 252 MB / 240 MiB - 492776 sectors (RO), sector size=512
Disk /dev/loop2 - 311 KB / 304 KiB - 608 sectors (RO), sector size=512
Disk /dev/loop3 - 66 MB / 63 MiB - 129584 sectors (RO), sector size=512
Disk /dev/loop6 - 336 MB / 320 MiB - 656256 sectors (RO), sector size=512
Disk /dev/loop7 - 363 MB / 346 MiB - 709280 sectors (RO), sector size=512
Disk /dev/loop8 - 48 MB / 45 MiB - 94056 sectors (RO), sector size=512
Disk /dev/loop9 - 96 MB / 91 MiB - 187776 sectors (RO), sector size=512
Partition table type (auto): Intel
Disk /dev/sdc - 34 GB / 31 GiB
Partition table type: Intel
Interface Advanced
Geometry from i386 MBR: head=255 sector=2
check_part_i386 failed for partition type 07
get_geometry_from_list_part_aux head=255 nbr=2
get_geometry_from_list_part_aux head=255 nbr=2
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
ntfs_boot_sector
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
filesystem size 1
sectors_per_cluster 0
mft_lcn 0
mftmirr_lcn 0
clusters_per_mft_record 0
clusters_per_index_record 0
Boot sector
Status: Bad
Backup boot sector
Status: Bad
Sectors are identical.
A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
rebuild_NTFS_BS
Search mft stopped: 65536/67036950
Failed to rebuild NTFS boot sector.
ntfs_boot_sector
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
filesystem size 1
sectors_per_cluster 0
mft_lcn 0
mftmirr_lcn 0
clusters_per_mft_record 0
clusters_per_index_record 0
Boot sector
Status: Bad
Backup boot sector
Status: Bad
Sectors are identical.
A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
Boot sector Backup boot sector
0000 00000000 00000000 ........ 00000000 00000000 ........
0008 00000000 00000000 ........ 00000000 00000000 ........
0010 00000000 00000000 ........ 00000000 00000000 ........
0018 00000000 00000000 ........ 00000000 00000000 ........
0020 00000000 00000000 ........ 00000000 00000000 ........
0028 00000000 00000000 ........ 00000000 00000000 ........
0030 00000000 00000000 ........ 00000000 00000000 ........
0038 00000000 00000000 ........ 00000000 00000000 ........
0040 00000000 00000000 ........ 00000000 00000000 ........
0048 00000000 00000000 ........ 00000000 00000000 ........
0050 00000000 00000000 ........ 00000000 00000000 ........
0058 00000000 00000000 ........ 00000000 00000000 ........
0060 00000000 00000000 ........ 00000000 00000000 ........
0068 00000000 00000000 ........ 00000000 00000000 ........
0070 00000000 00000000 ........ 00000000 00000000 ........
0078 00000000 00000000 ........ 00000000 00000000 ........
0080 00000000 00000000 ........ 00000000 00000000 ........
0088 00000000 00000000 ........ 00000000 00000000 ........
0090 00000000 00000000 ........ 00000000 00000000 ........
0098 00000000 00000000 ........ 00000000 00000000 ........
00A0 00000000 00000000 ........ 00000000 00000000 ........
00A8 00000000 00000000 ........ 00000000 00000000 ........
00B0 00000000 00000000 ........ 00000000 00000000 ........
00B8 00000000 00000000 ........ 00000000 00000000 ........
00C0 00000000 00000000 ........ 00000000 00000000 ........
00C8 00000000 00000000 ........ 00000000 00000000 ........
00D0 00000000 00000000 ........ 00000000 00000000 ........
00D8 00000000 00000000 ........ 00000000 00000000 ........
00E0 00000000 00000000 ........ 00000000 00000000 ........
00E8 00000000 00000000 ........ 00000000 00000000 ........
00F0 00000000 00000000 ........ 00000000 00000000 ........
00F8 00000000 00000000 ........ 00000000 00000000 ........
0100 00000000 00000000 ........ 00000000 00000000 ........
0108 00000000 00000000 ........ 00000000 00000000 ........
0110 00000000 00000000 ........ 00000000 00000000 ........
0118 00000000 00000000 ........ 00000000 00000000 ........
0120 00000000 00000000 ........ 00000000 00000000 ........
0128 00000000 00000000 ........ 00000000 00000000 ........
0130 00000000 00000000 ........ 00000000 00000000 ........
0138 00000000 00000000 ........ 00000000 00000000 ........
0140 00000000 00000000 ........ 00000000 00000000 ........
0148 00000000 00000000 ........ 00000000 00000000 ........
0150 00000000 00000000 ........ 00000000 00000000 ........
0158 00000000 00000000 ........ 00000000 00000000 ........
0160 00000000 00000000 ........ 00000000 00000000 ........
0168 00000000 00000000 ........ 00000000 00000000 ........
0170 00000000 00000000 ........ 00000000 00000000 ........
0178 00000000 00000000 ........ 00000000 00000000 ........
0180 00000000 00000000 ........ 00000000 00000000 ........
0188 00000000 00000000 ........ 00000000 00000000 ........
0190 00000000 00000000 ........ 00000000 00000000 ........
0198 00000000 00000000 ........ 00000000 00000000 ........
01A0 00000000 00000000 ........ 00000000 00000000 ........
01A8 00000000 00000000 ........ 00000000 00000000 ........
01B0 00000000 00000000 ........ 00000000 00000000 ........
01B8 00000000 00000000 ........ 00000000 00000000 ........
01C0 00000000 00000000 ........ 00000000 00000000 ........
01C8 00000000 00000000 ........ 00000000 00000000 ........
01D0 00000000 00000000 ........ 00000000 00000000 ........
01D8 00000000 00000000 ........ 00000000 00000000 ........
01E0 00000000 00000000 ........ 00000000 00000000 ........
01E8 00000000 00000000 ........ 00000000 00000000 ........
01F0 00000000 00000000 ........ 00000000 00000000 ........
01F8 00000000 00000000 ........ 00000000 00000000 ........
ntfs_boot_sector
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
filesystem size 1
sectors_per_cluster 0
mft_lcn 0
mftmirr_lcn 0
clusters_per_mft_record 0
clusters_per_index_record 0
Boot sector
Status: Bad
Backup boot sector
Status: Bad
Sectors are identical.
A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
rebuild_NTFS_BS
Failed to rebuild NTFS boot sector.
ntfs_boot_sector
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
filesystem size 1
sectors_per_cluster 0
mft_lcn 0
mftmirr_lcn 0
clusters_per_mft_record 0
clusters_per_index_record 0
Boot sector
Status: Bad
Backup boot sector
Status: Bad
Sectors are identical.
A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
Boot sector Backup boot sector
0000 00000000 00000000 ........ 00000000 00000000 ........
0008 00000000 00000000 ........ 00000000 00000000 ........
0010 00000000 00000000 ........ 00000000 00000000 ........
0018 00000000 00000000 ........ 00000000 00000000 ........
0020 00000000 00000000 ........ 00000000 00000000 ........
0028 00000000 00000000 ........ 00000000 00000000 ........
0030 00000000 00000000 ........ 00000000 00000000 ........
0038 00000000 00000000 ........ 00000000 00000000 ........
0040 00000000 00000000 ........ 00000000 00000000 ........
0048 00000000 00000000 ........ 00000000 00000000 ........
0050 00000000 00000000 ........ 00000000 00000000 ........
0058 00000000 00000000 ........ 00000000 00000000 ........
0060 00000000 00000000 ........ 00000000 00000000 ........
0068 00000000 00000000 ........ 00000000 00000000 ........
0070 00000000 00000000 ........ 00000000 00000000 ........
0078 00000000 00000000 ........ 00000000 00000000 ........
0080 00000000 00000000 ........ 00000000 00000000 ........
0088 00000000 00000000 ........ 00000000 00000000 ........
0090 00000000 00000000 ........ 00000000 00000000 ........
0098 00000000 00000000 ........ 00000000 00000000 ........
00A0 00000000 00000000 ........ 00000000 00000000 ........
00A8 00000000 00000000 ........ 00000000 00000000 ........
00B0 00000000 00000000 ........ 00000000 00000000 ........
00B8 00000000 00000000 ........ 00000000 00000000 ........
00C0 00000000 00000000 ........ 00000000 00000000 ........
00C8 00000000 00000000 ........ 00000000 00000000 ........
00D0 00000000 00000000 ........ 00000000 00000000 ........
00D8 00000000 00000000 ........ 00000000 00000000 ........
00E0 00000000 00000000 ........ 00000000 00000000 ........
00E8 00000000 00000000 ........ 00000000 00000000 ........
00F0 00000000 00000000 ........ 00000000 00000000 ........
00F8 00000000 00000000 ........ 00000000 00000000 ........
0100 00000000 00000000 ........ 00000000 00000000 ........
0108 00000000 00000000 ........ 00000000 00000000 ........
0110 00000000 00000000 ........ 00000000 00000000 ........
0118 00000000 00000000 ........ 00000000 00000000 ........
0120 00000000 00000000 ........ 00000000 00000000 ........
0128 00000000 00000000 ........ 00000000 00000000 ........
0130 00000000 00000000 ........ 00000000 00000000 ........
0138 00000000 00000000 ........ 00000000 00000000 ........
0140 00000000 00000000 ........ 00000000 00000000 ........
0148 00000000 00000000 ........ 00000000 00000000 ........
0150 00000000 00000000 ........ 00000000 00000000 ........
0158 00000000 00000000 ........ 00000000 00000000 ........
0160 00000000 00000000 ........ 00000000 00000000 ........
0168 00000000 00000000 ........ 00000000 00000000 ........
0170 00000000 00000000 ........ 00000000 00000000 ........
0178 00000000 00000000 ........ 00000000 00000000 ........
0180 00000000 00000000 ........ 00000000 00000000 ........
0188 00000000 00000000 ........ 00000000 00000000 ........
0190 00000000 00000000 ........ 00000000 00000000 ........
0198 00000000 00000000 ........ 00000000 00000000 ........
01A0 00000000 00000000 ........ 00000000 00000000 ........
01A8 00000000 00000000 ........ 00000000 00000000 ........
01B0 00000000 00000000 ........ 00000000 00000000 ........
01B8 00000000 00000000 ........ 00000000 00000000 ........
01C0 00000000 00000000 ........ 00000000 00000000 ........
01C8 00000000 00000000 ........ 00000000 00000000 ........
01D0 00000000 00000000 ........ 00000000 00000000 ........
01D8 00000000 00000000 ........ 00000000 00000000 ........
01E0 00000000 00000000 ........ 00000000 00000000 ........
01E8 00000000 00000000 ........ 00000000 00000000 ........
01F0 00000000 00000000 ........ 00000000 00000000 ........
01F8 00000000 00000000 ........ 00000000 00000000 ........
ntfs_boot_sector
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
filesystem size 1
sectors_per_cluster 0
mft_lcn 0
mftmirr_lcn 0
clusters_per_mft_record 0
clusters_per_index_record 0
Boot sector
Status: Bad
Backup boot sector
Status: Bad
Sectors are identical.
A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
NTFS signature is missing.
NTFS signature is missing.
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
Can't open filesystem. Filesystem seems damaged.
Change partition type:
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
ntfs_boot_sector
1 P HPFS - NTFS 4 0 1 131448 254 2 67036950
filesystem size 1
sectors_per_cluster 0
mft_lcn 0
mftmirr_lcn 0
clusters_per_mft_record 0
clusters_per_index_record 0
Boot sector
Status: Bad
Backup boot sector
Status: Bad
Sectors are identical.
A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
TestDisk exited normally.