TestDisk: Flash Drive="CHS and LBA don't match" [SOLVED]

Using applications, configuring, problems
Message
Author
Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#121 Post by Sylvander »

Code: Select all

# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024  
Bus 001 Device 003: ID 0a16:2004 Trek Technology (S) PTE, Ltd 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024  
Bus 002 Device 003: ID 1a86:7584 Unknown 
Bus 002 Device 004: ID 04d9:1133 Holtek Semiconductor, Inc. 
# 
amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#122 Post by amigo »

So, it's finally working for you. Great!
linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#123 Post by linuxcbon »

amigo wrote:So, it's finally working for you. Great!
No.
Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#124 Post by Sylvander »

linuxcbon wrote:No.
Agreed.
npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#125 Post by npierce »

Hi Sylvander,

First, I am assuming that you had only your troublesome flash drive plugged in when you ran lsusb. (That's what I wanted, but neglected to say so.) Only one was listed, so it looks like that was the case. Correct?

(If that's not the case, then my assumptions below about the identity of your drive may be wrong.)

I was surprised that it was not listed as a Verbatim product, but it appears that Verbatim sometimes sells devices from other manufacturers such as Kingston Technology, and Trek Technology. The "0a16" manufacturer code identifies yours as being from Trek. I've found no information about the "2004" product code.

In order to find a low level format utility that is known to work with your drive, we need to identify the controller chip used. One might hope that this would be an exact science. There are certainly bloggers on the Web that give one the impression that it is. But such is not the case.

Given the vendor and product codes (0a16:2004 for your drive), it would be nice to just plug those numbers into a data base somewhere and find the controller chip that is used in that product.

And there is a database in Russia that does indeed let you plug those numbers in (http://www.flashboot.ru/iflash.html). But in some cases this results in a list of many chips. And in other cases (such as your drive's 0a16:2004), nothing is found.

Apparently manufacturers use various suppliers for the controller chips that are used in a single product. That is not surprising, but it does make it hard to identify the chip using only the vendor and product codes. What is surprising is that a single vendor and product code can result in a list of devices with various memory sizes. I would have thought that a vendor would assign different product codes for drives of different sizes. But perhaps some vendors consider a product to be one product available in different sizes. It is also certainly possible that the database contains a lot of misinformation -- not surprising since at one time the database was open for anyone to add data. And it is also possible that some of the data was reported based on data from counterfeit flash drives, and so that data is not legitimate.

Anyway, searching just on the vendor code "0a16" gave a short list of flash drives described as "Verbatim Store 'n' Go", or "Verbatim Store 'n' Go Mini". So we are getting warm. Most entries indicated that these use the Trek "TD2SMG12L" controller chip.


So, did I find any utility that you might try? Yes.

I had hoped to find a utility that came from a manufacturer's web site, as was the case for the other utility that you tried. But I didn't. I am less likely to trust something downloaded from some file-sharing web site, and am reluctant to even mention any, lest your "Mini-XP" become infested with some virus.

So first I am going to suggest a newer version of the utility that you already tried. I'm not very hopeful that a newer version will work any better for you than the old one did, but I think it would be safer to try that first, since it comes from a manufacturer's web site.

Looking into the binary, I see references to many chips, so apparently this utility is not limited to one type of controller chip (which explains why someone got it to work with a non-Apacer drive). My guess is that when you got the "USB Flash disk not found", it was not because it couldn't see your flash drive, but because it didn't find a flash drive that was supported by the utility. My hope (although it's not much hope) is that support for your drive has been added to the newest version.

A little digging turned up many versions of the utility at the Apacer web site. I'll document the full list here, but I would suggest that you not bother trying any other than the newest one, for which I've added a live link:

http://www.apacer.com/en/support/downlo ... Repair.zip
2004-04-28 225280 bytes HS20_RepairTool/Repair.exe

http://www.apacer.com/en/support/downlo ... pair_2.zip
2005-12-16 208896 bytes 2134repair_v2.3.1/Formatter.exe

http://www.apacer.com/en/support/downlo ... pair_3.zip
2006-07-28 270336 bytes Repair2611/Formatter_2611.exe

http://www.apacer.com/en/support/downlo ... .8.1.1.zip
2007-04-09 233472 bytes Repair_V2.8.1.1/Formatter.exe

http://www.apacer.com/en/support/downlo ... .9.1.1.zip
2008-03-12 503808 bytes Repair_v2.9.1.1.exe

http://www.apacer.com/en/support/downlo ... 9.1.8A.zip
2009-06-12 528384 bytes Repair_v2.9.1.8A/Formatter2.9.1.8A.exe

http://www.apacer.com/en/support/downlo ... .9.1.9.zip
2009-12-18 524288 bytes Repair_v2.9.1.9/Formatter.exe

http://www.apacer.com/en/support/downlo ... 10.1.1.zip
2010-03-29 512000 bytes Repair_v2.10.1.1/Formatter.exe

(These files also live in an alternative directory: http://ap.apacer.com/pub/media/file/downloads/)

Again, the only one worth trying is the newest, v2.10.1.1; if that doesn't support your drive, it is unlikely (though not impossible) that the older ones will.


If that doesn't work, there are a couple of more you can try.

It looks like the best utility for the TD2SMG12L controller chip is this:

http://flashboot.ru/files/public/USBest ... 0.2.19.rar
2008-12-04 6029380 bytes Super Stick Recovery Tool V1.0.2.19.exe

(If your "Mini-XP" doesn't support .rar files, and your Puppy doesn't already have the unrar utility (i.e., the unrar command says, "bash: unrar: command not found"), you will also need to get that utility, which is available on the forum here: http://www.murga-linux.com/puppy/viewto ... 167#655167)

Again, I am reluctant to suggest files from unknown web sites, but at least flashboot.ru is not just a file sharing web site, and looks fairly legitimate to me. This is the same site that has the database used earlier for looking up the flash drive controller chip. They also have a copy of the Repair_v2.9.1.1.exe file that you downloaded from the Apacer web site. I checked and verified that the one from flashboot.ru is exactly the same as the one from apacer.com, which gives me hope that nothing nasty has been added to their files. (Of course, I can make no guarantees.)

If you choose to try it, you'll need to run it in your "Mini-XP".

If your "Mini-XP" doesn't support .rar files, you can use Puppy to extract the executable like so:

1. Download the file to your /root/ directory.

2. Run these commands:

Code: Select all

mkdir /root/supper_stick
cd /root/supper_stick
unrar e /root/Super_Stick_Recovery_Tool_V1.0.2.19.rar
(Naturally, you then need to move the executable to a place where "Mini-XP" can find it.)


If this utility doesn't help, I know of one more you could try, but will wait 'till we see how this one did before I post that.


Again, I hasten to point out that I have no experience with this utility. I only know that others claimed to have used it successfully with a flash drive containing a Trek TD2SMG12L controller chip.

And I don't even know for sure if your drive has a TD2SMG12L controller chip, since I found no information on your product code (PID) "2004". I only know that all the "Verbatim Store 'n' Go" drives listed with your vendor code (VID) "0a16" used that controller chip, so maybe yours does as well.

So again I remind you that it is possible that the use of this utility could damage your flash drive beyond repair. But since you have already tried the other utility despite a similar warning, I'm guessing you have decided that you will be no worse off than you already are if it does.

And, as we all know, it is certainly possible that we are beating a dead horse. Your drive may have been ready to send to the knackers weeks ago. I only keep making suggestions because I admire your determination to exhaust all possibilities before doing so.

Good luck.
Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#126 Post by Sylvander »

Posting from FalconFour's_UBCD->MiniXP.

1. Yes, had only my troublesome flash drive plugged in when I ran lsusb.

2. Downloaded Repair_v2.10.1.1.zip to a folder on sda2 [FAT32], unzipped it to the same location, and the exe file was auto-placed in its own sub-folder.

3. Rebooted to FalconFour's_UBCD->MiniXP, navigated to the Formatter.exe file, right-clicked it and chose Open.

4. BAD NEWS! :(
Got the same failure = USB Flash Disk not found!
Used Windows Explorer to delete the folder plus exe file plus zip file.
Will now attempt to download [to the same folder as before] the next suggested tool/file [rar file] and attempt to unpack etc.
7-zip available and tried, but failed to unpack; will go back to Slacko to do the work.

5. Back in Slacko, tried the following on the downloaded rar file:
[I opened a console in the folder holding the file, from within Xfe]
Typed unra and hit <tab>, which completed the commandname=unrar [therefore must be correctly spelled], so it is installed; discovered on my own that "e" was needed, repeated unrar with e, typed S and hit <tab> to complete the filename [therefore also must be correct], and hit <Enter>.

Code: Select all

# unrar e Super_Stick_Recovery_Tool_V1.0.2.19.rar 

UNRAR 3.71 beta 1 freeware      Copyright (c) 1993-2007 Alexander Roshal

Super_Stick_Recovery_Tool_V1.0.2.19.rar is not RAR archive
No files to extract
# 
Did I get the command right?
This gives the same result as in MiniXP ["is not RAR archive No files to extract"].
Is it truly not a rar archive?

Very thankful for your assistance, and enjoying the learning experience. :D
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#127 Post by Karl Godt »

http://packages.debian.org/source/squeeze/rar : The src .tar.gz includes a rar_static binary . Version is 3.93 now.

Fails to unrar ?
Could think of unsupported compression algorithms or a needed password :D

[EDIT:]
Nope: Both 4.2.0 from sid repo and 3.9.3 : rar_static extracted it with no problems . Firefox did not dl correctly since i am on 7,65KB for the rest of the month. Needed to copy dl-link and
wget -c http://flashboot.ru/files/public/USBest ... 0.2.19.rar

:
Extracting Super Stick Recovery Tool V1.0.2.19.exe OK
Extracting FlashBoot.ru.URL OK
All OK
bash-3.00# pwd
/root/Downloads/rar-4.2.0
bash-3.00# cd ..
bash-3.00# rar e Super_Stick_Recovery_Tool_V1.0.2.19.rar
RAR 3.93 Copyright (c) 1993-2010 Alexander Roshal 15 Mar 2010
Shareware version Type RAR -? for help
Extracting from Super_Stick_Recovery_Tool_V1.0.2.19.rar
Файл загружен
amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#128 Post by amigo »

What is not working? This:

Code: Select all

 ~> fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 512 MB, 512229376 bytes
16 heads, 62 sectors/track, 1008 cylinders
Units = cylinders of 992 * 512 = 507904 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1008      499937    c  W95 FAT32 (LBA)

Command (m for help): q

~> mkdir /mnt/sdb1
~> mount -t vfat /dev/sdb1  /mnt/sdb1
~>  cp sylpheed.desktop~ /mnt/sdb1/
~> ls -lta  /mnt/sdb1/
total 24
drwxr-xr-x  2 root root 16384 2013-03-17 14:13 .
-rwxr-xr-x  1 root root   456 2013-03-17 14:13 sylpheed.desktop~
drwxr-xr-x 15 root root   140 2013-03-17 14:12 .. 
indictaes that the partition is properly recognized and you were able to format it and copy a file to it. What is not working?
linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#129 Post by linuxcbon »

amigo wrote: indictaes that the partition is properly recognized and you were able to format it and copy a file to it. What is not working?
It's not him, it's someone else's disk...
npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#130 Post by npierce »

Sylvander,
Sylvander wrote:

Code: Select all

# unrar e Super_Stick_Recovery_Tool_V1.0.2.19.rar

UNRAR 3.71 beta 1 freeware      Copyright (c) 1993-2007 Alexander Roshal

Super_Stick_Recovery_Tool_V1.0.2.19.rar is not RAR archive
No files to extract
# 
Did I get the command right?
Yes you got it right.

Perhaps it needs a newer version of unrar. You have "3.71 beta 1". I have "4.00 beta 3". Karl had success with "3.9.3 and "4.2.0".

Try downloading the .pet file from the Puppy forum -- it is the one that works for me: http://www.murga-linux.com/puppy/viewto ... 167#655167

Also, just to be sure that file downloaded okay for you, what do you get for this?:

Code: Select all

md5sum Super_Stick_Recovery_Tool_V1.0.2.19.rar
I get:

Code: Select all

# md5sum Super_Stick_Recovery_Tool_V1.0.2.19.rar
a668b4fb9a5b303782f65171b18cdd12  Super_Stick_Recovery_Tool_V1.0.2.19.rar
# 
Sylvander wrote:Very thankful for your assistance, and enjoying the learning experience. :D
Good. So far I am enjoying it as well.

----------------------------------------------------------------

Karl,

Thanks for verifying that unrar 3.9.3 and unrar 4.2.0 extracted the file OK. I'm hoping that a newer version of unrar will work for Sylvander as well.
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#131 Post by Karl Godt »

Norman, it is possible that rar changes the algorithm like .rpm do, so older extracting tools won't probably work on newest .archive s . The Superstick*.rar is made Dec. 2010 and according to http://rescene.wikidot.com/rar-versions rar-3.7.1 came out Sep. 2007 . .. I'm wondering a little that Slackware has such old repo items .
Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#132 Post by Sylvander »

npierce:
Tried the following:
1.
a.

Code: Select all

# md5sum Super_Stick_Recovery_Tool_V1.0.2.19.rar 
d41d8cd98f00b204e9800998ecf8427e  Super_Stick_Recovery_Tool_V1.0.2.19.rar
# 
md5sum is incorrect?
Hence, no wonder the [newly installed] version 4 of unrar also gets "is not rar archive" when attempting to unpack the file.
I'll have a go at re-download of the rar file.
b. Re-downloaded the rar file and now get:

Code: Select all

# md5sum Super_Stick_Recovery_Tool_V1.0.2.19.rar 
a668b4fb9a5b303782f65171b18cdd12  Super_Stick_Recovery_Tool_V1.0.2.19.rar
# 
Looking good. :D
Will now attempt to unpack.
c. Here's what I now get:

Code: Select all

# unrar e Super_Stick_Recovery_Tool_V1.0.2.19.rar 

UNRAR 4.00 beta 3 freeware      Copyright (c) 1993-2010 Alexander Roshal

Extracting from Super_Stick_Recovery_Tool_V1.0.2.19.rar

Extracting  Super Stick Recovery Tool V1.0.2.19.exe                   OK 
Extracting  FlashBoot.ru.URL                                          OK 
All OK
# 
SUCCESS! :D

2. Will now reboot into "FalconFour's_UBCD->MiniXP", and attempt to run the exe file on the problem Flash Drive.
SUCCESS! The program runs. :D
Dare I continue?
Displays: Kingmax - Super Stick Disk Recovery Wizard.
Displays images of 4GB and 8GB drives [as the drives to which it would normally be applied?]
Displays Verbatim Store-n-Go, (D), 964MB in window as detected drive, with update and close buttons, and 0% completed.
Should I click on update?
npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#133 Post by npierce »

It's very encouraging that it recognizes your drive. Like I said earlier, I've never used this utility, but Update would seem t be your best option. I can think of nothing better to try. If it were my drive, I'd click.

Good Luck.
Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#134 Post by Sylvander »

SUCCESS!
1. I now have a new single partition that occupies all of the space on the drive, with a FAT32 filesystem. :D
2. And it is now mounted. :D
3. And I've made a new folder on it, and copied a file to the folder [the .png file including the image displayed below], and opened the file, and it displays OK. :D
Then deleted the folder and file.

4. I can now mark this thread [SOLVED].
Cheers and applause for npierce.
Many thanks to ALL who assisted. :D

Illustrates the point: don't give up too quickly on hardware that appears faulty or dead.

5. Is there any more to be done to this?
I notice the drive is only 696 MiB instead of 1GB.
Attachments
00.png
(28.48 KiB) Downloaded 5811 times
npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#135 Post by npierce »

Yay! :)

That is good news!

If I were a betting man, I probably would have bet that your drive was dead.

But when a dozen Puppy users get together to work on something, good things happen.

(Still, I probably wouldn't put any irreplaceable files on that drive. :) )
linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#136 Post by linuxcbon »

OK then the drive needed to be reseted, I guessed that.
Is there a linux tool for that ?
npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#137 Post by npierce »

Hi Sylvander,

I just saw your question 5. (You must have added it while I was posting.)

No, I don't think you need to do anything else. My best guess is that there were some bad sectors on the drive, which is why it quit working in the first place. When the utility reformatted the drive, it would have discovered the bad sectors and removed them from the allocation table, so that they would not be used. Since fewer sectors are available, you now have a smaller drive.

Could other sectors go bad in the future? Sure. So that's a good reason to avoid entrusting this drive with files that are irreplaceable.

----------------------------------------------------------------

linuxcbon,

Although there might be a Linux utility that could do this, I am not aware of any. And I did a lot of searching.
Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#138 Post by Sylvander »

Any idea what is different about this "Recovery Tool" that makes it able to do what all those other things failed to do? :?
User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

#139 Post by jrb »

Wow! Excellent thread guys. Sylvander I admire your tenacity, I've thrown drives away without giving them half the effort you've shown here.

I just want to show you all something I found by following a chain of links from npierce's Russian website http://www.flashboot.ru/iflash.html (excellent find that). I had a tough time getting that site to open, finally used a proxy and got through.

Anyway here's a tool to download http://www.mydigit.cn/mytool/ChipGenius.rar which looks at your flashdrive and gives back the tech data. I got it to open in wine but it didn't find the flashdrive so I ended up running it in Win7. As soon as a flashdrive is plugged in it gives you the specs, pretty neat!
Attachments
ChipGenius2-DaneElec8G_new.jpg
(53.42 KiB) Downloaded 755 times
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#140 Post by Karl Godt »

Any idea what is different about this "Recovery Tool" that makes it able to do what all those other things failed to do? Confused
In order to access a controller chip anywhere it needs a separate /dev/* device node(s) . /dev/sdx is not enough, probably perhaps on so called raw flash devices that have no controller chip except the usb controller from the main board of the pc .

There are i2c and eeprom drivers shipped with the kernel (probably not with default Puppy kernels) that show off like

Code: Select all

modprobe -l | grep -E 'i2c|rom'
It needs the special driver for that controller chip on the flash drive in order to create the needed nodes in /dev to access the controller chip or probably an appropriate udev rule. These Win drivers create the device nodes statically in the registry, so the programmer has knowledge about the controller firmware and how to access them. It depends on the company or the programmer or a hacker to convert/crosscompile that Win driver for linux syntax as hardware driver or gnu-libc syntax as userland driver like libusb .
Post Reply