Mount USB drive problems on server
Peter Garrett
peter.garrett at optusnet.com.au
Wed Nov 15 06:32:37 UTC 2006
On Wed, 15 Nov 2006 00:29:08 -0500
Anthony Yarusso <tonyyarusso at earthlink.net> wrote:
> I have a USB external hard drive (WD Passport) that automatically mounts
> on my laptop (Edgy) at /media/usbdrive and opens up Nautilus at that
> location in Gnome. However, plugging it into my desktop, server-install
> machine (Dapper, X-less), no such mounting occurs, and I can't figure
> out how to make it mount. /dev did have an hdc in it that may have been
> related, but that had not partitions (ie no hdc1), and I couldn't manage
> to do anything with that. Ideas?
Before you plug it in, run
tail -f /var/log/syslog
and watch what output appears - and/or after
plugging it in run
dmesg | tail
amongst the output of the above commands you should see a line pointing
( most likely ) to /dev/sda1 - assuming it is the only usb device plugged
in. If it is the second or third, you might see /dev/sda2 or /dev/sda3 and
so on ... Example from output ( snipped)
Nov 15 17:26:58 localhost kernel: [17822800.520000] sda: assuming drive
cache: write through Nov 15 17:26:58 localhost kernel: [17822800.520000]
sda: sda1
You can then mount this conventionally using for instance
sudo mount -t vfat /dev/sda1 /your/chosen/mountpoint
(assuming the usb
device uses fat32 file system )
where "/your/chosen/mountpoint" refers to a an existing directory, of
course ( for instance, as a test you can just mount it on /mnt )
A better way involves using the pmount utility, which is available in the
repositories, if you don't have it installed already. From apt-cache show
pmount:
" pmount is a wrapper around the standard mount program which permits
normal users to mount removable devices without a matching /etc/fstab
entry. "
Note that using a conventional /etc/fstab entry for /dev/sda1 to help with
mounting will only work if the system happens to assign /dev/sda1 for your
device - /dev is no longer static, so the device assignment will depend on
the order in which devices are plugged in. You can write your own udev
rules to work around this if you wish, but that's a whole subject in
itself:
http://reactivated.net/writing_udev_rules.html
Peter
More information about the ubuntu-users
mailing list