Steps to manually mount a USB Mass storage Device on Linux (Kernel 2.4 or higher)

Note:
The following instructions can be applied for USB Mass Storage devices (Bulk Only Transport Devices) only.

1. Log in as root.

2. Plug in the device.

3. Go to the Terminal window and make sure it is detected as a SCSI device by typing the command
" cat /proc/scsi/scsi ". For example our USB disks are seen as:

PicoDiskEasy
Attached devices:
Host: scsi0 Channnel: 00 Id: 00 Lun:00
Vendor: Ur-Disk Model: Security Drive Rev: 1.00
Type: Direct Access ANSI SCSI revision: 02

PicoDiskTech
Attached devices:
Host: scsi0 Channnel: 00 Id: 00 Lun:00
Vendor: Eutron Model: Mass Token Rev: 1.00
Type: Direct Access ANSI SCSI revision: 02

4. Create a directory for the device. For example it can be /mnt/picodisk for our USB disk.

Note:
If you are planning to log in as a user and use the device, you need to create a directory under
/home/user since the root directory cannot be accessed under a user login. For example, if your user
login is "yourname", the directory created can be /home/yourname/picodisk

5. Add this device to the file /etc/fstab with the following syntax:
(the underscore "_" character is used instead of the space character)

/dev/sdn____mount-directory____auto____noauto,user____0 0

where,

n - the device index (entered in sequence for each device at /proc/scsi/scsi file as a, b, c, d etc respectively)
(i.e first device in /proc/scsi/scsi is entered just /dev/sda).

Depending on the login to be used, the entry for the USB disk described above is:

/dev/sda____/mnt/picodisk____auto____noauto,user____0 0
/dev/sda____/home/yourname/picodisk____auto____noauto,user____0 0

Since the USB disk in this example is detected as the first SCSI device at /proc/scsi/scsi,
the entry in /etc/fstab is "sda". If the device is listed as the second SCSI device, the entry in /etc/fstab will be "sdb"

6. Now, the device can be manually mounted using the command "mount mount-dir" from the Terminal window.
Depending on the login to be used, the entry for the USB disk described above is mounted as:

"mount /mnt/picodisk"
or
"mount /home/yourname/picodisk"

Depending on Linux distribution and GUI used, the device can also be mounted from Desktop by right-clicking
on the icon and choosing "Mount".

Note:
1. If the USB disk is unplugged the old entries in /proc/scsi/scsi may not disappear. When the device is re-plugged,
there may be ghost entries for the device. The new entries have to be used to mount the device again.
This also applies when the system is restarted since the SCSI sequence may vary after restart.
So, the mounting has to be done again as per the new sequence.

2. The device can also be manually mounted using the following command from the Terminal window
without changing the /etc/fstab:

"mount -t auto /dev/sdn mount-directory"

Depending on the login to be used, the entry for the USB disk described above is mounted as:

"mount -t auto /dev/sda /mnt/picodisk"
or
"mount -t auto /dev/sda /home/yourname/picodisk"

Depending on Linux distribution and GUI used, with this method you may not see the icon on the Desktop.
But the contents can be accessed from the file manager.

3. Even if there is an entry in /etc/fstab, the device may have to be mounted (step 6 only) after every restart.

4. Choose the "Unmount" option by right-clicking the icon to flush the cache before unplugging the USB disk.
THIS is important to prevent data loss

5. USB disk change can be done by unmounting the current disk and remounting the device after plugging
the new USB disk.

BACK