[comp.unix.microport] How to make a floppy file system?

alan@k0jfv.UUCP (Al Kiecker) (04/05/88)

Does anybody know how to build a mountable file system on the 1.2MB floppy
drive of a PC/AT clone?? The commands are all there, but not a step-by-step
procedure of something which is not at all trivial to accomplish. This
should be well documented as part of the system administration procedures.
The general procedure is:

	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?)
	3. label the floppy
	   (/etc/labelit exists, but is not documented)
	4. run fsck
	5. mount the file system: mount /dev/dsk/fd /mnt
	  (or is it mount /dev/rdsk/fd /mnt ?)
	6. create lost+found directory
	  (how???)

Now I may have the order of some of the above steps slightly mixed up and the
details somewhat foggy, but when I do it on the system for which I get
paid for doing it, I have a System Administrators Guide that lays it
out step by step for me. Would anyone care to fill in the details of the
step by step procedure.

When is /dev/rdsk/?? vs. /dev/dsk/?? used?

Thanks!!
-- 
Al Kiecker		
WORK: 	ihnp4!sx1100!alan			(612)635-2574		
HOME:	corum!k0jfv!alan			(612)432-8139

root@lily.UUCP (system administration) (04/06/88)

In article <13@k0jfv.UUCP>, alan@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@lily.UUCP	..!clyde!lily!root