Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 20 Nov 2014, 19:29
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
TestDisk: Flash Drive="CHS and LBA don't match" [SOLVED]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 7 of 11 [156 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Next
Author Message
Sylvander

Joined: 15 Dec 2008
Posts: 3515
Location: West Lothian, Scotland, UK

PostPosted: Thu 14 Mar 2013, 05:14    Post subject:  

1. 9:00 a.m.= Running the 1st command at present.
There is a HUUUUGE long list of problems detected on various inodes [7358 to 7558 at present].
I'm agreeing to fix each of them.
Been at it for 15 min so far.
Will keep clicking Y if my fingers hold out, and report back if/when the series completes all fixes.

2. 9:26 a.m.= Now at this stage:
Code:
*** journal has been re-created - filesystem is now ext3 again ***
Restarting e2fsck from the beginning...
yye2fsck: Superblock invalid, trying backup blocks...
Superblock has an invalid journal (inode 8).
Clear<y>? yes

*** ext3 journal has been deleted - filesystem is now ext2 only ***

Resize inode not valid.  Recreate<y>? yes

badblocks: Input/output error during ext2fs_sync_device
Checking for bad blocks (read-only test): done                               
/dev/sdb1: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Journal inode is not in use, but contains data.  Clear<y>? yes

Inode 7217 is in use, but has dtime set.  Fix<y>?

Notice I improperly hit Y twice before e2fsck [yye2fsck], but it appears it caused no problem.
Will continue...

3. 9:41a.m.=looks like it's just repeating the previous stage.
Finishes with this:
Code:
Recreate journal<y>? yes

Creating journal (4096 blocks):  Done.

*** journal has been re-created - filesystem is now ext3 again ***
Restarting e2fsck from the beginning...
e2fsck: Bad magic number in super-block while trying to open /dev/sdb1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
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>

e2fsck: io manager magic bad!

3. 9:41a.m.=looks like it's just repeating the previous stage.

4. Second command gives this:
Code:
# e2fsck -b $((32768*4)) -v -f -c /dev/sdb1
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/sdb1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
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>

#
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Thu 14 Mar 2013, 16:33    Post subject:  

Seems that the Verbatim brand flash drive just decided to retire because of Osteoporosis .

You can of course, if being tired to hit y all the time, use the -p or -y option for fsck. Or the -n option first for getting an overview.

The second $((BLOCK*4)) might be helpful for the mount-FULL command then :

Code:
mkdir -p /mnt/sdb1
mount-FULL -t ext2 -o sb=$((32768*4)) /dev/sdb1 /mnt/sdb1
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Thu 14 Mar 2013, 16:37    Post subject:  

Quote:
*** journal has been re-created - filesystem is now ext3 again ***

Dunno what i can say now : You made an ext2 fs on it and it claimed to have found ext3 journal somewhere. Watch out that there is no hidden .journal file somewhere on the flash. e2fsck would try to implement it.
Back to top
View user's profile Send private message Visit poster's website 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Fri 15 Mar 2013, 10:16    Post subject:  

Hi Sylvander,

if none of your recent experiments have produced a mountable filesystem on your flash drive, I have found one other thing that you might try.

First, just to verify that nothing has changed, try this one last time:
Code:
fdisk -l /dev/sdb

If you still get the familiar:
Code:
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

showing that your partition is still type b (W95 FAT32), then your attempt on Wednesday to change it to type 83 (Linux) did not succeed, even though you did your best to write it to the drive. This means that your partition table is still unwritable, and no miraculous recovery has happened since we first established that it was unwritable at the beginning of last week.

(On the other hand, if by some miracle the partition type has changed, please report that, and ignore the remainder of this post.)

The write error that you got when you tried Win32DiskImager.exe is a further indication that the drive doesn't want to be written to.

So, I did some searching and found that some manufacturers provide utilities to fix a drive that is no longer writable. Unfortunately, I could not find such a utility on the Verbatim web site.

But I found an interesting post by someone who used a utility provided by another manufacturer to fix a Verbatim 1GB drive:

On 2008-May-11, at fixya.com, 'Guest' wrote:
I solved write protection on my Verbatim store 'n' go 1 GB by this program "HT203 Handy Steno 2.0 Repair Tool" which format FLASH DISK from http://emea.apacer.com/en/support/downloads.asp . I know its different manufacturer but its working.

On that same page (http://www.fixya.com/support/t259854-turn_off_write_protect_verbatim_4gb) other people reported success with that utility, although they don't say if they had Verbatim drives.

The URL given by 'Guest' seems to be no longer valid, but I did track down what looks to be possibly a newer version of the same utility at this URL:

http://ap.apacer.com/support/download/result/3,8,0,/page/4

Quote:
Utility HT203 8 2.0 Repair Tool English WinME/2000/XP/Vista 139.72kb 2008/03/14

(If it no longer appears on that page (page 4), look on the other pages, or try a search from http://ap.apacer.com/support/download/.)

Clicking the symbol in the Download column will download a .zip file with this name: Repair_v2.9.1.1.zip

Note that this is not a Linux utility, it's for certain versions of Windows. I have no idea if it will work with "FalconFour's UBCD->MiniXP", which is apparently the closest thing you have to Windows. But it might.


Before you decide whether or not you want to try this utility, you should consider these three things:

1. I have had no experience with this utility, nor do I have a Verbatim drive (or even an Apacer drive) to test it on. All we know is that one person posted an answer to a question at fixya.com and claimed that the utility fixed a "Verbatim store 'n' go 1 GB" flash drive. That is a hopeful sign, but certainly no guarantee that it will work for you.

2. Apacer offers this utility for Apacer drives, not Verbatim drives. While it is very possible that the design of the Verbatim drive is similar to the design of the Apacer drive, and that the utility will work properly with a Verbatim drive, as reported by 'Guest', running a utility on a piece of hardware that the utility was not designed for is generally not a good idea, as it might even cause damage. While we hope that we can believe 'Guest', running this utility is something that should probably be done only when all other options have been exhausted, just in case 'Guest' is wrong, and the utility would damage your drive. (Of course, as it is now your drive is unusable, so unless you can find an official Verbatim utility there is probably nothing else you can do to fix this, so any further damage would not leave you any worse off than you are now.)

3. As I've said before, it is quite possible that your drive has physically died. In that case using the utility will obviously not help. (On the bright side, if it has died, using the utility wouldn't hurt, either. Smile )


Anyway, this is something to try when you reach the end of your rope, and are on the verge of tossing the drive out of the window. (I probably would have reached that point long ago. Smile You have more patience than I.)

And, despite all I said above about why this utility might not work, I still think that it might be your best bet. Unless you want to spend time on what might be a futile search for an official Verbatim utility, I can think of nothing else to try.

If it was my drive, I'd try mounting it one more time just to be sure none of your recent experiments helped. Then I'd try the utility.

But I can certainly understand if you choose not to.

Good luck.
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3515
Location: West Lothian, Scotland, UK

PostPosted: Fri 15 Mar 2013, 17:27    Post subject:  

npierce:
1. "partition is still type b (W95 FAT32)"
It is indeed still so.
I'm going to try running the [portable?] program [exe file] in "FalconFours UBCD->MiniXP", and report back on the result.
I have it downloaded [to a folder in a FAT32 partition=sda2 on my internal HDD], and exe extracted.
Wish me luck. Very Happy

Karl Godt:
2. I'd have tried [and will try] your suggestion if/when I understand what it means, and what to actually do.
I was hoping to leave it to mature in my confused thoughts.
Any chance of more detailed explanation/instructions?

npierce:
3. Posting this from FalconFour's UBCD->MiniXP.
a. Used Windows Explorer to navigate to the portable program exe file, right-clicked and clicked Open.
Result = The program reports: USB Flash disk not found. Sad
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Fri 15 Mar 2013, 18:56    Post subject:  

For fat there is

bash-3.00#
Code:
dosfsck --help

dosfsck: invalid option -- -
usage: dosfsck [-aAflrtvVwy] [-d path -d ...] [-u path -u ...]
device
-a automatically repair the file system
-A toggle Atari file system format
-d path drop that file
-f salvage unused chains to files
-l list path names
-n no-op, check non-interactively without changing
-r interactively repair the file system
-t test for bad clusters
-u path try to undelete that (non-directory) file
-v verbose mode
-V perform a verification pass
-w write changes to disk immediately
-y same as -a, for compat with other *fsck

I had used RoxFiler to move .iso s from a fat flash drive today on an USB1 hub and Rox went after a lot of moves into zombie mode and i did a hard poweroff. Rox actually uses /bin/mv to move files and /bin/mv first copies and then deletes the source file. I was able to use Rox to mv the remaining .iso but mv failed to remove the source. I was able to mount on Target and Source.
Then i ran
Code:
fsck.msdos -a -f -l -v -V /dev/sdd1 >>fsck_msdos.txt 2>&1

because it had been to much in interactive mode. After that I was not able to mount the damaged .iso s on the fat flash drive Very Happy

And I get thirsty ... Could you spend a virtual beer ?
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

Joined: 15 Dec 2008
Posts: 3515
Location: West Lothian, Scotland, UK

PostPosted: Sat 16 Mar 2013, 05:23    Post subject:  

Not sure what to do. Confused
Tried this:
Code:
# fsck.msdos -a /dev/sdb1
dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN
Logical sector size is zero.
#
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Sat 16 Mar 2013, 08:28    Post subject:  

Sylvander wrote:
Result = The program reports: USB Flash disk not found. Sad

That's unfortunate.

Not having a flash drive like yours, I can't try this, so I'm not sure what, if anything, you can do to get the program to find your drive.

Before you ran the program, did Windows Explorer recognise that the drive was plugged in?

I'm assuming that the "USB Flash disk not found" message appears immediately, before the program does anything useful. Is that correct?

A search finds that some people who have used this program say that it succeeds even when it indicates it has failed. One person even reported that it worked after getting the "USB not found" message:
Quote:
Emooooo 84 Jun 08, 2011

. . . i have got this msg ( USB not found ) . i tried to format it from Win Xp it's worked Smile


alcomp Jul 28, 2008

. . . Be careful to have only the flash drive you need to repair connected to your computer, as the software has no controls, and doesn’t even allow you to choose which drive you want to format - seems like it assumes the first removable drive available is the one you want to format. If the format "fails" then quit the tool , then try format in Winxp best of luck

(Both at: http://www.fixya.com/support/t248942-remove_write_protect_usb_flash_drive)

Although it seems very unlikely that it would fix anything if it reported that it couldn't find the USB drive, it wouldn't hurt to now try formatting it in your MiniXP (a complete format, not a quick format), just in case that person was right.

Does the error message appear in a pop-up, and will the program continue if you close the pop-up?
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3515
Location: West Lothian, Scotland, UK

PostPosted: Sat 16 Mar 2013, 13:31    Post subject:  

npierce:
1. "efore you ran the program, did Windows Explorer recognise that the drive was plugged in?"
Yes; it was seen as drive d: in Windows Explorer, but it could not be opened or formatted from there.
Now checked again in MiniXP; still cannot.

2. "I'm assuming that the "USB Flash disk not found" message appears immediately, before the program does anything useful. Is that correct?"
Correct.
Checked again; still so.

3. "A search finds that some people who have used this program say that it succeeds even when it indicates it has failed. One person even reported that it worked after getting the "USB not found" message:"
OK, I'll try to use the Windows thingywhat [checked its name; it's Disk Management] to format the "device".
When attempted, the drive/partition appears to format, but the action finishes by reporting...format did not complete successfully [unable to type quotes in here].

4. "a complete format, not a quick format"
Understood.
Repeated, and didn't tick the quick format box.

5. "Does the error message appear in a pop-up, and will the program continue if you close the pop-up?"
a. Yes, it appears in a pop-up.
b. I don't think it allows any further action, just hitting OK closes the program methinks.
I'll check and report back.
Checked this; the only action available is the OK button, which closes the pop-up and the program.
Back to top
View user's profile Send private message 
linuxcbon

Joined: 09 Aug 2007
Posts: 792

PostPosted: Sat 16 Mar 2013, 15:10    Post subject:  

Did you try to "zero" the disk ?
Be careful, it will erase all data on the disk.
dd if=/dev/zero of=/dev/sdb
ps : it is not recommended to do it...only as a last chance... So let's wait what others propose...
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3515
Location: West Lothian, Scotland, UK

PostPosted: Sat 16 Mar 2013, 21:44    Post subject:  

linuxcbon:
Tried this:
1.
Code:
# dd if=/dev/zero of=/dev/sdb
dd: writing to `/dev/sdb': No space left on device
1974272+0 records in
1974271+0 records out
1010826752 bytes (1.0 GB) copied, 180.075 s, 5.6 MB/s
#

LED on Flash Drive sdb was blinking rhythmically and constantly during this operation until it completed.
sdb1 had not/not-ever/never been mounted [it was unmounted throughout].

2. GParted still shows sdb1 as "unknown" file system.
Attempt to delete partition fails.
Attempt to format fails.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sat 16 Mar 2013, 22:30    Post subject:  

I think it is only useable for dd operations . My Agfa 16gb Pendrive refuses to format the GB over ~4,5 . Have dd'ed it to a .img file that successfully mounted vfat automatically mount -o loop /path/to/rescue16gb.dd.img /mnt/loop and all .sfs and .iso inside had been mountable. The first 4,5GB had been two partitions that also did mount and got rescued. Now everytime a program tries to run a sync function , the usb-storage or sg scsi driver throws out something like that in dmesg and one core gets into 100% wait load :

[34154.930308] sd 33:0:0:0: [sdc] Sense Key : 0x0 [current]
[34154.930313] sd 33:0:0:0: [sdc] ASC=0x0 ASCQ=0x0
[34154.937808] sd 33:0:0:0: [sdc] Sense Key : 0x0 [current]
[34154.937814] sd 33:0:0:0: [sdc] ASC=0x0 ASCQ=0x0


ps -elF | grep sync :
0 D root 16612 20253 0 82 2 - 0 sync_p 0 1 22:57 pts/3 0:00 [mkfs.msdos]

So it must have damaged the firmware on that drive or the flash.
Back to top
View user's profile Send private message Visit poster's website 
linuxcbon

Joined: 09 Aug 2007
Posts: 792

PostPosted: Sun 17 Mar 2013, 01:38    Post subject:  

- After doing dd zero, did dmesg show anything at the end ?

- Type "gparted" from shell
Delete partitions.
Create a new partition.
Format the new partition.
What are the shell error messages ?
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2276

PostPosted: Sun 17 Mar 2013, 03:35    Post subject:  

That dd command appears to have succeeded -which means that there is no more partition table nor filesystem on it.

So, start again with fdisk and create your type 83 partition, then run 'mkfs.ext2 /dev/sdb1' to create the filesystem. Then, since there seem to be lots of bad blocks on there, run 'e2fsck -y /dev/sdb1'
If that doesn't succeed then you might as well throw the thing away. With so many bad blocks it must be already failing.
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3515
Location: West Lothian, Scotland, UK

PostPosted: Sun 17 Mar 2013, 05:23    Post subject:  

linuxcbon:
1.
a. Ran gparted using a console command...
Result: It only saw the partitions on the internal HDD; didn't display the opportunity to choose drive sdb. Confused
Oops, sorry, I now see I can choose at top right to display sdb1.
When I do that, it displays the partition with "unknown" filesystem.

b. When attempting to re-format to FAT32 [after completing 2 below], got this:
Code:
# gparted
======================
libparted : 2.3
======================
Unable to open /dev/sdb read-write (No medium found).  /dev/sdb has been opened read-only.
Error fsyncing/closing /dev/sdb: Input/output error
Input/output error during write on /dev/sdb
Unable to open /dev/sdb read-write (No medium found).  /dev/sdb has been opened read-only.
Error fsyncing/closing /dev/sdb: Input/output error
#


amigo:
Tried this:
2.
Code:
Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 2): 1
Partition 1 is already defined.  Delete it before re-adding it.

Command (m for help): d
Selected partition 1

Command (m for help): 1
1: unknown command
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-1974270, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-1974270, default 1974270):
Using default value 1974270

Command (m for help):

How do I create a type 83 partition?
Didn't see any opportunity to choose the type.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 7 of 11 [156 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1359s ][ Queries: 13 (0.0097s) ][ GZIP on ]