Subject: Re: fd0
To: None <ball@cyberspace.org>
From: Ernst du Toit <et@houseofet.com>
List: port-i386
Date: 07/01/2002 15:18:02
Hmm point...

/dev/fd0a links to /dev/fd0 - so it all depends on what the kernel finds for
fd0 if you want to know what format you'll write.

In my case dmesg gives: 

fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec

So /dev/fd0a will write 18 sectors/track.

If you want to eg write a 9 secttors/track disk you'll have to use one of
the other minor numbers. I took a quick look at /usr/src/sys/dev/isa/fd.c
but could not find any comfortable proof of the table built in the code and
the minor numbers in /dev. But I'm no kernel guru....

Maybe one of the kernel gurus can come to the rescue here?

--et

>
> Hello Ernst!
> 
>   EdT> To write floppies I use dd(1):
>      >
>      > dd if=disk.image.filename of=/dev/fd0a bs=9216
> 
> dd was what I had in mind, but is fd0a the right device file
> for a 3.5" DSHD diskette?  Perhaps there was just a physical
> flaw on the disk when I tried that.  :-/
> 
> Regards,
>   - Andy Ball