# Automount partition at bootup using UUID in Ubuntu 7.10



## Faun (Mar 11, 2008)

Here is a tutorial to mount your drive partitions using UUID (even if u change the label and swap ur hard drives this thing will not change). The UUID of a particular partition changes only after format/deletion of that drive.

Step by step approach:
Step 1 (Create a directory in media folder to mount the desired partition)
use this command

```
sudo mkdir /media/dld
```
*www.imgx.org/thumbs/large/13444_vltah/1.png


Here dld is the directory on which I want to mount sda6 partition


*www.imgx.org/thumbs/large/13445_xgbuo/2.png


Step 2 (Find out UUID of the desired partition sda6)
use this command to find out UUID 

```
blkid
```
or *sudo vol_id /dev/sdxx* or *ls -l /dev/disk/by-uuid*

*www.imgx.org/thumbs/large/13446_mcwaq/3.png


Step 3 (Open fstab file inside /etc directory)
use this command to open fstab file

```
sudo gedit /etc/fstab
```
*www.imgx.org/thumbs/large/13447_sfbyi/4.png




Step 3 (Edit you fstab file to include the partition sda6 to mount on dld)
include this line (assuming the partition is NTFS)

```
# dld
UUID=C21477C91477BECB /media/dld     ntfs   defaults,force,umask=007,gid=46 0       1
```
*www.imgx.org/thumbs/large/13448_uh61z/5.png

Do the same for other partitions


----------



## indian_samosa (Mar 11, 2008)

Thanks man ... I was looking for just a tut like this.Just starting out with ubuntu ...


----------



## Faun (Mar 11, 2008)

^^anytime


----------



## praka123 (Mar 11, 2008)

in ubuntu "vol_id" also reveals UUID


----------



## Faun (Mar 11, 2008)

yup and one more command i dont remember too reveals UUID

post updated


----------



## Quiz_Master (Mar 12, 2008)

Gr8 one.. Didn't knew this..
(still a lin n00b I am  hehe )

Thanks.. (I grabbed this tut from your blog though)


----------



## Faun (Mar 12, 2008)

^^actually formatting in blog is a lil difficult so i first post here then just copy/paste there


----------

