Automounting a USB hard disk in Ubuntu server - how?

Chris G cl at isbd.net
Tue Apr 29 21:31:25 BST 2008


On Wed, Apr 30, 2008 at 03:21:22AM +1000, Peter Garrett wrote:
> On Tue, 29 Apr 2008 17:43:22 +0100
> Chris G <cl at isbd.net> wrote:
> 
> > What I need is something to automount the drive after all the above 
> > has happened.
> 
> Have a look at the "usbmount" package. ( apt-cache show usbmount)
> 
> It creates entries for usb in /media , and automounts devices there
> ( by default /media/usb0 for the first device, then  /media/usb1,2 etc )
> 
> If you need to mount FAT file systems, you can configure that in
> /etc/usbmount/usbmount.conf
> 
> The file is well commented, the addition is a copy-paste, and you only
> need this edit if you are not using ext2, ext3 for your usb drive(s)
> 
Brilliant, that's what I needed, thank you.

All I did was "sudo apt-get usbmount" and it all works perfectly
without any changes at all (my external USB drive is ext3 formatted).
After a reboot /dev/sdb1 is mounted as it should be which it wasn't
before usbmount was installed.

-- 
Chris Green




More information about the ubuntu-users mailing list