Hello Bryan,  

clue bat applied, thanks!

[email protected] (Brynet), 2012.12.06 (Thu) 16:24 (CET):
> On Thu, Dec 06, 2012 at 02:02:09PM +0100, MERIGHI Marcus wrote:
> > umass0 at uhub7 port 1 configuration 1 interface 0 "Sony USB Floppy
> >         Drive" rev 1.10/6.01 addr 3
> > umass0: using UFI over CBI with CCI
> > scsibus0 at umass0: 2 targets, initiator 0
> > sd0 at scsibus0 targ 1 lun 0: <SONY, USB-FDU, 6.01> ATAPI 0/direct
> >         removable
> 
> USB floppy drives are pretty much the only option for newer systems,
> although ATAPI LS-120 drives are still out there.
> 
> What's the problem?

My problem is identified by the string 'I failed'. I am just puzzled
that newfs-ing a floppy differs from newfs-ing anything else. Bear with
me! Newfs-ing the ``c'' slice is something I haven't had to do before. I
naturally thought I had to create the slice in advance. 

I had a second look at newfs_msdos(8) and found a hint in section
EXAPMLES that uses fd0c. It's not too verbose but it's there. 
 
> > After being puzzled I just tried an existing floppy, disklabel shows a
> > /dev/sd0i slice, mounting worked. 
> 
> It's DOS formatted disk, 'i' is part of the pseudo-disklabel.
> 
> > But trying to make use of an unformatted floppy I failed:
> > 
> > Did the usual ``fdisk -i sd0'',  ``disklabel -E sd0'', created ``i''
> > slice. After ``newfs_msdos /dev/rsd0i'' (which returned darn fast but
> > without obvious error output) the ``i'' slice vanished from disklabel.
> > Unsurprisingly mounting a non existing /dev/sd0i slice failed.
> 
> You're attempting to put an MBR and disklabel on a floppy, don't do
> that if you're going to newfs_msdos.
> 
> newfs_msdos -F 12 /dev/rsd0c

This does the trick! Thanks!

Verbose steps below:

$ dd if=/dev/zero of=/dev/sd1c

$ fdisk sd1   
Disk: sd1       geometry: 1/1/2880 [2880 Sectors]
Offset: 0       Signature: 0x0
Starting         Ending         LBA Info:
#: id      C   H   S -      C   H   S [       start: size ]
----------------------------------------------------------------
0: 00      0   0   0 -      0   0   0 [           0: 0 ] unused     
1: 00      0   0   0 -      0   0   0 [           0: 0 ] unused      
2: 00      0   0   0 -      0   0   0 [           0: 0 ] unused      
3: 00      0   0   0 -      0   0   0 [           0: 0 ] unused      

$ disklabel sd1
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: USB-FDU         
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 2880
tracks/cylinder: 1
sectors/cylinder: 2880
cylinders: 1
total sectors: 2880
boundstart: 0
boundend: 2880
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:             2880                0  unused                   

$ newfs_msdos -F 12 /dev/rsd1c
/dev/rsd1c: 2840 sectors in 355 FAT12 clusters (4096 bytes/cluster)
bps=512 spc=8 res=1 nft=2 rde=512 sec=2880 mid=0xf0 spf=2 spt=63 hds=45
  hid=0

$ fdisk sd1                   
Disk: sd1       geometry: 1/1/2880 [2880 Sectors]
Offset: 0       Signature: 0xAA55
Starting         Ending         LBA Info:
#: id      C   H   S -      C   H   S [       start: size ]
---------------------------------------------------------------
0: 00      0   0   0 -      0   0   0 [           0: 0 ] unused      
1: 00      0   0   0 -      0   0   0 [           0: 0 ] unused      
2: 00      0   0   0 -      0   0   0 [           0: 0 ] unused      
3: 00      0   0   0 -      0   0   0 [           0: 0 ] unused      

$ disklabel sd1               
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: USB-FDU         
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 2880
tracks/cylinder: 1
sectors/cylinder: 2880
cylinders: 1
total sectors: 2880
boundstart: 0
boundend: 2880
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:             2880                0  unused                   
  i:             2880                0   MSDOS

$ mount /dev/sd1i /mnt/
$ touch /mnt/fifi
$ ls -la /mnt/
total 36
drwxr-xr-x   1 root  wheel  16384 Jan  1  1980 .
drwxr-xr-x  14 root  wheel   1024 Nov 30 13:36 ..
-rwxr-xr-x   1 root  wheel      0 Dec 11 11:31 fifi

Bye, Marcus

> 
> > fdformat(1) just says ``this is not a floppy''. 
> 
> fdformat(1) uses ioctl(4)'s specific to fdc(4), that will not work for
> floppy controllers behind USB.
> 
> You can always just..
> 
> dd if=/dev/zero of=/dev/rfd0c bs=64k
> 
> > What options do I have? What am I getting wrong? Clue bat welcome!

> !DSPAM:50c0b8fe98881608215037!

Reply via email to