USB disks

This page is maintained by the CSE System Group

From CsWiki

Jump to: navigation, search

These instructions are for the debian64 gnome environment. Older environments are not supported.

Mounting USB

To use USB disks (disk-on-keys) in the Linux workstations, plug it in and wait a few seconds. You can access the device under the /media/ directory (usually that's /media/<name> where <name> is the partition's name). Depending on your desktop environment configuration, a window for the device will open.

If the disk is not automatically mounted, you should start

nautilus &

A window with a list of devices will open where the USB is one of them, a single click will mount it.

If /media/ with your device still doesn't mount (or you prefer not to work with the window/mouse), you can try using the gvfs-mount utility. First find out which device your USB disk is on, either by running dmesg and looking at the last lines (there should be a line resembling " sdb: sdb1"), or by running:

gvfs-mount -l -i | awk '/Volume\([0-9]\)/{printf $2 ": "; vol=1} /unix-device/{if (vol > 0) {print $2} vol=0}'

This command will give a list of disks and their devices. Then assuming your disk is on /dev/sdb1, mount it using:

gvfs-mount -d /dev/sdb1. 

Removing USB

To safely remove the device you need to unmount it first. The easiest way to do this is to go the window that opened (or any other window), click on the eject icon next to the disk's name.

Alternatively, use the gvfs-mount utility from the command line, e.g.:

gvfs-mount -u /media/MyUSB

If that fails, before brutally removing the device, go to the mounted directory (i.e. cd /media/...), and type sync. After that, you can physically remove the device.

Personal tools