Ubuntu 14.04: Auto-mounting internal HDDs to named folders

I dual-boot Ubuntu 14.04 and Windows 7, though I’ve only used Windows once. Both ‘/’ and windows are installed on my SSD.

For data, I have two 2TB internal HDDs. The file-system is NTFS. By default, to access the data within these HDDs, one have to mount them first, either via `mount` or through the file-manager (“Files” in the case of Unity).

Through file-manager the HDDs are then mounted in ‘/media/username/UUID’, where UUID denotes that of the HDD.

To auto-mount these HDDs every time on boot, to named folders (e.g /media/data_drive1) I did the following:

1. Mount the HDD through the file-manager. Then you would know which HDD contains which files, in terms of their UUID. This is useful because say you switched the SATA cables to the HDD, their device name (e.g. /dev/sdb1, /dev/sdc1) would change, but UUID won’t.

2. Edit `/etc/fstab` and add a line such as:

`UUID=0883111D0548716A /media/data_drive1 ntfs defaults 0 1`
where the 1st field is UUID of the device,
2nd field is the named folder you’re mounting it to,
3rd field is the file-system (you can find out via gparted, for example),
4th field is mounting options

For more see Ubuntu fstab

3. Reboot

Advertisements

About collapsedwavefn

I have a lot of thoughts. Some of them I'd like to share.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s