How to make a floppy file system?

system administration root at lily.UUCP
Wed Apr 6 15:24:03 AEST 1988


In article <13 at k0jfv.UUCP>, alan at k0jfv.UUCP (Al Kiecker) writes:
> Does anybody know how to build a mountable file system on the 1.2MB floppy
> drive of a PC/AT clone?? [..]
> 	1. format the floppy:  format /dev/rdsk/fd
> 	2. make the file system: mkfs /dev/rdsk/fd 2400
> 	   (Is 2400 the correct number of blocks?)

Yes, i believe it is.  At 512 bytes/block that would give you 1.2M (2400 is
the correct value to use for V/386, anyway).
Note that *some* systems require a gap and cylinder size to also be specified
when creating a file system.  Although not required, efficiency will increase
with correct values.  Some systems simply ignore the values you specify.  I
believe this is the case with microport.

> 	3. label the floppy
> 	   (/etc/labelit exists, but is not documented)

Are you sure?  Its probably in the administrator's section..  Look in the
permuted index.

> 	4. run fsck
> 	5. mount the file system: mount /dev/dsk/fd /mnt
> 	  (or is it mount /dev/rdsk/fd /mnt ?)

When mount a fs on a directory stub, one should use the block device (i.e.,
/dev/dsk/fd) and not the raw interface (i.e., /dev/rdsk/fd).
Raw devices are more suitable for fsck.  Actually, mount should give you an
error if you try and mount a raw device as a file system, something along the
lines of "/dev/rdsk/fd not a block device".

> 	6. create lost+found directory
> 	  (how???)

This is easy:  There are usually two ways of doing it.  You may use the system
admin menus provided with the system (if they are there, i assume most unix
systems today that are destined for PC users have such a beast) to create a
mountable file system -- the menu will then take care of most, if not all of
the administrivia involved; like making lost+found directories.  OR, if you are
forced to create the directory manually, it is really trivial, if not the most
exciting thing to do...  (you could always put these simple commands into a
shell, like mklost, if you don't want to keep typing them)
Finally, some mkfs commands may actually create the lost+found directory
automatically.

$ mount /dev/dsk/fd /mnt
$ mkdir /mnt/lost+found
$ cd /mnt/lost+found
$ for i in `iota 1 50`		#if you have iota(1)
$  do touch x$i;done		#if you have iota(1)
$ i=0				#no iota(1)
$ while test $i -lt 50		#no iota(1)
$  do touch x$i;done		#no iota(1)
$ rm x*

> Thanks!!

Hope this helps.
-- 
Derek Terveer	root at lily.UUCP	..!clyde!lily!root



More information about the Comp.unix.microport mailing list