can not read superblock 8gb usb, testdisk reports bad ending cylinder chs & lba don't match

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
2bornot2be
Posts: 3
Joined: 21 May 2023, 01:05

can not read superblock 8gb usb, testdisk reports bad ending cylinder chs & lba don't match

#1 Post by 2bornot2be »

Hello,

The linux operating system can not mount usb drive and complains of bad superblock. I was able to copy all the data from the 8gb usb drive using testdisk_static and trying to fix the superblock errors. I changed cylinders, heads and sectors to 1022 255 and 63 respectivly but still receive bad ending cylinder chs and lba don't match. The drive was a self booting usb drive. As last resort, can the files be copied back to usb drive after a reformat? /dev/sdg is the drive in question.

Here is a partial copy/paste of my log file:

Sat May 20 16:23:24 2023
Command line: TestDisk

TestDisk 7.2-WIP, Data Recovery Utility, March 2023
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Linux, kernel 3.12.67-64-desktop (#1 SMP PREEMPT Fri Dec 9 15:56:17 UTC 2016 (35c7b99)) x86_64
Compiler: GCC 4.8
ext2fs lib: 1.42.8, ntfs lib: libntfs-3g, reiserfs lib: 0.3.1-rc8, ewf lib: 20120504, curses lib: ncurses 5.9
/dev/sda: LBA, HPA, LBA48 support
/dev/sda: size 488397168 sectors
/dev/sda: user_max 488397168 sectors
/dev/sda: native_max 488397168 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size 1953525168 sectors
/dev/sdb: user_max 1953525168 sectors
/dev/sdb: native_max 1953525168 sectors
/dev/sdb: dco 1953525168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63, sector size=512 - HP SSD S700 250GB, S/N:HBSA29200702718, FW:S0212B1
Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ST1000DM003-1ER162, S/N:Z4Y167BB, FW:CC43
Disk /dev/sdg - 8004 MB / 7633 MiB - CHS 1020 247 62, sector size=512 - SanDisk Cruzer Glide, FW:1.26

Partition table type (auto): Intel
Disk /dev/sdg - 8004 MB / 7633 MiB - SanDisk Cruzer Glide
Partition table type: Intel

Analyse Disk /dev/sdg - 8004 MB / 7633 MiB - CHS 1020 247 62
Geometry from i386 MBR: head=212 sector=46
FAT32 at 0/0/33
Info: size boot_sector 15633376, partition 15633376
FAT1 : 36-15273
FAT2 : 15274-30511
start_rootdir : 30512 root cluster : 2
Data : 30512-15633375
sectors : 15633376
cluster_size : 8
no_of_cluster : 1950358 (2 - 1950359)
fat_length 15238 calculated 15238
heads/cylinder 255 (FAT) != 247 (HD)
sect/track 63 (FAT) != 62 (HD)
set_FAT_info: name from BS used
Current partition structure:
Warning: number of heads/cylinder mismatches 255 (FAT) != 247 (HD)
Warning: number of sectors per track mismatches 63 (FAT) != 62 (HD)
1 * FAT32 0 0 33 1020 211 46 15633376 [NO NAME]

Warning: Bad ending cylinder (CHS and LBA don't match)

recuperation
Posts: 2735
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: can not read superblock 8gb usb, testdisk reports bad ending cylinder chs & lba don't match

#2 Post by recuperation »

Your self-booting USB drive might rely on CHS (cylinder head sector) information. Unfortunately you do not mention the name of the operating system on your USB drive.

As you already retrieved all data from the drive the best solution is to check it with h2testw (Windows) or f3 (linux) to ensure that there is nothing dammaged with the drive. Afterwards, just reinstall your operating system there.

2bornot2be
Posts: 3
Joined: 21 May 2023, 01:05

Re: can not read superblock 8gb usb, testdisk reports bad ending cylinder chs & lba don't match

#3 Post by 2bornot2be »

The usb drive is formatted fat32 and boots a virtual box hard disk file via slitaz linux all self contained on the usb drive.

recuperation
Posts: 2735
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: can not read superblock 8gb usb, testdisk reports bad ending cylinder chs & lba don't match

#4 Post by recuperation »

Superblocks are a property of ext-Filesystems and not of FAT32 file systems. Maybe your operating system is referring to the boot sector.
As last resort, can the files be copied back to usb drive after a reformat? /dev/sdg is the drive in question.
You can always try to copy files to your USB drive after formatting. The question is if that reestablishes bootability. You will have to try that out yourself.
I doubt that you had set up your USB drive this way rather than putting an image on it.

You did not state the version of your slitaz linux. I guess it does not use the cylinder head sector adressing method to boot the stick.
Unfortunately you were not able to tell about the tests I recommended.

2bornot2be
Posts: 3
Joined: 21 May 2023, 01:05

Re: can not read superblock 8gb usb, testdisk reports bad ending cylinder chs & lba don't match

#5 Post by 2bornot2be »

I downloaded the f3 utility and looked over the docs and will post my results.

Locked