blogblogblogblog SyKoHPaTh

Linux Mint 12 Auto Mount Drive

Here's how to automount a drive:

1) First, open up terminal, and determine what type of drive format it is:
Code Sample:
  1. sudo blkid

With a second hard drive, it'll most likely be /dev/sdb1 or something around there. If you've labeled your drive, chances are it'll say LABEL="your label". Note the TYPE="xxxx", which will determine which of the following you'll use. In my example for my secondary hard drive:

/dev/sdb1: LABEL="Storage" UUID="92DEADA8DEAD8557" TYPE="ntfs"

2) Now you'll make your directory for your new mount. I like to keep the name of the folder the same as the drive label, but you can name it whatever you want.

Code Sample:
  1. sudo mkdir /media/Storage

3) Man this is so hard. Now open up your fstab...

Code Sample:
  1. sudo gedit /etc/fstab

4) And depending on your drive type, follow only the appropriate one:

*NOTE* It doesn't show up correctly here, but there is a tab where every space is. This is important! Copy-paste from here won't give you exactly what you need, so simply delete each space and TAB once.

/deb/drive /media/location type defaults 0 0

Also, make sure you replace "/dev/sdxx" with your drive (such as "/dev/sdb1") and the "/media/xxxxx" with your same directory name you did above (such as "/media/Storage").

Code Sample:
  1. /dev/sdxx /media/xxxxx ntfs defaults,umask=007,gid=46 0 0

Code Sample:
  1. /dev/sdxx /media/xxxxx vfat umask=0000,uid=1000,gid=1000,auto,rw,users 0 0

Code Sample:
  1. /dev/sdxx /media/xxxxx ext3 defaults,noatime 0 2

Note: If you ever remove/comment out this line in /etc/fstab, the drive will be stuck in "read-only" mode.

ubuntu, mint 12, linux, auto mount