[Herts] mounting a usb memory drive
local.linux
local.linux at jumpstation.co.uk
Thu Oct 11 22:38:22 BST 2007
just a quick recap for mounting a usb memory drive in linux.
first off, ubuntu seems to just do it all for you.
But if you want to follow the manual process then you need to be root.
1. make a directory for your device, mine is /mnt/usb1 but you could name it
anything anywhere.
2. run "dmesg" to get a report about all the hardware Linux has seen since it
started booting.
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
4. mount the filesystem with the following command
mount /dev/sdb1 /mnt/usb1
(I am using my settings, change as necessary)
if you get an error about the file system type the most common fix is
mount -t vfat /dev/sdb1 /mnt/usb1
vfat is the default format type most memory cards/keys come installed with.
5. when you have finished with the device run
umount /mnt/usb1
(I am using my settings, change as necessary)
note its not "unmount"
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.
running the mount command on its own will list any mounted file systems
including your harddrive and possibly virtual file systems such as proc or
sysfs.
When I plug my usb card ready in sdc is the compact flash socket and sdb1 is
the SD card socket and the commands work exactly the same as above to access
this media.
Hope that gives people something to play with ...
Rob
More information about the Herts
mailing list