Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: Install an older extension to fix broken USB drives System
Since I installed Panther, I was unable to read anything except very short files from my USB disk: the "Copy" progress indicator did not appear, and every attempt to access the USB drive would freeze the Finder (and everything would "unfreeze" as soon as I removed the USB disk). Initially I believed the upgrade had done something that rendered my (non Mac certified) disk incompatible, but a simple

dd if=/dev/disk1 of=/tmp/x bs=1M
verified that the drive worked perfectly. Even the ancient mtools, once compiled, were able to read from the disk without any difficulty. So what next?

I decided (as I do like to live dangerously) to transplant the Jaguar msdosfs into the new system to see if it would work. Well, it did! My USB disk works fine again. One could use Pacifist to install the old kext, but we like to live dangerously, so we'll do it by hand. Insert the "Mac OS X v 10.2" Install Disk 1, and let the Finder mount it. Open a Terminal and type:

 % sudo sh
 % cd  /tmp
 % gzcat /Volumes/Mac\ OS\ X\ Install\ Disc\ 1/System/Installation/
  Packages/Essentials.pkg/Contents/Archive.pax.gz | pax -r '*msdosfs*'
 % mv /System/Library/Extensions/msdosfs.kext ~/
 % chown -R root:wheel /tmp/System
 % mv /tmp/System/Library/Extensions/msdosfs.kext /System/Library/Extensions
 % rm -rf /System/Library/Extensions.kextcache /System/Library/Extensions.mkext
 % exit
NOTE: The gzcat line has been split into two for easier reading. Remove the line break such that Packages comes immediately after the Installation/ bit on the previous line.

Now, restart the system -- yes, a restart is needed, as a kextunload - kextload of the extension will cause some weird behavior you don't really want to see! If something goes wrong, in your home directory you can find the original msdosfs.kext.

[robg adds: I'm quite hesitant to replace a current driver with that of a previous generation, and would hope that (if this problem is pervasive) Apple would address it in a system update (though 10.3.1 doesn't seem to include an updated msdosfs.kext file). However, if you have a drive that you must access, this seems to be a potential solution.]

10.3: Install an older extension to fix broken USB drives | 5 comments | Create New Account
Click here to return to the '10.3: Install an older extension to fix broken USB drives' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Install an older extension to fix broken USB drives
Authored by: iDG on Nov 23, '03 03:46:09PM
This fix, ofcourse has his number of "side effects", that I did notice only a pair of days after posting it. In my quest for a solution for this problem I ended up in downloading the sources for msdosfs.kext for both xnu 7 and xnu 6, and I discovered that there's indeed a bug in the code. Apparently it pops up only in relatively large drives and in uncommon situations...

I was able to correct the malfunctions and now I do have a Panther version of the msdos.kext that works fine. Probably I can't distribute it and I can't even post the patch... Well...

[ Reply to This | # ]
10.3: Install an older extension to fix broken USB drives
Authored by: Bin_jammin on Jan 17, '04 04:16:37PM

I've run into a problem with a USB flash drive that's severly bugging me, can you email me a patch, or instructions on patching it myself? Any help would be swell, thanks!

[ Reply to This | # ]
10.3: Install an older extension to fix broken USB drives
Authored by: logman on Apr 13, '04 04:02:04AM

I had my hopes that they'd fix this issue, but two updates later nothing has happened - I've logged a bug report on the developer site, but it's still hasn't been looked at. I've had reports in a mac lab at a University that has had to start using Zip drives because the flash drives don't work - have you posted the fix to Apple??

[ Reply to This | # ]
10.3: Install an older extension to fix broken USB drives
Authored by: Haukka on Jul 02, '04 08:52:34AM

I thought the problem was with the USB driver, but this explains a lot. However there is still no fix from Apple. I even went as far as downloaded the xnu and msdosfs sources for both 10.2.8 and 10.3.4, but there was far too many changed in the msdosfs code between those two to easilly figure out what the problem is, and I really dont have time to delve too deeply in to the code.

What is preventing IDG from releasing patches? The Apple OS Licence? (I admit, havent read it through with thought) How about just pointing in the right direction? I would really like to get this working as I need to move stuff between windows and my mac, and would like to use my USB-IDE harddrive for that. NTFS just wont do, as I cant write onto that, and I even had some trouble reading it (some files would show, and some not).

[ Reply to This | # ]
10.3: Install an older extension to fix broken USB drives
Authored by: iDG on Aug 27, '06 06:38:39AM
Two years went by, and still no fix from apple...

I found out that a lot of devices still have this limitation, for example most of the SD/MMC/CF/MS readers, the "drive mode" of palm compatible hand helds, and even some Sony Ericsson phones. The bug was not that evident two years ago, because the devices had far less storage space...

I'm able to compile msdosfs.kext again, for macos 10.4.x PPC. I've no idea about how to compile it for x86 macs...

The patch is still the same:

--- msdosfs_fat-orig.c  2006-08-27 15:34:28.000000000 +0200
+++ msdosfs_fat.c       2006-08-27 15:34:29.000000000 +0200
@@ -505,8 +505,16 @@
-       if (sp)
-               *sp = (i - findcn + 1) * pmp->pm_bpcluster;
+if 0 
+           *sp = (i - findcn + 1) * pmp->pm_bpcluster;
+       {
+       u_long calcmax=131071/pmp->pm_bpcluster;
+               // printf("number=%d max=%d calculated max=%d/%dn",(i - findcn + 1),numclusters,MIN(i - findcn + 1,calcmax),calcmax);
+               *sp = MIN(i - findcn + 1,calcmax) * pmp->pm_bpcluster;
+       }
        fc_setcache(dep, FC_LASTMAP, i, cn);

[ Reply to This | # ]