Thursday, October 3, 2013

[Linux] HOW TO: Auto-mount drive at start-up.

Hello. Today I'll show you how to connect disk on start-up.

In my example, I will mount Windows NTFS partition.

(Tested on Linux MINT 15 - MATE 64bit edition)

1) Create mount point. It's a folder where you find connected disk. Usually it's in /media/ or /mnt/ folder. For example:

sudo mkdir /media/C/

2) Check for disk UUID. IMO the best way to do it:

My output:

sda                931,5G
├─sda1 Reserved    100M    ntfs     BE92D9F292D9AF61
├─sda2             146,4G  ntfs     6860FE1960FDEE26
├─sda3             1K
├─sda4 LENOVO_PART 1,1G    ntfs     C2A42A41A42A37F5
├─sda5             15,3G   swap     f5f23a4f-6990-4bb3-917a-b14809afaaa3
├─sda6             122,1G  ext4     e4a93288-4840-4353-a522-339ed63f1b59
└─sda7             646,6G  ntfs     38C250A1C25064E2
sr0                1024M
For me, its 150 GB ntfs partition. UUID=6860FE1960FDEE26

3) Now edit /etc/fstab.

sudo nano /etc/fstab
Add following line to the end of the file:

UUID=<your uuid> <your mount point> <file system> defaults 0 0
For me, its:

UUID=6860FE1960FDEE26 /media/C ntfs defaults 0 0

4) Manually mount from /etc/fstab by using:

sudo mount -a
or just restart your system.

You are done :)

No comments :

Post a Comment