dmesg will tell you how the device got detected; typically it'll be /dev/sdb or similar<br><br>sudo mkdir /media/usb<br>sudo mount /dev/sdb /media/usb<br><br>If you want ordinary users to have r/w access, you will want to throw in some options with that, such as;<br>
<br>sudo mount /dev/sdb /media/usb -o umask=0<br><br><div class="gmail_quote">(read/write access for everybody!)<br><br><br>2008/4/30 Sid Bachtiar <<a href="mailto:sid.bachtiar@gmail.com">sid.bachtiar@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I think there are two ways that I'm aware of ... both using /etc/fstab<br>
(<a href="http://ubuntuforums.org/showthread.php?t=283131" target="_blank">http://ubuntuforums.org/showthread.php?t=283131</a>)<br>
- One is to allow users to use pmount command to mount the drive<br>
- Another is to set the mounting to auto which would mount the drive<br>
automatically when the system boot<br>
<br>
I'm a newbie myself so I don't have the details on top of my head.<br>
<div><div></div><div class="Wj3C7c"><br>
On Wed, Apr 30, 2008 at 2:29 PM, Johann Schoonees<br>
<<a href="mailto:j.schoonees@irl.cri.nz">j.schoonees@irl.cri.nz</a>> wrote:<br>
> I've googled and searched the archives but I'm getting swamped with<br>
> marginally related "USB drive does not mount" hits. Here goes:<br>
><br>
> When I log into the kubuntu Feisty desktop, there is an icon showing<br>
> that my external USB drive is connected and mounted.<br>
><br>
> However, cron runs a nightly back-up script for me at 3 am when no-one<br>
> should be logged in, but after migrating from Fedora to Feisty, it fails<br>
> at the point where I try to mount the external USB drive:<br>
><br>
> MOUNT_OK=no<br>
> for DISK in $DISK_LABELS<br>
> do<br>
> # mount -w "$MOUNT_POINT/$DISK" 2> /dev/null<br>
> mount -w "$MOUNT_POINT/$DISK"<br>
> MOUNT_RES=$?<br>
> if [ "$MOUNT_RES" = "0" ]; then<br>
> MOUNT_OK=yes<br>
> break<br>
> fi<br>
> done<br>
><br>
> results in:<br>
><br>
> mount: can't find /media/backup_0 in /etc/fstab or /etc/mtab<br>
> mount: can't find /media/backup_1 in /etc/fstab or /etc/mtab<br>
> mount: can't find /media/backup_2 in /etc/fstab or /etc/mtab<br>
> ...<br>
><br>
> even when a disk with label backup_1 (or 2 etc.) is connected.<br>
><br>
> There is no entry for /dev/sdb1 in /etc/fstab. There is one in etc/mtab<br>
> when someone is logged into the desktop, but not when not. It looks<br>
> something like this:<br>
><br>
> /dev/sdb1 /media/backup_1 ext3 rw,noexec,nosuid,nodev,sync,data=ordered 0 0<br>
><br>
> Under Fedora it used to look like this:<br>
><br>
> /dev/sdb1 /media/backup_1 ext3 rw,nosuid,nodev 0 0<br>
><br>
> The exact mount point depends on the disk label. I have more than one<br>
> back-up disk, each with a unique label.<br>
><br>
> Under Fedora there used to be an entry in fstab like this:<br>
><br>
> /dev/sdb1 /media/backup_1 ext3 pamconsole,exec,noauto,managed 0 0<br>
><br>
> which changed automatically (apparently under control of something<br>
> called fstab-sync which I don't see in kubuntu) according to the label<br>
> of the connected drive.<br>
><br>
> In short, how should my script detect and mount a connected USB external<br>
> drive when no-one is logged in?<br>
><br>
> Any help appreciated,<br>
> Johann<br>
><br>
> --<br>
> ubuntu-nz mailing list<br>
> <a href="mailto:ubuntu-nz@lists.ubuntu.com">ubuntu-nz@lists.ubuntu.com</a><br>
> <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-nz" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-nz</a><br>
><br>
<br>
--<br>
ubuntu-nz mailing list<br>
<a href="mailto:ubuntu-nz@lists.ubuntu.com">ubuntu-nz@lists.ubuntu.com</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-nz" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-nz</a><br>
</div></div></blockquote></div><br>