skip to content

Faculty of Mathematics

Using Removable Media e.g. DVDs, memory sticks

Reading Media

On modern versions of Linux, most removable media work as intuitively as they do under Windows, provided that you are using a newish window manager such as Gnome (our default) or KDE. When you insert the device, it is detected automatically, an icon appears on your desktop, and a window pops up showing you the files on the device.

If you are using some other window manager - eg TWM or FVWM - the command gnome-volume-manager & will start the automatic icons mentioned above. You can also check whether your device has been mounted with the command df -l (look for mount points in /media). If your device is not autodetected please email help@maths.

The disk will be mounted as a directory somewhere in /media, and can be accessed from the command line like any other directory.

Remote access to removable media

Removable media can only be mounted and unmounted when you are logged in on the console. Running a graphical session remotely via winex or vnc is not sufficient. This is a security feature as otherwise anyone with the authorisation to log into your PC has full read and write access to any media which are connected.

Once your devices are mounted you can access the data on them remotely, but bear in mind that they will be unmounted should the computer require a reboot to install security updates

Safely removing (unmounting, ejecting) media

When you have finished working with a disk, be sure to unmount it before physically removing it, or the data on it may be corrupted. On Windows this is done via "Safely Remove Hardware". On Linux you can either use the graphical interface or the command umount /media/usb (replace /media/usb by the correct directory name).

If the unmount fails, check that none of your windows are using any files on the disk or sitting in the /media/... directory before trying again. If it still won't unmount then there is probably a stuck process - try rebooting the computer with safereboot.

If you can't reboot the computer e.g. because it is running jobs, use the fuser command to try and find which process is still using the cdrom. Example:

/sbin/fuser -vum /media/usb	

returns output like

                     USER        PID ACCESS COMMAND
/media/usb           df224     12056 ..c..  xterm
                     df224     12058 ..c..  sh
                     df224     12059 ..c..  ssh

Then kill the PIDs listed. In the above case

kill 12058

leads to /sbin/fuser -vum /media/usb no longer listing any output. (In some cases you may need to use kill -KILL PID-number.) You should now be able to unmount the device via Gnome or the unmount command.

If all else fails then email help@maths remembering to include information on which computer the CD is stuck in / USB stick won't unmount and where that computer is.

Fun fact: the command eject will make the computer eject its own CD/DVD, not just make it safe for you to eject it.

Writing to CDs/DVDS

Writing to a recordable CD or DVD is slightly trickier than working with memory sticks, because you cannot simply copy files but must run a program to burn an image. On Linux the graphical CD/DVD creator will start automatically when you insert a blank CD or DVD. On Windows, use the Deepburner program to write a CD/DVD (it's available for free).

More about writing CDs

Where to obtain media

Blank rewritable DVDs and memory sticks for work-related use are obtainable from Reception or from any secretary or Computer Officer. If you need large numbers you should probably email help@maths so we can ensure we have enough.

Useful links