2.6.0-test9 VFAT problem
Quoted 7 lines · Patrick Beard
I'm having trouble with my smartmedia. Whenever (occasionally it will mount - but very rare) I try to mount it I get the following;
mount: wrong fs type, bad option, bad superblock on/dev/sda, or too many mounted file systems
dmesg shows;
FAT: Bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sda
Oh, no, not again... :(
We had the same problem few weeks ago... a patch is in the archives, it worked for me.
Signature · 3 lines
[email protected], IRC:*@Martin, /bin/zsh. C|N>K Linux moria 2.6.0-test9 #1 Sat Oct 25 23:00:37 CEST 2003 i686 12:31:15 up 8 days, 21:48, 1 user, load average: 0.29, 0.29, 0.27
Quoted 7 lines
Quoted 2 lines
FAT: Bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdaOh, no, not again... :(
We had the same problem few weeks ago... a patch is in the archives, it worked for me.
I did apply Andries's 'Relax FAT checking' patch last night but the only difference I noticed was my belkin reader changed it's error to 'no media found' the camera still gave 'wrong fs...'
After advice from Philippe and Andries and the following I found on a website;
"The problem is that Linux only looks at the disk geometry the first time the camera is plugged in. So when you unplug the camera and change the memory card Linux does not check to see if the geometry has changed."
I really hope I've not chased my tail by hitting the following combination 'up-patched inode.c' + 'trying to use sda after a deja search' and finally 'Linux only checking the geometry once'. I'd like to put this thread on hold until I take stock of the steps I've taken just to make sure I've not been a right 'plum'.
--
Patrick
Quoted 2 lines · Patrick Beard
Quoted 2 lines
Quoted 2 lines
FAT: Bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sda
I'm not getting these messages, but I did just now run into a weird vfat over usb_storage problem.
Camera is an Olympus C-3020, kernel is 2.6.0-test9-mm3, the usual configs to allow access to this camera.
The card was about full, so I turned it on and mounted it as usual. Acessing it with filerunner, I started at the top of the list, deleting pix I had already downloaded to /usr/pix. I deleted about 15 in the first batch, then around 10 in the next batch, and about 20 in the third batch. Hi-lighting about another 20 and hitting delete got me a read-only file system error on the last one, but it did delete the rest of them. I had about 60 left to delete, but had to umount the camera and turn it off, turn it back on about 10 secs later, and remount the camera (same device BTW, thanks guys) about 5 or 6 times before I was able to get that 64meg card all cleaned out.
And once again, I have NDI if its buggy software in the camera, or a usb_storage problem.
Here is one such section of the messages log:
Nov 14 09:19:51 coyote kernel: hub 3-2:1.0: new USB device on port 3, assigned address 9 Nov 14 09:19:51 coyote kernel: scsi4 : SCSI emulation for USB Mass Storage devices Nov 14 09:19:52 coyote kernel: Vendor: OLYMPUS Model: C-3020ZOOM(U) Rev: 1.00 Nov 14 09:19:52 coyote kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 14 09:19:52 coyote kernel: SCSI device sda: 128000 512-byte hdwr sectors (66 MB) Nov 14 09:19:52 coyote kernel: sda: Write Protect is off Nov 14 09:19:52 coyote kernel: sda: assuming drive cache: write through Nov 14 09:19:52 coyote kernel: sda: sda1 Nov 14 09:19:52 coyote kernel: Attached scsi removable disk sda at scsi4, channel 0, id 0, lun 0 Nov 14 09:19:52 coyote kernel: Attached scsi generic sg2 at scsi4, channel 0, id 0, lun 0, type 0 Nov 14 09:20:34 coyote kernel: FAT: Filesystem panic (dev sda1) Nov 14 09:20:34 coyote kernel: fat_free: deleting beyond EOF (i_pos 0) Nov 14 09:20:34 coyote kernel: File system has been set read-only
The "assigned address" was being incremented per disconnect. And, /dev/camera is a link to /dev/sda1. Is this wrong? However attempting to mount it useing /dev/sg2 fails, not a valid block device.
Comments? Screwed up kernel .config? Is mount "-t vfat" the correct filesystem?
Thanks.
Signature · 7 lines
Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.27% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attornies please note, additions to this message by Gene Heskett are: Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
Quoted 7 lines · Gene Heskett
Quoted 2 lines · Patrick Beard
Quoted 2 lines
Quoted 2 lines
FAT: Bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdaNov 14 09:20:34 coyote kernel: FAT: Filesystem panic (dev sda1) Nov 14 09:20:34 coyote kernel: fat_free: deleting beyond EOF (i_pos 0) Nov 14 09:20:34 coyote kernel: File system has been set read-only
Is this reproduced easy? Looks like reading the zeroed block. In order to know details, could you try to read the data without mount?
For example, what happen by the following repetitions?
dd if=/dev/sda | md5sum
unload driver(reset device) or unplug device
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Quoted 10 lines · OGAWA Hirofumi
Quoted 8 lines · Gene Heskett
Quoted 2 lines · Patrick Beard
Quoted 2 lines
Quoted 2 lines
FAT: Bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdaNov 14 09:20:34 coyote kernel: FAT: Filesystem panic (dev sda1) Nov 14 09:20:34 coyote kernel: fat_free: deleting beyond EOF(
i_pos0) Nov 14 09:20:34 coyote kernel: File system has been
set read-only
Quoted 8 lines
Is this reproduced easy? Looks like reading the zeroed block. In order to know details, could you try to read the data without mount?
For example, what happen by the following repetitions?
dd if=/dev/sda | md5sum
unload driver(reset device) or unplug device
dd if=/dev/sda1|md5sum <--note use of the same device as to read pix. has been running for 3 or so minutes now, steadily reading the camera. I shoulda put a time in front of it! Ok got it, heres the sum:
127945+0 records in
127945+0 records outf6c568dd1f35bb37f3d667a2ab228e2f
its a 64 meg card. I'll have to unplug the camera (and cycle its power too) as all this is compiled into the kernel.
Ok, repeat run, with time this time:
Mmm, didn't get the md5sum, just the time, which was
real 2m39.807s user 0m1.052s sys 0m1.984s
So I'll do another run, without the reset and without the time:
[root@coyote root]# dd if=/dev/sda1 | md5sum
127945+0 records in
127945+0 records outf6c568dd1f35bb37f3d667a2ab228e2f
so the sums are the same, one more repeat, this time from powerdown reset and unplugged.
Purrfect repeat of the above. Now lets see if /dev/sda will read it... Yes it does. Am I to understand that the non-numbered version of the device is the raw read from LSN0 of the device? Ahh, that of course gets a different sum, and number of records read:
This is without the reset:
[root@coyote root]# dd if=/dev/sda | md5sum
128000+0 records in
128000+0 records outb074ba314ac23f234b6d27da78e1e093
reset and restart, replug etc and again:
[root@coyote root]# dd if=/dev/sda | md5sum
128000+0 records in
128000+0 records outb074ba314ac23f234b6d27da78e1e093
Looks like another flawless repeat here, and I'm probably making a serious dent in the batteries by now, that thing is positively ravenous when it comes to eating batteries.
What does this tell us?
Signature · 7 lines
Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.22% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attornies please note, additions to this message by Gene Heskett are: Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
Quoted 2 lines
What does this tell us?
Have you tried running a dosfsck on that?
Cheers,
MaZe.
Quoted 4 lines · Maciej Zenczykowski
Quoted 1 line
What does this tell us?
Have you tried running a dosfsck on that?
No, but here it is, on both sda and sda1:
[root@coyote root]# dosfsck /dev/sda
dosfsck 2.8, 28 Feb 2001, FAT32, LFN
Logical sector size is zero.
[root@coyote root]# dosfsck /dev/sda1
dosfsck 2.8, 28 Feb 2001, FAT32, LFN/dev/sda1: 2 files, 2/3997 clusters
That first one doesn't look kosher to me!
Q: Is FAT32 the same as VFAT?
Quoted 9 lines
Cheers,
MaZe.-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 7 lines
Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.27% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attornies please note, additions to this message by Gene Heskett are: Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
Quoted 5 lines
No, but here it is, on both sda and sda1:
[root@coyote root]# dosfsck
/dev/sdadosfsck 2.8, 28 Feb 2001, FAT32, LFN Logical sector size is zero.
We've already determined that /dev/sda is the partition table and should thus fail.
Quoted 3 lines
[root@coyote root]# dosfsck
/dev/sda1dosfsck 2.8, 28 Feb 2001, FAT32, LFN/dev/sda1: 2 files, 2/3997 clusters
Hmm so it passes.
Could you try passing -v (for verbose) to the fsck...
Also perhaps just do
cat /dev/sda1 > /tmp/file
dosfsck -v /tmp/file
mount -o loop /tmp/file /mnt/somewhere
and see if that fails, if so the bug is pure vfat
then try bzipping the /tmp/file and posting it somewhere and pass the link and I'll take a look...
Quoted 2 lines
That first one doesn't look kosher to me!
Q: Is FAT32 the same as VFAT?
FAT32 is one possibility of VFAT - VFAT is any FAT(12,16,32) with long filenames.
Cheers,
MaZe.
Quoted 9 lines · Maciej Zenczykowski
Quoted 5 lines
No, but here it is, on both sda and sda1:
[root@coyote root]# dosfsck
/dev/sdadosfsck 2.8, 28 Feb 2001, FAT32, LFN Logical sector size is zero.We've already determined that
/dev/sdais the partition table and should thus fail.
Quoted 6 lines
Quoted 3 lines
[root@coyote root]# dosfsck
/dev/sda1dosfsck 2.8, 28 Feb 2001, FAT32, LFN/dev/sda1: 2 files, 2/3997 clustersHmm so it passes.
Could you try passing -v (for verbose) to the fsck...
I could, but a much larger problem is that cups managed to self destruct on a reboot, and I now have no printing facility at all, and thats more important since I like to print my bank activities for my records in case things get out of synch. However, that shouldn't take too much time so here goes.
[root@coyote cups-1.1.20rc6]# dosfsck -v /dev/sda1 dosfsck 2.8 (28 Feb 2001)
dosfsck 2.8, 28 Feb 2001, FAT32, LFN
Boot sector contents:
System ID " "
Media byte 0xf8 (hard disk)
512 bytes per logical sector
16384 bytes per cluster
1 reserved sector
First FAT starts at byte 512 (sector 1)
2 FATs, 12 bit entries
6144 bytes per FAT (= 12 sectors)
Root directory starts at byte 12800 (sector 25)
256 root directory entries
Data area starts at byte 20992 (sector 41)
3997 data clusters (65486848 bytes)
32 sectors/track, 8 heads
55 hidden sectors
127945 sectors total
Checking for unused clusters./dev/sda1: 2 files, 2/3997 clusters
------------------------
The card is now empty, so that looks reasonable to me. But what do I know about a messydos filesystem? Zilch is what...
Quoted 16 lines
Also perhaps just do
cat/dev/sda1>/tmp/file
dosfsck -v/tmp/file
mount -o loop/tmp/file/mnt/somewhere
and see if that fails, if so the bug is pure vfat
then try bzipping the/tmp/fileand posting it somewhere and pass the link and I'll take a look...Quoted 2 lines
That first one doesn't look kosher to me!
Q: Is FAT32 the same as VFAT?FAT32 is one possibility of VFAT - VFAT is any
FAT(12,16,32)with long filenames.Cheers,
MaZe.
Signature · 7 lines
Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.27% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attornies please note, additions to this message by Gene Heskett are: Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
Quoted 7 lines · Gene Heskett
dd if=/dev/sda1|md5sum <--note use of the same device as to read pix. has been running for 3 or so minutes now, steadily reading the camera. I shoulda put a time in front of it! Ok got it, heres the sum:
127945+0 records in
127945+0 records outf6c568dd1f35bb37f3d667a2ab228e2ff6c568dd1f35bb37f3d667a2ab228e2f
[...]
Quoted 1 line
What does this tell us?
Thanks. I want to know it's not reading the randomly garbage. Can this problem reproduce easy? If so, what operations?
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Quoted 9 lines · OGAWA Hirofumi
Quoted 7 lines · Gene Heskett
dd if=/dev/sda1|md5sum <--note use of the same device as to read pix. has been running for 3 or so minutes now, steadily reading the camera. I shoulda put a time in front of it! Ok got it, heres the sum: 127945+0 records in
127945+0 records outf6c568dd1f35bb37f3d667a2ab228e2ff6c568dd1f35bb37f3d667a2ab228e2f
Quoted 6 lines
[...]
Quoted 1 line
What does this tell us?
Thanks. I want to know it's not reading the randomly garbage. Can this problem reproduce easy? If so, what operations?
NDI OGAWA. And I rebooted to find that all my printers I had defined in cups were gone, and I cannot define new ones, getting sever-error-internal-error when I try. And thats much more important to me ATM, sorry.
However, before I rebooted, those operations felt a solid as a rock, and always returned the same md5sum on a repeat.
Signature · 7 lines
Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.27% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attornies please note, additions to this message by Gene Heskett are: Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
Quoted 9 lines · Gene Heskett
Quoted 8 lines · OGAWA Hirofumi
Quoted 7 lines · Gene Heskett
dd if=/dev/sda1|md5sum <--note use of the same device as to read pix. has been running for 3 or so minutes now, steadily reading the camera. I shoulda put a time in front of it! Ok got it, heres the sum: 127945+0 records in
127945+0 records outf6c568dd1f35bb37f3d667a2ab228e2ff6c568dd1f35bb37f3d667a2ab228e2f
[...]
Quoted 2 lines
However, before I rebooted, those operations felt a solid as a rock, and always returned the same md5sum on a repeat.
Umm... is you talking about my request? Sorry for confusing. Let me start next step.
Quoted 4 lines
Quoted 4 lines
Nov 14 09:20:34 coyote kernel: FAT: Filesystem panic (dev sda1) Nov 14 09:20:34 coyote kernel: fat_free: deleting beyond EOF(
i_pos0) Nov 14 09:20:34 coyote kernel: File system has been
set read-only
I want to reproduce this on my machine. Can you reproduce this easy?
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Quoted 11 lines · OGAWA Hirofumi
Quoted 9 lines · Gene Heskett
Quoted 8 lines · OGAWA Hirofumi
Quoted 7 lines · Gene Heskett
dd if=/dev/sda1|md5sum <--note use of the same device as to read pix. has been running for 3 or so minutes now, steadily reading the camera. I shoulda put a time in front of it! Ok got it, heres the sum: 127945+0 records in 127945+0 records out
f6c568dd1f35bb37f3d667a2ab228e2ff6c568dd1f35bb37f3d667a2ab228e2f
Quoted 6 lines
[...]
Quoted 2 lines
However, before I rebooted, those operations felt a solid as a rock, and always returned the same md5sum on a repeat.
Umm... is you talking about my request?
Yes.
Sorry for confusing.
Quoted 1 line
Let me start next step.
Please proceed.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Nov 14 09:20:34 coyote kernel: FAT: Filesystem panic (dev sda1) Nov 14 09:20:34 coyote kernel: fat_free: deleting beyond EOF(
i_pos0) Nov 14 09:20:34 coyote kernel: File system has been
set read-onlyI want to reproduce this on my machine. Can you reproduce this easy?
Apparently so, but I'd have to go out and waste a set of batteries loading the card up again, its presently empty. However, I suspect you may have something else on your mind. :)
Signature · 7 lines
Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.27% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attornies please note, additions to this message by Gene Heskett are: Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
Quoted 10 lines · Gene Heskett
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Nov 14 09:20:34 coyote kernel: FAT: Filesystem panic (dev sda1) Nov 14 09:20:34 coyote kernel: fat_free: deleting beyond EOF(
i_pos0) Nov 14 09:20:34 coyote kernel: File system has been
set read-onlyI want to reproduce this on my machine. Can you reproduce this easy?
Apparently so, but I'd have to go out and waste a set of batteries loading the card up again, its presently empty. However, I suspect you may have something else on your mind. :)
What meaning is it? What do I misunderstand?
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Quoted 11 lines · Gene Heskett
Nov 14 09:19:51 coyote kernel: hub 3-2:1.0: new USB device on port 3, assigned address 9 Nov 14 09:19:51 coyote kernel: scsi4 : SCSI emulation for USB Mass Storage devices Nov 14 09:19:52 coyote kernel: Vendor: OLYMPUS Model: C-3020ZOOM(U) Rev: 1.00 Nov 14 09:19:52 coyote kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 14 09:19:52 coyote kernel: SCSI device sda: 128000 512-byte hdwr sectors (66 MB) Nov 14 09:19:52 coyote kernel: sda: assuming drive cache: write through Nov 14 09:19:52 coyote kernel: sda: sda1 Nov 14 09:20:34 coyote kernel: FAT: Filesystem panic (dev sda1) Nov 14 09:20:34 coyote kernel: fat_free: deleting beyond EOF (i_pos 0) Nov 14 09:20:34 coyote kernel: File system has been set read-only
Quoted 2 lines
Comments? Screwed up kernel .config? Is mount "-t vfat" the correct filesystem?
It would have been interesting to see the filesystem after this error message. Can you reproduce the error?
(vfat? I don't know - most cameras just use msdos, but vfat doesnt harm, I suppose)
The error message means that the fatfs followed a chain of clusters in order to delete them all and found a free cluster before finding an end-of-file mark.
Quoted 21 lines · Andries Brouwer
Quoted 9 lines · Gene Heskett
Nov 14 09:19:51 coyote kernel: hub 3-2:1.0: new USB device on port3, assigned address 9 Nov 14 09:19:51 coyote kernel: scsi4 : SCSI emulation for USB Mass Storage devices Nov 14 09:19:52 coyote
kernel: Vendor: OLYMPUS Model: C-3020ZOOM(U) Rev: 1.00 Nov
14 09:19:52 coyote kernel: Type: Direct-Access
ANSI SCSI revision: 02 Nov 14 09:19:52 coyote kernel: SCSI
device sda: 128000 512-byte hdwr sectors (66 MB) Nov 14 09:19:52 coyote kernel: sda: assuming drive cache: write through Nov 14 09:19:52 coyote kernel: sda: sda1Quoted 7 lines
Nov 14 09:20:34 coyote kernel: FAT: Filesystem panic (dev sda1) Nov 14 09:20:34 coyote kernel: fat_free: deleting beyond EOF(
i_pos0) Nov 14 09:20:34 coyote kernel: File system has been
set read-onlyComments? Screwed up kernel .config? Is mount "-t vfat" the correct filesystem?
It would have been interesting to see the filesystem after this error message. Can you reproduce the error?
Quoted 6 lines
(vfat? I don't know - most cameras just use msdos, but vfat doesnt harm, I suppose)
The error message means that the fatfs followed a chain of clusters in order to delete them all and found a free cluster before finding an end-of-file mark.
And I could possibly have created that empty sector by not treating the card as a LIFO I suppose... Makes a certain amount of sense, but why did a powerdown and a reconnect fix it? Some compacting routine in the cameras soft maybe?
Signature · 7 lines
Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.27% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attornies please note, additions to this message by Gene Heskett are: Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
Quoted 3 lines
I'd like to put this thread on hold
until I take stock of the steps I've taken just to make sure I've not been a right 'plum'.
Hi,
Right, I'm not sure if I've been a 'plum' or not. In fact I'm not sure about anything now.
Friday when I got home I tried to mount my belkin reader with sda in the fstab. I got 'no media found'. I then tried to mount my Olympus camera and got 'wrong fs...'. I changed my fstab to sda1 and tried again. This gave the same two errors. I rebooted the pc and this time I could mount the camera, but the belkin usb reader still gave 'no media found'. I then put the original inode.c back into my source and recompiled. And to my complete surprise the camera mounted. The belkin however gave 'no media found'.
All the above would suggest I've been a 'plum' - however I've done this before with 2.4. I do tend to be able to get things working by reading and not bothering good people like yourselves.
Now I have done some further tests and I have found something strange. I can mount my camera with a 64mb and 16mb smart media. The belkin reader, if I put the 64mb card in, I get 'no media found'. If I then put the 16mb card in I also get 'no media found'. If I disconnect and reconnect the belkin I can mount the 16mb card. If I then put the 64mb in I get 'no media found'. Putting the 16mb back in gives 'no media found'. disconnecting and reconnecting the reader allows me to mount the 16mb card.
What I'm trying to say is the reader won't mount the 64mb card. I could mount it with no problems under 2.4 with this reader.
The other strange thing is that prior to me patching inode.c both the camera and reader gave the same 'wrong fs...' errors with the 64mb card. Yet as I've said I put the original inode.c back and recompiled. yet the reader with the 64mb card will only give 'no media found'.
with the 64mb card mounted in the camera fdisk -l /dev/sda give me this;
/dev/sda1 * 1 500 63972+ 1 FAT12
Any advice would be appreciated.
__
Patrick