Alan,

Thanks for writing. Your point about the sectors is interesting, especially since as you can see below the FAT claims to have made 512000 sectors.


mkdosfs 2.10 (22 Sep 2003)
/dev/sda has 9 heads and 56 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 512000 sectors;
file system has 2 16-bit FATs and 8 sectors per cluster.
FAT size is 250 sectors, and provides 63933 clusters.
Root directory contains 512 slots.
Volume ID is 416fdcd5, no volume label.



You got that just backward. mkdosfs _always_ writes over the boot sector. After all, you can hardly have a valid FAT filesystem without a good boot
sector!

Urk. I was thinking about mkdosfs and that it will never create a bootable disk...


OK, time for some logs. I'm leaving in the timestamps in case that's an issue.

after "modprobe usb-storage verbose" and plugging in the device


Oct 15 12:47:59 bagpipes kernel: hub.c: new USB device 00:10.3-3, assigned address 37
Oct 15 12:47:59 bagpipes kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Oct 15 12:47:59 bagpipes kernel: Vendor: iriver Model: MassStorage Disc Rev:
Oct 15 12:47:59 bagpipes kernel: Type: Direct-Access ANSI SCSI revision: 02
Oct 15 12:47:59 bagpipes devfsd[106]: fixscsigenericperms(scsi/host1/bus0/target0/lun0/generic)
Oct 15 12:47:59 bagpipes devfsd[106]: Changed non-CD scsi/host1/bus0/target0/lun0/generic to be 0/0 0600
Oct 15 12:47:59 bagpipes kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
Oct 15 12:47:59 bagpipes kernel: SCSI device sda: 512001 512-byte hdwr sectors (262 MB)
Oct 15 12:47:59 bagpipes kernel: sda: Write Protect is off
Oct 15 12:47:59 bagpipes kernel: /dev/scsi/host1/bus0/target0/lun0: p1
Oct 15 12:47:59 bagpipes kernel: WARNING: USB Mass Storage data integrity not assured
Oct 15 12:47:59 bagpipes kernel: USB Mass Storage device found at 37
Oct 15 12:48:02 bagpipes usb.agent[32193]: usb-storage: loaded successfully



unplug and replug the device:

Oct 15 12:49:43 bagpipes kernel: usb.c: USB disconnect on device 00:10.3-3 address 37
Oct 15 12:49:48 bagpipes kernel: hub.c: new USB device 00:10.3-3, assigned address 38
Oct 15 12:49:48 bagpipes kernel: WARNING: USB Mass Storage data integrity not assured
Oct 15 12:49:48 bagpipes kernel: USB Mass Storage device found at 38
Oct 15 12:49:52 bagpipes usb.agent[32271]: usb-storage: loaded successfully



Attempt to mount again:

Oct 15 12:50:55 bagpipes kernel: SCSI disk error : host 1 channel 0 id 0 lun 0 return 
code = 70000
Oct 15 12:50:55 bagpipes kernel:  I/O error: dev 08:00, sector 0
Oct 15 12:50:55 bagpipes kernel: FAT: unable to read boot sector


I tried to use cfdisk to create a disk partition on the USB, formatted with FAT16. That gives me an /dev/sda1 file system, but when I try to mount it I get the same problem:

Oct 15 12:52:15 bagpipes kernel: SCSI disk error : host 1 channel 0 id 0 lun 0 return code = 70000
Oct 15 12:52:15 bagpipes kernel: I/O error: dev 08:01, sector 0
Oct 15 12:52:15 bagpipes kernel: FAT: unable to read boot sector


Finally, dosfsck gives a funny result that's not consistent with the odd-number-of-sectors problem. First I made certain I was using a clean system by reformatting:

# mkdosfs -v -F 16 -I /dev/sda
mkdosfs 2.10 (22 Sep 2003)
/dev/sda has 9 heads and 56 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 512000 sectors;
file system has 2 16-bit FATs and 8 sectors per cluster.
FAT size is 250 sectors, and provides 63933 clusters.
Root directory contains 512 slots.
Volume ID is 417012cf, no volume label.


syslog shows:

kernel: SCSI device sda: 512001 512-byte hdwr sectors (262 MB)
kernel: sda: Write Protect is off
kernel:  /dev/scsi/host1/bus0/target0/lun0:

I then tried dosfsck:

# dosfsck -v /dev/sda
dosfsck 2.10 (22 Sep 2003)
dosfsck 2.10, 22 Sep 2003, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkdosfs"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
      4096 bytes per cluster
         1 reserved sector
First FAT starts at byte 512 (sector 1)
         2 FATs, 16 bit entries
    128000 bytes per FAT (= 250 sectors)
Root directory starts at byte 256512 (sector 501)
       512 root directory entries
Data area starts at byte 272896 (sector 533)
     63933 data clusters (261869568 bytes)
56 sectors/track, 9 heads
         0 hidden sectors
    512000 sectors total
Checking for unused clusters.
/dev/sda: 0 files, 0/63933 clusters

So dosfsck shows 512000, not 512001 sectors.


If you've any suggestions, please let me know!

Regards,
 Moshe

P.S. I will be offline from about 5 PM CT (10 PM Zulu) until Sat. night, so I won't respond to email during those timeframes.


-- Moshe Yudkowsky * [EMAIL PROTECTED] * www.pobox.com/~moshe "Come on, you sons of bitches! Do you want to live forever?" Gunnery Sergeant Dan Daly, U.S.M.C., Belleau Wood, June 6, 1918


------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to