Fstab Config for External Hard Drives?

Charlie Kravetz cjk at teamcharliesangels.com
Mon Apr 20 15:20:45 UTC 2009


On Mon, 20 Apr 2009 16:04:11 +0100
MG <m.s0128532 at gmail.com> wrote:

> which numbers do I add to fstab to get '
> 
> sudo mkdir /media/External
> 
> Where External is the name of the new folder.
> 
> Now open up your fstab and change the mount point for your drive.
> Recommend that you also use the UUID like jpkotta recommended.
> The line in your fstab should look something like this:
>  Code:
> 
> # /dev/sdb1
> UUID=XXXX-XXXX    /media/External   vfat....
> 
> '????????
> 
> 
> root at THUNDERCAT1:/home/max# sudo vol_id /dev/sda1
> ID_FS_USAGE=filesystem
> ID_FS_TYPE=ext3
> ID_FS_VERSION=1.0
> ID_FS_UUID=d053ecd0-1482-4cfc-8b34-1d821a41f843
> ID_FS_UUID_ENC=d053ecd0-1482-4cfc-8b34-1d821a41f843
> ID_FS_LABEL=
> ID_FS_LABEL_ENC=
> ID_FS_LABEL_SAFE=
> 
> root at THUNDERCAT1:/home/max# sudo vol_id /dev/sdb1
> ID_FS_USAGE=filesystem
> ID_FS_TYPE=ntfs
> ID_FS_VERSION=3.1
> ID_FS_UUID=F400580C0057D468
> ID_FS_UUID_ENC=F400580C0057D468
> ID_FS_LABEL=Local Disk
> ID_FS_LABEL_ENC=Local\x20Disk
> ID_FS_LABEL_SAFE=Local_Disk
> 
> root at THUNDERCAT1:/home/max# sudo vol_id /dev/sdc1
> ID_FS_USAGE=filesystem
> ID_FS_TYPE=vfat
> ID_FS_VERSION=FAT32
> ID_FS_UUID=17E8-082F
> ID_FS_UUID_ENC=17E8-082F
> ID_FS_LABEL=FREECOM HDD
> ID_FS_LABEL_ENC=FREECOM\x20HDD
> ID_FS_LABEL_SAFE=FREECOM_HDD
> 
> root at THUNDERCAT1:/home/max# sudo vol_id /dev/sdd1
> ID_FS_USAGE=filesystem
> ID_FS_TYPE=ntfs
> ID_FS_VERSION=3.1
> ID_FS_UUID=A46C9A946C9A60BA
> ID_FS_UUID_ENC=A46C9A946C9A60BA
> ID_FS_LABEL=
> ID_FS_LABEL_ENC=
> ID_FS_LABEL_SAFE=

Okay, I don't know how many different ways you will find to ask this,
but here is one way to add these drives to /etc/fstab :

/dev/sdc1    /directory/where/you/are/now/mounting    vfat
rw,hard,intr	0	0
/dev/sdb1    /directory/where/you/are/now/mounting    ntfs-3g
rw,hard,intr	0	0
/dev/sdd1    /directory/where/you/are/now/mounting    ntfs-3g
rw,hard,intr	0	0

These should be a single line in fstab. I have listed 3 lines above,
each one starts with /dev . It should allow you to automatically mount
scd1, sdb1, sdd1 when your system starts. If you unplug an external
drive and plug it back in, it may not be sdd1 anymore. Using UID's
instead of /dev/sdd1 prevents the drive getting lost at that time.

Good luck,

-- 
Charlie Kravetz 
Linux Registered User Number 425914          [http://counter.li.org/]
Never let anyone steal your DREAM.           [http://keepingdreams.com]




More information about the ubuntu-users mailing list