MSFN Forum: Strange Problems with Pendrives - MSFN Forum

Jump to content



  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

Strange Problems with Pendrives One day they suddenly stop being recognized properly Rate Topic: -----

#21 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 3,966
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 13 December 2009 - 06:34 PM

View PostLoneCrusader, on Dec 13 2009, 07:44 PM, said:

Whenever I'm finished with my flash drive at college this week I think I may just reformat it, from what you all are telling me it seems to have some bizarre settings.

There's no hurry to do it, so take your time. I see no need to reformat, however. Moreover, reformating per se wouldn't change anything, since the problems identified are all in the MBR. You'd have to repartition and reformat. But, just by repairing the problems found by jaclaz, through editing those three bytes as described by RLoew, you pendrive should be fine again, so repartitioning and reformatting seem to me a bit of overkill. Moreover, anyone of us might do it for you in the MBR image you attached and attach it back, so that all you'd need to do would be to write the MBR sector back, using HDHacker (just make sure you are writing to the right disk, before actually doing it).


#22 User is offline   rloew 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 761
  • Joined: 30-May 05
  • OS:98SE
  • Country: Country Flag

Posted 14 December 2009 - 01:16 AM

View PostLoneCrusader, on Dec 13 2009, 04:44 PM, said:

View Postrloew, on Dec 13 2009, 04:30 PM, said:

The Geometry of 32 Heads and 63 Sectors is not unusual for USB Flash Drives. I have seen 16 Heads as well.

The most important fix for this Pendrive is changing the Partition ID, at offset 1C2H, from 1BH to 0CH.

To avoid potential partitioning problems in the future, the CHS entries should be corrected.
The CHS End Cylinder High 2 Bits and Sector, at offset 1C4H, should be changed from 3FH to 0FFH.
The CHS End Cylinder Low Byte, at offset 1C5H, should be changed from 8CH to 0FFH


Whenever I'm finished with my flash drive at college this week I think I may just reformat it, from what you all are telling me it seems to have some bizarre settings.

@rloew - While you're here I'd appreciate your input on the question I asked jaclaz in the other thread. :)


You didn't say which question. I assume you are referring to your question about FileSystems that only Dencorso has replied to so far.
I have thought about Patching the FAT32 FileSystem to support >4GB files but have not run yet run the tests or done the analysis to see if it is feasible.
There may be limitations at higher levels, such as the 2GB Copy limit others have found.
I haven't found a source for documentation on Installable File Systems for Win 9X.
So far the only Patches I have written for VFAT.VXD are for the 1TB Partition Limit and support for 128KB Clusters. An experimental Patch is wating for Hard Drives larger than 2TB to become available.

#23 User is offline   LoneCrusader 

  • Tu ne cede malis, sed contra audentior ito.
  • Group: Supreme Sponsor
  • Posts: 392
  • Joined: 11-May 09
  • OS:98SE
  • Country: Country Flag

Posted 14 December 2009 - 01:37 AM

View Postrloew, on Dec 14 2009, 02:16 AM, said:

I assume you are referring to your question about FileSystems that only Dencorso has replied to so far.
I have thought about Patching the FAT32 FileSystem to support >4GB files but have not run yet run the tests or done the analysis to see if it is feasible.


Yep, that's the question. Patching the FAT32 filesystem sounds like a good idea if it's possible, however I can see how this might be a somewhat awkward process if one had to install the patched VFAT.VXD on each and every machine (And this would no doubt include 2K/XP/Vista/Win7 machines as well I assume) that he wanted to be able to write a 4GB+ file to or use a FAT32 formatted flash disk in for said purpose.

Is there a possiblility of writing a Windows 98 driver for exFAT? I have seen it mentioned on here before, not sure of the legalities involved, but provided it's not illegal I think it would be a very useful utility.
EDIT: Never mind, I see on Wikipedia that Microsoft is still charging a licensing fee for exFAT implementations.

This post has been edited by LoneCrusader: 14 December 2009 - 01:52 AM


#24 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,107
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 14 December 2009 - 03:02 AM

View Postrloew, on Dec 13 2009, 10:30 PM, said:

The Geometry of 32 Heads and 63 Sectors is not unusual for USB Flash Drives. I have seen 16 Heads as well.


Well, no.

The 16/63 geometry is rather common, the 32/63 is far less common, but BOTH can be found on very small capacity sticks, I have never seen any of them on a "large" stick, this one is a 16 Gb one!

Usually whatever goes above the CHS limits for a given geometry uses NOT the "smaller" geometry:
http://www.boot-land.net/forums/index.php?...=9776&st=56

Quote

We have CHS limit at:
255/63->1024*255*63*512=8,422,686,720<-Current geometry on "modern" BIOS and OS, say since 1998
128/63->1024*128*63*512=4,227,858,432<- Rarely used (default in WinHex if I remember right)
64/63->1024*64*63*512=2,113,929,216<-Really rarely used (cannot remember a single system/OS that used it)
16/63->1024*16*63*512=528,482,304<-Old geometry and first HD size barrier
64/32->1024*64*32*512=1,073,741,824<- this was "old" NT 3.51/4.00 default
240/63->1024*240*63*512=7,927,234,560<- only stoopid laptops AFAICR


The CHS limit at 32/63 is obviously:
32/63->1024*32*63*512=1,056,964,608 >- as said very unusual in my experience

View PostLoneCrusader, on Dec 14 2009, 08:37 AM, said:

Is there a possiblility of writing a Windows 98 driver for exFAT? I have seen it mentioned on here before, not sure of the legalities involved, but provided it's not illegal I think it would be a very useful utility.
EDIT: Never mind, I see on Wikipedia that Microsoft is still charging a licensing fee for exFAT implementations.


Again, NO.
Read the related thread here:
http://www.msfn.org/board/ntfs-support-win...14-page-44.html
At least in Europe, there would be NO problems in writing an exFAT driver from a legal standpoint, for interchange use, and most probably the same would apply to the "fair use" provisions of the US Law.
The "licensing fee" is for devices using the filesystem, not for programs capable of reading/writing it.


jaclaz

This post has been edited by jaclaz: 14 December 2009 - 03:07 AM


#25 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 3,966
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 14 December 2009 - 03:49 AM

View Postrloew, on Dec 14 2009, 05:16 AM, said:

I haven't found a source for documentation on Installable File Systems for Win 9X.
Well, there is Inside the Windows 95 File System, by Stan Mitchell, available used at amazon.com at affordable prices. It's very comprehensive, and unique as a source, AFAIK. An one of the examples in the companion diskette is fsinfile, that implements a file system within a file, as a remote filesystem.

#26 User is offline   rloew 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 761
  • Joined: 30-May 05
  • OS:98SE
  • Country: Country Flag

Posted 15 December 2009 - 12:05 AM

I have done some further testing and code analysis, and determined that there are multiple problems with trying to support files larger than 4GB in Windows 9X besides the FileSystem. Installing a new FileSystem will not solve these problems since the FileSystem will never even see File Offsets greater that 4GB.

The following are two issues I have found so far.

SetFilePointer allows 64-Bit Offsets but the Windows 9X Version blocks values outside +/- 4GB within the first few instructions.
Bypassing the check shows that only the lower 32-Bits of the Offset ever reach VFAT.VXD.

IFSMgr_Ring0_FileIO performs File I/O from Ring 0 Code. It uses EDX to pass a File Offset, so the interface would have to be changed to support larger files. This would require Patching all Software that call this function, including an unknown amount of Vendor Software.

I suspect there are many more problems I have not identified.

The only approach I am thinking about at this time, is to hook the User APIs so that a set of smaller Files will appear as one large File to Applications that want to use more than 4GB.

This post has been edited by rloew: 15 December 2009 - 12:08 AM


#27 User is offline   LoneCrusader 

  • Tu ne cede malis, sed contra audentior ito.
  • Group: Supreme Sponsor
  • Posts: 392
  • Joined: 11-May 09
  • OS:98SE
  • Country: Country Flag

Posted 15 December 2009 - 01:11 AM

View Postrloew, on Dec 15 2009, 01:05 AM, said:

I have done some further testing and code analysis, and determined that there are multiple problems with trying to support files larger than 4GB in Windows 9X besides the FileSystem. Installing a new FileSystem will not solve these problems since the FileSystem will never even see File Offsets greater that 4GB.

Well it doesn't look too promising, does it?

Quote

the Windows 9X Version

Is it possible a later version of these functions could be implemented with KernelEx or a similar compatiblity-layer type application, thereby bypassing the need to patch a bunch of different software?

Just trying to think logically, I have no coding or programming experience, so if I say something stupid please bear with me. :D

This post has been edited by LoneCrusader: 15 December 2009 - 01:12 AM


#28 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 3,966
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 15 December 2009 - 01:19 AM

View PostLoneCrusader, on Dec 15 2009, 05:11 AM, said:

Quote

the Windows 9X Version

Is it possible a later version of these functions could be implemented with KernelEx or a similar compatiblity-layer type application, thereby bypassing the need to patch a bunch of different software?

I think it's not possible. They're too low-level and deep inside the core of the OS. Sorry.

#29 User is offline   rloew 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 761
  • Joined: 30-May 05
  • OS:98SE
  • Country: Country Flag

Posted 15 December 2009 - 12:51 PM

View PostLoneCrusader, on Dec 15 2009, 02:11 AM, said:

Just trying to think logically, I have no coding or programming experience, so if I say something stupid please bear with me. :D


No problem.

"Stupid" is when you ask a question and there is no excuse for you not knowing better.
If you claimed experience with Kernel Programming then it might have been a stupid question.

#30 User is offline   LoneCrusader 

  • Tu ne cede malis, sed contra audentior ito.
  • Group: Supreme Sponsor
  • Posts: 392
  • Joined: 11-May 09
  • OS:98SE
  • Country: Country Flag

Posted 15 December 2009 - 01:55 PM

Well I suppose it's time to get back to the problem at hand, because now it's more complicated.

:realmad:
A few minutes ago, I copied all of the data (excluding one folder) from my flash drive to a Windows XP machine so I could burn it to a CD or put it back on the drive once this problem is fixed.

The folder I excluded contained a small handful of files from an openSUSE 11 Linux installation. There were a couple of graphics, about 3 screenshots, one text document, a backup of bookmarks.html from Firefox, and about six configuration files (customizing KDE, auto login, etc). I planned to copy these files to a temporary folder on a linux machine and then put them back on the drive when fixed. Now all but two of the files on the flash drive have disappeared. I did not even access this folder when I was copying the others to XP, so I know I did not accidentally delete them.

Is there a way to recover them? And whether there is or not, this drive is destined for a repartition and reformat!

#31 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,107
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 15 December 2009 - 02:03 PM

View PostLoneCrusader, on Dec 15 2009, 08:55 PM, said:

Is there a way to recover them? And whether there is or not, this drive is destined for a repartition and reformat!

PHOTOREC:
http://www.cgsecurit...g/wiki/PhotoRec
If you know the file types it should be also rather quick.

Or any other file recovery software.

See also here:
http://www.msfn.org/board/recovering-accid...es-t113511.html
http://www.msfn.org/...ool-t84345.html

jaclaz

#32 User is offline   LoneCrusader 

  • Tu ne cede malis, sed contra audentior ito.
  • Group: Supreme Sponsor
  • Posts: 392
  • Joined: 11-May 09
  • OS:98SE
  • Country: Country Flag

Posted 10 January 2010 - 11:24 PM

Ok, time to return to this problem...
After losing power for 10 days throughout Christmas, and twice going through ~12GB of data recovered from the disk in search of less than ~10MB of data (including over 3,000 text files!) :wacko:

PhotoRec managed to find most of the files that I needed back, but I lost my edited scripts for KDE and such. At least it recovered the graphics, text files can be rewritten.

I think I have recovered everything I can from the drive, so now it's time to repartition and reformat. jaclaz, I remember you posted a link earlier to some tools for achieving this, just wondered if anyone had a specific recommendation. I'd prefer something that runs in 98 if possible, but I can use XP if I must.

Also.. is there a way to do a thorough "test" on a flash drive? I took a look at some of the reviews on this drive at Newegg where I ordered it from, and it seems that this particular model of Data Traveler seems to have more problems than others. (I know reviews can be subjective, but it's got me wondering.)


@jaclaz
A special thanks for sending me to the PhotoRec/TestDisk site, because it's been more useful than I ever imagined (I think you saw my post in the Windows XP forum) :thumbup

#33 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,107
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 11 January 2010 - 04:08 AM

View PostLoneCrusader, on Jan 11 2010, 06:24 AM, said:

PhotoRec managed to find most of the files that I needed back, but I lost my edited scripts for KDE and such. At least it recovered the graphics, text files can be rewritten.


I think I have recovered everything I can from the drive, so now it's time to repartition and reformat. jaclaz, I remember you posted a link earlier to some tools for achieving this, just wondered if anyone had a specific recommendation. I'd prefer something that runs in 98 if possible, but I can use XP if I must.


oh, oh....
blatant breaking of "Rules" #2 and, much worse, #4 detected :w00t::
http://www.msfn.org/board/data-recovery-to...345-page-7.html

No way I can suggest an utility over the other (because of the "assumptions" ;)).

The hard way :ph34r: (and needing 2K/XP):
http://www.boot-land...?showtopic=5000
http://www.boot-land.net/forums/index.php?...c=5000&st=1
(but my assumptions are as good as anyone else's ;))


The good ol' way (DOS), though accessing USB through DOS is YOUR problem ;)):
http://www.ranish.com/part/

ANOTHER experimental way:
http://partitionlogi...g.uk/index.html

View PostLoneCrusader, on Jan 11 2010, 06:24 AM, said:

Also.. is there a way to do a thorough "test" on a flash drive? I took a look at some of the reviews on this drive at Newegg where I ordered it from, and it seems that this particular model of Data Traveler seems to have more problems than others. (I know reviews can be subjective, but it's got me wondering.)

Sure there are ways.
But "thorough" is quite a "heavy" word. :whistle:
Expecially if the thingy has some form of "wear leveling" the ONLY thing you can actually rely on is the APPROPRIATE "Manufacturer Tool" (if available).
Compare with these, to have an idea of what I am talking about:
http://www.msfn.org/...ve-t137990.html
http://www.forensicfocus.com/index.php?nam...opic&t=3542

View PostLoneCrusader, on Jan 11 2010, 06:24 AM, said:

@jaclaz
A special thanks for ....

You are welcome. :)

jaclaz

#34 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 3,966
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 11 January 2010 - 04:44 AM

View Postjaclaz, on Jan 11 2010, 08:08 AM, said:

View PostLoneCrusader, on Jan 11 2010, 06:24 AM, said:

I think I have recovered everything I can from the drive, so now it's time to repartition and reformat. jaclaz, I remember you posted a link earlier to some tools for achieving this, just wondered if anyone had a specific recommendation. I'd prefer something that runs in 98 if possible, but I can use XP if I must.
The good ol' way (DOS), though accessing USB through DOS is YOUR problem ;)):
http://www.ranish.com/part/
That's exacltly how I do it: the Ranish Partition Manager (with v. 2.40 or 2.44 Beta!) in Win 98 SE with NUSB 3.3 providing the disk access. Works like a charm! I described it in more detail in this post. So long as you restrict yourself to partitioning and formating just the pen-drive, it's pretty safe. Now, if you mess with a fixed disk by mistake... :ph34r: Well, now you cannot say you were not warned. :)

#35 User is offline   LoneCrusader 

  • Tu ne cede malis, sed contra audentior ito.
  • Group: Supreme Sponsor
  • Posts: 392
  • Joined: 11-May 09
  • OS:98SE
  • Country: Country Flag

Posted 15 January 2010 - 02:19 AM

View Postjaclaz, on Jan 11 2010, 05:08 AM, said:

oh, oh....
blatant breaking of "Rules" #2 and, much worse, #4 detected :w00t::
jaclaz

:o Ok, Ok, I won't give up on it yet. Time to test other tools I suppose. :)

View Postdencorso, on Jan 11 2010, 05:44 AM, said:

The good ol' way (DOS), though accessing USB through DOS ... in Win 98 SE with NUSB 3.3 providing the disk access.

I think I'll probably use this method whenever I've tried out some more of jaclaz's recovery tools. :thumbup



Of course.. now I have another flash drive "problem" for you guys :ph34r:

Just bought a new pair of Kingston 8GB Data Travelers. Ive been using one of them in an XP environment at college with no data problems so far. I decided I would insert the other (still blank) one to have a look at it and make sure that it was recognized properly. It was, and it shows up in both 98 & XP. However.... I happened to notice that they show a different "Used space" count in their General Properties tab in each OS. :blink: (Screenshots below)

Could something like this be responsible for the problems that I had with the original 16GB drive? If so, what do I do to correct it before I lose more data?

Posted Image
Posted Image

This post has been edited by LoneCrusader: 06 March 2011 - 12:06 PM


#36 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 3,966
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 15 January 2010 - 04:05 AM

Before anything, apply KB240075 UHCD.SYS hotfix and see whether that solves your problem (read also these 3 posts: link and the original KB240075, thanks to the Wayback Machine)... It seems newer Kingstons don't merge well with the original (v. 4.10.2222) UHCD.SYS.

#37 User is offline   LoneCrusader 

  • Tu ne cede malis, sed contra audentior ito.
  • Group: Supreme Sponsor
  • Posts: 392
  • Joined: 11-May 09
  • OS:98SE
  • Country: Country Flag

Posted 15 January 2010 - 11:53 AM

View Postdencorso, on Jan 15 2010, 05:05 AM, said:

Before anything, apply KB240075 UHCD.SYS hotfix ...

Did that back at the beginning of the thread. :thumbup
I have version 4.10.2223 of UHCD.SYS. The drive is recognized properly - no yellow exclamations or anything. Just a different space count than XP.

#38 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 3,966
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 15 January 2010 - 01:04 PM

"Curioser and curioser", as Alice would put it! :D
Let's sure investigate further your finding. So, while we're at it:
1) Don't write anything to it.
2) Don't format or reformat it.
3) Don't partition or repartition it.
(I'm sure waitng a few days before starting to use it normally should be bearable, since you've just bought it and are as curious, as I am to figure out what's happening. Knowledge is sure worth the wait :) ).
4) Can you create a full-disk,blind sector-by-sector image of it? As it's new, most of it probably is already zeroes, so it ought to compress nicely, for us to be able to peruse its internals... What imaging software do you have at hand? And, last, but not least, what, if any, hexeditor do you have at hand?

#39 User is offline   LoneCrusader 

  • Tu ne cede malis, sed contra audentior ito.
  • Group: Supreme Sponsor
  • Posts: 392
  • Joined: 11-May 09
  • OS:98SE
  • Country: Country Flag

Posted 15 January 2010 - 05:44 PM

View Postdencorso, on Jan 15 2010, 02:04 PM, said:

"Curioser and curioser", as Alice would put it! :D
... Knowledge is sure worth the wait :)

Yes. :yes: I plan to get to the bottom of this somehow, these things are driving me crazy. :crazy:


(Off Topic Rant)
I've always hated USB devices. I used Windows 95 forever, and loved it, and I hated anything that would not work in it. My little Windows 95 desktop ran anything and everything I wanted it to back in the day. I once bought an external CD burner that connected to the parallel printer port to avoid having to upgrade to 98 to use a USB one. :w00t: Haha!
Even after later having to upgrade to 98SE, I avoided buying ANY device that required USB up until about 8 months ago, when I discovered NUSB on here. And since then, with these weird problems, my opinion of USB devices has not improved much! :thumbdown
(/Off Topic Rant)



View Postdencorso, on Jan 15 2010, 02:04 PM, said:

4) Can you create a full-disk,blind sector-by-sector image of it? As it's new, most of it probably is already zeroes, so it ought to compress nicely, for us to be able to peruse its internals... What imaging software do you have at hand? And, last, but not least, what, if any, hexeditor do you have at hand?

I've not done a lot of work with imaging other than what has been discussed here in the other threads. I'm all ears though. It might take me some time, just tell me what I need to do.

I have PowerQuest DriveImage 2002, and I'm most familiar with it. I also have Partimage which I have used a little. Beyond that, I have a Clonezilla CD somewhere that I haven't used. I'll have a look around and see if there's anything else I haven't thought of. If you guys need me to use a specific program for anything, just say so.

I have basically zero experience with Hex Editing. Not that I wouldn't like to learn. :sneaky: But I have UltraEdit-32 v11.20b and a very basic program called HexEdit on hand.

#40 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,107
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 15 January 2010 - 06:07 PM

TODISK (MS-DOS / Win9x_MS-DOS_BOX):
http://johnson.tmfc....dos/todisk.html

Partition Saving:
http://damien.guibou...ndex_frame.html

Roadkil's Diskimage:
http://www.roadkil.n...hp?ProgramID=12

jaclaz

Share this topic:


  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy