[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mount external usb drive at boot



On Apr 8, 2005 6:57 PM, Hannuman Bull <hannuman@bullwebsystems.com> wrote:
> I have an external usb drive that I'm setting up as a backup hd.  I've
> partitioned and formatted the drive as ext3.  I can mount the drive
> manually at the prompt, but I can't seem to get fstab to mount it
> automatically on boot.
> 
> I've changed the /etc/fstab options several times without much success.
> Here is my most recent setting:
> 
>     /dev/sdb1   /backuppc   ext3   rw   0   0
> 
> After boot, /dev/sdb1 is not mounted automatically. However, it does
> mount properly when I manually type 'mount /dev/sdb1'. From 'mount', I get :
> 
>     /dev/sdb1 on /backuppc type ext3 (rw)
> 

Since there's a slight chance your drive might change device nodes
(one boot it could be /dev/sdb, if you add or change something it
could end up being /dev/sdX) I recommend using LABEL based mounting. 
It's helpful (and easier) for using external drives.  It only works
with a couple of filesystem types, but ext3 is one of them

First, label your drive:
# tune2fs -L backups /dev/sdb1
(replace backups with what you like to label it as)

then in /etc/fstab instead of using the /dev/sdb1 use the label.
LABEL=backups    /backuppc ext3 rw,auto 0 0

The next problem is forcing it to be mounted before backuppc... if
it's not a script that will be replaced you can cheat and just put
mount -L backups
in the backuppc script before it starts.

-- 
~ Darryl  ~ smartssa@gmail.com
http://smartssa.com / http://darrylclarke.com
International Clean Your Windows Day - April 22, 2005
http://pileofcrap.org/news/2096/



Reply to: