Alec's Little Nuggets


Floppy disk settings

(This material is taken from a discussion I initiated on linux-uk-discuss email list).

For people running Linux on a PC console with a floppy disk drive the following changes may be of interest.

  1. chmod a+rw /dev/fd0

    This allows *all* users to create and read tar or cpio archives on the floppy disk

  2. in /etc/fstab add a line that says
    /dev/fd0  /floppy        msdos     defaults,user,noauto
    This allows anyone to mount the floppy disk as an msdos volume by saying 'mount /floppy'. If the floppy has it's write protect tab switched on then the volume is mounted read only. YOU MUST UNMOUNT THE VOLUME before taking it out to flip the tab. (use umount /floppy).

    It assumes that you usually mount MSDOS floppies, which I do. If you need to mount another format use 'mount -t ....'

Dave Hines adds a little more subtlety to this: Add an fstab entry mounting different file system types on different mount points, e.g.
        /dev/fd0  /dos_floppy        msdos     defaults,user,noauto
        /dev/fd0  /linux_floppy      ext2      defaults,user,noauto
For those of you who use PGP this means you can put an entry in your config.txt file
BakRing = "/floppy/secring.pgp"
Obviously you need to mount the floppy before running 'pgp -kc'
Do not try and use mtools on a mounted volume. You will corrupt the floppy!
Thanks to the many people who pointed this out.

You can even set up a link from /floppy to 'a:' and use 'mount a:' and 'ls a:' etc. I'm not convinced of the value of this. If it looks to much like an msdos diskette you may be tempted to take it out without unmounting it :-(.

Dave Hines provides the following extra information: There is now an alternative to all this... The supermount package just released by Stephen Tweedie specifically addresses this area... Quoting from the announce message:

> Supermount is a kernel patch which transparently supports removable
> media.  You can mount the supermount filesystem on a mount point such as
> /floppy or /cd even without a disk in the appropriate drive, and
> supermount will automatically take care of mounting and unmounting the
> sub-filesystem, msdos or iso9660, as disks are inserted and removed.
> With supermount, you can simply place a msdos-formatted disk in the
> floppy drive, copy a few files to it, and remove it.  Supermount
> guarantees that write-operations like copying or renaming files do not
> return to the user until all writes have been flushed to the disk.  When
> you get the command line prompt back, you can be sure it is safe to
> remove the disk.
You can find supermount in

Using Midnight Commander

For those of you with long enough memories there is now a Norton Commander look alike for *nix systems called Midnight Commander. It comes with Slackware 2.3 and above or it can be ftp'd from

It makes moving around the directory structure a lot easier and you can do things to files as group. It works in character mode and is well worth a try.

X Windows requirements and temporary swap files

X windows will run with 8Mb RAM providing you have enough swap space although this can be a bit slow. Unfortunately if you run out of swap space the system can thrash and give the appearance of having hung. I got this problem when I started up the X version GNU chess with 8Mb of RAM and 8Mb swap. To get some extra swap space follow the procedure for setting up a temporary swap file in the mkswap(8) manual page i.e. type 'man 8 mkswap' at the prompt.

Finding device major and minor numbers

When you get problems with a device it is useful to check that the device major and minor numbers are correct.

To find out what they should be then: Check the device major number in linux/major.h and the minor number in linux/{device}.h e.g. linux/mouse.h

To check out what they really are on the system then use the following command:

ls -l /dev/{device} e.g. ls -l /dev/psaux for the PS/2 mouse port

The output looks like this:

        crw-rw-rw-   1 root     sys       10,   1 Jul 18  1994 /dev/psaux
The major number is the first set of digits after the group name, 10 above, and the minor number is the next number, 1 above.

Transferring large floppy diskette archives between MS-DOS and Linux

a) Get the GNU zip utilities for DOS (N.B. not the same as GZIP) and use zipsplit etc

b) Get a tar program for DOS (e.g. pax or pdtar from and a program that splits files, one is available on