[Herts] mounting a usb memory drive

David Precious davidp at preshweb.co.uk
Fri Oct 12 11:42:44 BST 2007

local.linux wrote:
> just a quick recap for mounting a usb memory drive in linux.
> 3. attach the device, wait 2-3 seconds and run dmesg again.
> note the "sdX#" where X is a letter usually b and # is a number usually 1.
> ie sdb1

Well, it'll be sda if you have no other SCSI-style devices; SATA drives
generally come under that too.

fdisk -l is a nice way to get a list of all discs on the system and
should include the USB drive in its output.

> If you add a line to your /etc/fstab file then all you need to do is run mount 
> with the mount point i.e.
> mount /mnt/usb1
> here is that line in my fstab file
> /dev/sdb1               /mnt/usb1       auto            noauto,user     0 0
> the auto is for the file system, so you could set it to vfat, the noauto is 
> about not updating the file's timestamp and user means anyone can access the 
> device once its connected else only root will have access. The two zeros on 
> the end are normal.

Actually, the "noauto" means don't automatically mount this device when
mount -a is given (e.g. on system boot).  From your description I think
you're thinking of "noatime" which stops the system updating the last
accessed timestamp for files (which is worth setting on most filesystems
- it can provide a nice speed boost from not having to update the
timestamp on every file that gets read.  After all, in most cases, who
really cares when it was last accessed?

One thing you could do is set a label on the drive, and use
LABEL=mylabel in the fstab rather than the device name, so that it
always gets mounted in the same place (regardless of the order that USB
devices get connected to the system).


Dave P

David Precious
http://blog.preshweb.co.uk/ :: http://www.preshweb.co.uk/

More information about the Herts mailing list