January 27, 2012 - Warren Held
Configure A Drive To Mount On Boot – Ubuntu Linux
I’m sure there are probably easier ways to go about this, but this is how I configured my secondary hard drive to mount when my Ubuntu system boots.
1. Mount the drive. Next open up a console (In Ubuntu Unity you can hit CTRL+ALT+T, or go into Programs->System->Accessories) and enter:
My drive was mounted on /media/Drive2 and we can see the Filesystem drive link is /dev/sdb1 and the filesystem format is ext4. Take note of this information.
2. Now in your console enter:
ls -l /dev/disk/by-uuid
The UUID will be listed next to the drive target link we took note of in step 1.
3. Lastly, you have to edit fstab to add the drive. Open up the fstab file in your favorite text editor. I ran:
sudo vim /etc/fstab
Follow my example below using your information. (the “defaults 0 0” can stay the same)
If when you reboot your computer the drive should already be mounted.