IMPORTANT: When you use a floppy disk on a Sun, anyone on that Sun can read and write the floppy! Hopefully no one will abuse this, but if you have very private or critical data on a floppy you should be aware of it.Solaris supports a number of operations on floppy disks. It can mount floppy disks with DOS (or Unix) filesystems so the files on the floppy can be accessed just like any other files. It can read and write floppy disks using commands like tar, dd and cpio. It can format floppy disks and create DOS (or Unix) filesystems on them. Below are descriptions of how to do these operations.
% volcheckThis will mount your floppy disk in the directory /floppy. You can make sure it's there like this:
% ls -F /floppy floppy0@ noname/or this:
% df [ df will print all of the regular file systems and somewhere amongst them (usually at the end) will be something like: ] /vol/dev/diskette0/noname 1423 1156 267 81% /floppy/nonameor:
/floppy/noname (/vol/dev/diskette0/noname): 534 blocks 0 filesdepending on which version of df you are using.
% ls /floppy/noname bin4.tgz dosemu.tgz image.tgz sc.tgz term107.tgz diska2 faq.tar lilo.tgz shlibs.tgz
% ejectIf it doesn't eject your floppy, and instead complains about `/vol/dev/rdiskette0/noname: Device busy' or something like that, that means some process is still using a file on the floppy. If your current directory is somewhere on the floppy, cd somewhere else. If you are running any processes that are accessing the floppy kill them. After that you should be able to eject your floppy.
% volcheckThis will setup special device files in the /vol/dev/diskette0 and /vol/dev/rdiskette0 directories which you can use to access your floppy:
blaze-dev$ ls -l /vol/dev/diskette0/ /vol/dev/rdiskette0/ /vol/dev/diskette0/: total 0 brw-rw-rw- 1 nobody nobody 91, 3 Feb 24 11:40 unlabeled /vol/dev/rdiskette0/: total 0 crw-rw-rw- 1 nobody nobody 91, 3 Feb 24 11:40 unlabeled
% tar cf /vol/dev/rdiskette0/unlabeled prog.c prog.C prog.fand verify that it is OK:
% tar tvf /vol/dev/rdiskette0/unlabeledIf you're writing a Linux boot floppy of the bare Slackware bootdisk, you would do it something like this:
% dd if=bare of=/vol/dev/rdiskette0/unlabeled obs=18k
% eject
% volcheckThis will setup special device files in the /vol/dev/diskette0 and /vol/dev/rdiskette0 directories which you can use to format your floppy:
blaze-dev$ ls -l /vol/dev/diskette0/ /vol/dev/rdiskette0/ /vol/dev/diskette0/: total 0 brw-rw-rw- 1 nobody nobody 91, 3 Feb 24 11:40 unlabeled /vol/dev/rdiskette0/: total 0 crw-rw-rw- 1 nobody nobody 91, 3 Feb 24 11:40 unlabeled
To format a disk to be used by tar, dd and cpio, use this command:
% fdformat /vol/dev/rdiskette0/unlabeledTo format a disk and create a DOS filesystem on it, use this command:
% fdformat -t dos /vol/dev/rdiskette0/unlabeledThis will take a few minutes.
% ejectIf you've created a DOS filesystem on the floppy then you have to eject the floppy, and then re-insert and re-run volcheck to have it mounted on /floppy. If you're going to use the floppy with commands like tar, dd and cpio it is not necessary to eject the floppy, re-insert it and run volcheck, you can just continue using the floppy, although the fdformat command may have changed the device name of the floppy (it might be called /vol/dev/rdiskette0/unnamed_floppy instead of /vol/dev/rdiskette/unlabeled).
This page last updated September 19, 1995.