2004-06-28 08:44:02

by Ferry

[permalink] [raw]
Subject: USB Memory Stick issues (After using it in Wyse Terminal (WindowsCE.NET))

Hey there,

first off, I'm not on the list, so please CC me.

I'm having some issues with my USB memory stick after using it in a Wyse
Terminal (WS3125SE with Mass Storage Add-On 1.0 Build 9). Let's get things
straight, when I just got the stick it worked just fine, with the partition that
was on there. If I repartition it, it works fine as well.

After I stuck my USB stick into the Wyse terminal I lost all data that was on
it. Appearantly the Wyse Mass Storage Add-On does -not- like a partition on the
device and I think it created some sort of raw file system. This is readable
with the standard driver on Windows 2000/XP and under disk management it says
that there is a partition (FAT) on it. However, if I look under linux it doesn't
show any partitions at all, nor am I able to mount /dev/sda (without partition
number) even when specifying vfat or msdos as the filesystem. On 2.6.6 (now
running 2.6.7) I also had the weird problem that after this happened, linux
would see my drive as a 1GB drive or something whilst it is only a 256MB
(according to cfdisk/fdisk, I saw in the archives others had this problem as
well, haven't checked this before I had it in the Wyse terminal).

Anyways, I'm able to use this stick either under linux and windows with a
partition on it, -or- under wyse terminal and windows, with appearantly no
partition on it. Although disk management under windows does show a partition,
for some strange reason it does not allow you to delete nor create partitions on
usb sticks.

Is there any way I can get it work with this strange filesystem on it? Perhaps
other devices use this 'filesystem?' by default too, as I've seen several tests
where USB sticks did show up as a SCSI device, but weren't able to mount them
and didn't show partitions.

Sorry if this has been asked before, I did a fair share of searching but
couldn't dig up anything that seems related to this problem.

If I can help in any way please let me know.

Kind regards,

Ferry van
Steen

---------------------------------------------
Dit bericht is verzonden via Postbakje Free.
http://www.postbakje.nl/ - Gratis WebMail



2004-06-28 20:01:43

by Andries Brouwer

[permalink] [raw]
Subject: Re: USB Memory Stick issues (After using it in Wyse Terminal (WindowsCE.NET))

On Mon, Jun 28, 2004 at 12:40:43PM +0000, [email protected] wrote:

> 00000000 eb fe 90 00 00 00 00 00 00 00 00 00 02 08 01 00 |................|
> 00000010 01 00 01 00 00 f0 fa 00 00 00 00 00 00 00 00 00 |................|
> 00000020 00 d0 07 00 00 00 29 1e 00 df 07 50 41 52 54 30 |......)....PART0|
> 00000030 30 20 20 20 20 20 46 41 54 31 36 20 20 20 00 00 |0 FAT16 ..|
> 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

Ah, yes, I see. Please try the below patch.
(Cut & pasted - tabs will have become spaces.)

Andries


% diff -u -U6 /linux/2.6/linux-2.6.7/linux/fs/fat/inode.c inode.c
--- /linux/2.6/linux-2.6.7/linux/fs/fat/inode.c 2004-06-24 17:11:20
+++ inode.c 2004-06-28 22:03:25
@@ -827,24 +827,26 @@
if (!b->fats) {
if (!silent)
printk(KERN_ERR "FAT: bogus number of FAT structure\n");
brelse(bh);
goto out_invalid;
}
+#if 0
if (!b->secs_track) {
if (!silent)
printk(KERN_ERR "FAT: bogus sectors-per-track value\n");
brelse(bh);
goto out_invalid;
}
if (!b->heads) {
if (!silent)
printk(KERN_ERR "FAT: bogus number-of-heads value\n");
brelse(bh);
goto out_invalid;
}
+#endif
media = b->media;
if (!FAT_VALID_MEDIA(media)) {
if (!silent)
printk(KERN_ERR "FAT: invalid media value (0x%02x)\n",
media);
brelse(bh);