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

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#16 Post by Semme »

I have NEVER had a problem running that routine, or any similar.

GParted aside, did you try to copy anything to the drive?

Does Pup light up and see it when plugged?

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

#17 Post by Sylvander »

1. I have NEVER had a problem running that routine, or any similar.
You are probably more experienced than I.
I think the website instructions are failing to mention certain points where I aught to hit <Enter>.
Hence, I'm hitting <Enter> when I guess I aught to do so, even though not instructed.
Fingers crossed that I'm not making mistakes. :?

2. GParted aside, did you try to copy anything to the drive?
Haven't yet tried that.
Will attempt it now:
sdb1 won't mount, mind you, Xfe IS able to see /mnt/sdb1, and Xfe DID succeed in copying a file to /mnt/sdb1, and I WAS able to open the text file [a .log file] using Geany. :D
How come?

3. Does Pup light up and see it when plugged?
When I plug in the Flash Drive...
The LED flashes, then goes constantly lit.
And...
The drive appears on the desktop as a USB connected device named sdb1.
But it won't mount. :(
-------------------------------------------------------------------------------------------------------

Prior to the above...
Succeeded in running "LinuxMint-14.1-mate-dvd-64bit.iso".
And...
Ran GParted in there...
And...
It failed to complete any attempts at a fix [delete, re-format].
This Mint looks interesting.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#18 Post by Semme »

In the event I missed it- this is, which Pup?

When you say won't mount.. you mean, via click? How about through a console?

As far as that page goes you probably followed close enough.. enter after anything bolded.

What they neglect to say is the bit about removal and reinsertion prior to format.

Besides- you said format finished OK and you're able to copy, right?

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

#19 Post by Sylvander »

1. "In the event I missed it- this is, which Pup?"
Slacko-5.3.3.1-scsi.iso

2. "When you say won't mount.. you mean, via click?"
Yes.
Normally when I click on an icon for a partition->[filesystem], the partition just mounts...
But in this case [since there is a problem?], Pmount runs and displays all the partitions, including sdb1.
But when I then click the entry for sdb1, Pmount reports: "ERROR: unable to mount sdb1".

3. "How about through a console?"
How should I do that?

4. "Besides- you said format finished OK"
Um, the "write" completed successfully [partition table altered].
And, "mkfs.vfat -F 32 /dev/sdb1" completed OK.
Are either of these a FORMAT?

5. "and you're able to copy, right?"
Right.
i.e. Able to copy a text file to sdb1, and display/read the contents of the file.

proebler
Posts: 178
Joined: Tue 24 Jan 2012, 11:15
Location: TAS

#20 Post by proebler »

sdb1 won't mount, mind you, Xfe IS able to see /mnt/sdb1, and Xfe DID succeed in copying a file to /mnt/sdb1, and I WAS able to open the text file [a .log file] using Geany. Very Happy
How come?
how come indeed?
Succeeded in running "LinuxMint-14.1-mate-dvd-64bit.iso".
And...
Ran GParted in there...
And...
It failed to complete any attempts at a fix [delete, re-format].
suggest to use the Mint disk utility, NOT Gparted.

don't give up yet
more suggestions:

using testdisk, > Delete all data in partition table
then

using Gparted [Puppy], > Write partition table [Devices tab]
or
using Pdisk [Puppy, System] > fdisk > create new empty DOS partition table

then create partition[s] as desired.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#21 Post by Semme »

Not to interrupt the previous post..

Console mount? Possibly >> mount -t vfat /dev/sdb1 /mnt/sdb1

fdisk is a partitioning tool.

mk* handles format.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#22 Post by npierce »

Sylvander wrote:sdb1 won't mount, mind you, Xfe IS able to see /mnt/sdb1, and Xfe DID succeed in copying a file to /mnt/sdb1, and I WAS able to open the text file [a .log file] using Geany. :D
How come?
There is no reason why any file manager or the cp utility wouldn't copy to /mnt/sdb1, if that directory exists and is writable by you (which it should be if you are root). But that doesn't mean that it is copying the file to your drive. If the drive couldn't be mounted, then /mnt/sdb1 is just another sub-directory of the /mnt directory.

If the file is still in /mnt/sdb1, you will probably find that the file will still be there even after physically removing your flash drive. In fact, if you ever succeed in mounting a flash drive on /mnt/sdb1, the file will no longer be visible -- at least not until you unmount the drive.

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

#23 Post by Sylvander »

proebler:
1. suggest to use the Mint disk utility
Tried to, but couldn't find anything named "disk utility" within the Mint environment.
Where is it located?
Does it come natively included, or would I need to install it?

2. using testdisk, > Delete all data in partition table
then...

I'll attempt that ASAP.

Semme:
3. Console mount? Possibly >> mount -t vfat /dev/sdb1 /mnt/sdb1
Tried that and got...

Code: Select all

# mount -t vfat /dev/sdb1 /mnt/sdb1 
mount: mount point /mnt/sdb1 does not exist
# 
npierce
Thanks for the explanation.
I believe I understand what you said. :D
It is my routine, when session changes are made...
To NOT auto save [back to the lupusave], or manually save, DURING the session.
And...
To NOT save at shutdown/reboot either.
Hence, if [during the session] the file was saved within the filesystem held in RAM...
It would be lost at shutdown, hence no longer exists.

I'm very grateful for all the assistance guys! :D

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#24 Post by Semme »

No sdb1? Create one.. any folder for that matter.

If it were >> /root/test_mount >> you would:

Code: Select all

mount -t vfat /dev/sdb1 /root/test_mount
Check it.. We have files?

==

And I doubt "disk utility" is the name of the program..

Pretty sure they meant Mints`partitioning utility.

Oop's.. maybe it is Disk Utility?

Shell >> gnome-disk-utility.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#25 Post by npierce »

Sylvander wrote:. . . To NOT save at shutdown/reboot either.
Hence, if [during the session] the file was saved within the filesystem held in RAM...
It would be lost at shutdown, hence no longer exists.
Yes.

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

#26 Post by Sylvander »

Semme:
1. "No sdb1? Create one.. any folder for that matter."
How?
You didn't explicitly say I should do it as follows...

2. "If it were >> /root/test_mount >> you would:
Code:
mount -t vfat /dev/sdb1 /root/test_mount
"
Did this and got:

Code: Select all

# mount -t vfat /dev/sdb1 /root/test_mount
mount: mount point /root/test_mount does not exist
# 
proebler:
3. "using testdisk, > Delete all data in partition table
then
"
Did this, and it appeared to succeed, but subsequent operations failed, which suggests it really didn't succeed.

4. "using Gparted [Puppy], > Write partition table [Devices tab]
or
using Pdisk [Puppy, System] > fdisk > create new empty DOS partition table
"
Both of these operations failed. :(

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#27 Post by Semme »

Explicitly >> create test_mount in /root. "Does not exist" should've told you something..

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

#28 Post by Sylvander »

Semme wrote:Explicitly >> create test_mount in /root. "Does not exist" should've told you something..
I'm not keen on riddles. :?
If I were knowledgeable and experienced in Puppy->Linux [which I'm not], what should I deduce?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#29 Post by Semme »

Rt-clk, new folder. Doesn't matter where or what you name it so long as it's at the tail end of that mount cmd.
Last edited by Semme on Wed 27 Feb 2013, 18:49, edited 1 time in total.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#30 Post by amigo »

I think I can provide some insight here as I have an unusual flash drive which illustrates something. Like most new flash drives it was formatted as FAT32. I later re-formatted it to ext2 -but without changing the partition type. Now, it can be mounted as either FAT32 or ext2 -the formatting markers for ext2 did not destroy all old markers for FAT32. If I mount it as a FAT, I can see sertain files which I added when it was *formatted* as FAT. But, if I mount it as an ext2 FS, then I can see other files which I added to it when t was mounted as an ext2... but not the files that are from the 'FAT times'.

Anyway, it shows that you can really have weird things happen. The partition type is not always exclusive to a certain filesystem type. But, inconsistencies can confuse other tools -like mount, etc. Like in my case, if mount is called without specifying the filesystem type, then it goes through the list of supported file systems and tries each one till it succeeds. mount also does this when an fstab entry for the partition has 'auto' as the filesystem type.

So, the OP has managed to create a drive similar to what I have. The way to rectify it is this:

Do not mount the drive for fdisk operations! If it is already mounted, then unmount it first.
1. Run fdisk and change the partition type by choosing option 't', choosing the right partition number (1 in OP'S case) and selecting 'L' to show the table illustrated earlier:

Code: Select all

Hex code (type L to list codes): LL^H

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris        
 1  FAT12           39  Plan 9          82  Linux swap      c1  DRDOS/sec (FAT-
 2  XENIX root      3c  PartitionMagic  83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       40  Venix 80286     84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      41  PPC PReP Boot   85  Linux extended  c7  Syrinx         
 5  Extended        42  SFS             86  NTFS volume set da  Non-FS data    
 6  FAT16           4d  QNX4.x          87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS       4e  QNX4.x 2nd part 88  Linux plaintext de  Dell Utility   
 8  AIX             4f  QNX4.x 3rd part 8e  Linux LVM       df  BootIt         
 9  AIX bootable    50  OnTrack DM      93  Amoeba          e1  DOS access     
 a  OS/2 Boot Manag 51  OnTrack DM6 Aux 94  Amoeba BBT      e3  DOS R/O        
 b  W95 FAT32       52  CP/M            9f  BSD/OS          e4  SpeedStor      
 c  W95 FAT32 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi eb  BeOS fs        
 e  W95 FAT16 (LBA) 54  OnTrackDM6      a5  FreeBSD         ee  GPT            
 f  W95 Ext'd (LBA) 55  EZ-Drive        a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            56  Golden Bow      a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    5c  Priam Edisk     a8  Darwin UFS      f1  SpeedStor      
12  Compaq diagnost 61  SpeedStor       a9  NetBSD          f4  SpeedStor      
14  Hidden FAT16 <3 63  GNU HURD or Sys ab  Darwin boot     f2  DOS secondary  
16  Hidden FAT16    64  Novell Netware  af  HFS / HFS+      fb  VMware VMFS    
17  Hidden HPFS/NTF 65  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE 
18  AST SmartSleep  70  DiskSecure Mult b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 75  PC/IX           bb  Boot Wizard hid fe  LANstep        
1c  Hidden W95 FAT3 80  Old Minix       be  Solaris boot    ff  BBT            
1e  Hidden W95 FAT1
For a new FAT32 filesystem, you should choose type 'c' or possibly 'b'. You could also run 'fidsk -l' to check the partition type first.
Once the partition *type* is right. Then format the new partition using mkdosfs:
mkdosfs -F 32 /dev/sdb1

Only now can you mount and use the filesystem. And, it would be good to specify the filesystem type when mounting:
mount -t vfat /dev/sdb1 /mnt/wherever

Remember, the partitioning and filesystem creation should be done with the drive unmounted.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#31 Post by Semme »

Amigo- well done. Hopefully this clarifies for Sylvander the partition *type* you spoke of in your opening post.

proebler
Posts: 178
Joined: Tue 24 Jan 2012, 11:15
Location: TAS

#32 Post by proebler »

Sylvander wrote:
Tried to, but couldn't find anything named "disk utility" within the Mint environment.
Where is it located?
Does it come natively included, or would I need to install it?
Disk Utility is in Accessories [Mint Debian-xfce]

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

#33 Post by Sylvander »

amigo:
1. Followed your instructions [correctly I hope], and got the following:
Any useful info there?

Code: Select all

# mount -t vfat /dev/sdb1 /mnt/sdb1
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

# 
Before entering the above command I checked, and /mnt/sdb1 did in fact exist.
I had chosen to make partition type c=W95 FAT32 (LBA).
Hope this was the correct choice.

proebler:
Will now reboot into Mint, and look for Disk Utility.
Done: No Disk Utility in Accessories! :(
Will make new Mint=Debian-xfce bootable DVD-RW, and try in there.
Got a link for the Debian-xfce iso file?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#34 Post by Semme »

Sylvander- go ahead and fdisk your device again- we won't write to it.

Once up, type *p* to dump the partition table. What's the *Id* read?

To quit without write >> *q*

PS- You don't need Mint to zero your drive. :wink:

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

#35 Post by Sylvander »

Semme:
1.
Semme wrote:Once up, type *p* to dump the partition table. What's the *Id* read?
Done.
Here's the result:

Code: Select all

Command (m for help): p

Disk /dev/sdb: 1010 MB, 1010826752 bytes
196 heads, 9 sectors/track, 1119 cylinders, total 1974271 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
Disk identifier: 0x0009dcf9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     1972223      985088    b  W95 FAT32
2.
Semme wrote:You don't need Mint to zero your drive.
Thanks, I'll try using these instructions to zero the drive.
Hmmm, how do I create the junk.bin file on sdb1 if I cannot mount sdb1?

proebler:
3.
proebler wrote:Disk Utility is in Accessories...
In "linuxmint-xfce-201104-dvd-64bit", I found it in "System", but it failed to complete all the operations I tried [format drive, format partition, delete partition].
I'm certainly getting around. :D

Post Reply