Mounting PC Floppy Disks - Summary

2007-12-25 7:41:00

First, thanks for all the great responses to my question (and so quickly).

I had several requests to post a summary so here goes.

Many of the responses were to obtain a PD package called MTOOLS. It is

supposed to be widely available and offers very robust and efficient

methods to do this. The most likely place to find it is:

   cs.ubc.ca:~ftp/src/mtools.2.03.tar.Z but also may be on many other

servers that archive Sun source. (cerl.cecer.army.mil or ftp.uu.net).

Another type of response was that many places have very elegant local

source code to allow mounting and umounting of different types of

removable media. Many sent source. If there's interest I will mail

that to individuals (not toooo many!!).

The final type of response was to write simple shell programs to do

this. The simplest, most concise response follows:

>From simon%gpsemi.COM Tue Mar 24 08:28:20 1992

Date: Tue, 24 Mar 92 13:53:24 GMT

From: simon%gpsemi.COM (Simon Booth x8125 System Mangler ! - Unix)

To: nmsu.edu!bemery%moon.gpsemi.COM

Subject: Re: Mounting PC Floppy Disks - non-superuser account

Bryan,

     I allow my users to do the same thing as follows:

     First write a script to mount and unmount the floppy,

     These are very simple :

The mount script ( Call it for eg mountfd ) :

     #! /bin/csh -b

     #

     # Set UID root script

     #

     # Mount the Floppy disk as a pc disk

     #

     etc/mount -t pcfs /dev/fd0 /pc

(The -b is importanmt in the first line )

The unmount script ( eg umountfd )

     #! /bin/csh -b

     #

     # Set UID root script

     #

     # UnMount the Floppy disk as a pc disk

     #

     /etc/umount /pc

     eject

Next create a directory in the root (/) called 'pc' . This is the mount

point

Finaly change the ownership of the files to root, and change the protection

so that all users can run them, and so they are set uid to root scripts:

     chmod 4755 mountfd umountfd

The script can thus be run by anyone... When they run they run as root,

therefore allowing any user to mount a floppy. The files will be available

in /pc ( This can be changed.. Just change the scripts ).

To add it into the menus you will have to hack the

/usr/openwin/lib/openwin-menu

file, and add the command.

Good luck !

     Simon Booth ( GPS, Swindon, England )

Comments

Got something to say?

You must be logged in to post a comment.