Friday, October 17, 2008

Ubuntu - Auto mounting HDD at boot

After fidlling lot with Ubuntu finally here the sequence to auto mount HDD partitions and make them behave properly.

1. Open /etc/fstab. Add these lines.
 
/dev/sda2 /media/Vista ntfs-3g defaults,user,exec,uid=1000,gid=100,umask=000 0 0
 /dev/sda3 /media/SOFTWARE vfat defaults,user,exec,uid=1000,gid=100,umask=000 0 0


2. Make the corresponding directories in /media ( remember to mount the HDD partitions in the /media not the traditional /mnt else Ubuntu wont show it as HDD ).

3. Test the fstab success
 sudo mount -a


4. To find all the drives entries use fdisk or blkid
 sudo blkid


That's it, next reboot all partitions will be auto mounted.

No comments: