Automounting a USB hard disk in Ubuntu server - how?

Chris G cl at isbd.net
Tue Apr 29 13:36:44 UTC 2008


On Tue, Apr 29, 2008 at 06:56:02AM -0600, Karl Larsen wrote:
> Chris G wrote:
> > I have an external USB hard disk connected to an Ubuntu server 7.10
> > system.  What do I need to do (install something?) to get it to
> > automount?
> >
> > It currently works quite happily with the following line in
> > /etc/fstab:-
> >
> >     /dev/sdb1       /backup         ext3    user,noauto        0 0
> >
> > but as it's quite slow to appear I can't remove the noauto I don't
> > think as the drive isn't yet there when the system is booted.  In
> > addition it's not *guaranteed* to be /dev/sdb1.
> >
> >   
>     Take all that stuff you added to /etc/fstab out of the file. Let 
> Ubuntu load it automatic and mine comes up fast as /media/disk. If you 
> do not have an ext3 file system on the portable hard drive do it now.
> 
The USB drive is already formatted ext3 and has backups on it (hence
its name!).

I've taken the line above out of /etc/fstab, when I reboot the system
I see the following in dmesg:-

    [   20.424000] usb-storage: device scan complete
    [   20.424000] scsi 2:0:0:0: Direct-Access     SAMSUNG  HD501LJ PQ: 0 ANSI: 2 CCS
    [   20.424000] sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
    [   20.424000] sd 2:0:0:0: [sdb] Write Protect is off
    [   20.424000] sd 2:0:0:0: [sdb] Mode Sense: 00 38 00 00
    [   20.424000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
    [   20.428000] sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
    [   20.428000] sd 2:0:0:0: [sdb] Write Protect is off
    [   20.428000] sd 2:0:0:0: [sdb] Mode Sense: 00 38 00 00
    [   20.428000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
    [   20.428000]  sdb:<7>eth0: no IPv6 routers present
    [   24.696000] Installing knfsd (copyright (C) 1996 okir at monad.swb.de).
    [   24.820000] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
    [   24.832000] NFSD: starting 90-second grace period
    [   27.856000]  sdb1
    [   27.856000] sd 2:0:0:0: [sdb] Attached SCSI disk
    [   27.856000] sd 2:0:0:0: Attached scsi generic sg1 type 0

.... and then nothing.  The disk doesn't get mounted, at least I can't
see it anywhere and 'mount' doesn't report anything.


I'm not convinced that things will get automounted (by default) in
Ubuntu Server, remember there isn't any GUI running.

-- 
Chris Green




More information about the ubuntu-users mailing list