Subject: port-i386/6229: too hard to create a 720k floppy filesystem
To: None <gnats-bugs@gnats.netbsd.org>
From: None <martin@rumolt.teuto.de>
List: netbsd-bugs
Date: 10/02/1998 15:13:10
>Number:         6229
>Category:       port-i386
>Synopsis:       It's realy hard to create a 720k floppy filesystem
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct  2 06:20:01 1998
>Last-Modified:
>Originator:     Martin Husemann
>Organization:
	
>Release:        
>Environment:
	
System: NetBSD rumolt.teuto.de 1.3G NetBSD 1.3G (RUMOLT) #6: Thu Oct 1 09:58:22 MEST 1998 root@rumolt.teuto.de:/a/usr/src/sys-i4b/arch/i386/compile/RUMOLT i386


>Description:

The floppy driver fd uses minors to select between different densities.
You can not newfs a raw disk without a disklabel on it - so the disklabel
specifies partitions by its own. To create a filesystem on a 720k floppy
in a 1.4MB drive, you need to access /dev/rfd0f, and the only partition
you can sanely access there is 'f'.

This is a mess - and it's undocumented. Try "man 4 fd".

>How-To-Repeat:

Try to create a boot floppy for testing purposes. Only have a 720k medium
available.

Try:
	fdformat /dev/rfd0f	# works like a charm
	newfs /dev/rfd0f	# fails: no disklabel
	disklabel /dev/rfd0f 	# need a disktab entry

Copy the disktab entry for floppy3, halfing all the sector numbers.
Try again:

	disklabel /dev/rfd0f floppy720	# works now
	newfs /dev/rfd0f	# fails - no 'f' partition available

Bang head against wall...

>Fix:
To get it working at all you'll need an /etc/disktab entry like this:

floppy720|3in Low Density Floppy:\
	:ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\
	:pa#1440:oa#0:ba#4096:fa#512:\
	:pb#1440:ob#0:\
	:pc#1440:oc#0:\
	:pd#1440:od#0:\
	:pe#1440:oe#0:\
	:pf#1440:of#0:


Then you can disklabel the disk, newfs it and mount it.
>Audit-Trail:
>Unformatted: