How to automatically mount 2nd internal Hard Drive [duplicate]

If you want to mount the second hard drive automatically you will have to change things at this point :D. There should be no reason to have it symbolically linked anywhere for a second hard drive.

If it is mounted at /media/username/a bunch of numbers and you have that linked to a folder off the root called /SecondDrive ... you don't need to do that you can actually automatically mount it on the root called /SecondDrive. It isn't that difficult I will run you through the steps and if you want.. after you see the answer you can reply with where you want it mounted, the information you gathered from following the steps and I will tell you the exact line that has to be added to your /etc/fstab

First terminal and type sudo blkid this will spit out a bunch of lines which may be wrapped and hard to read .. i suggest opening the terminal full screen or making it quite wide so you can get all the lines without wrapping. You will have an output that looks something like this

dev/sda1: LABEL="boot" UUID="e8b77b10-fd99-4c90-845d-310e8afc25df" TYPE="ext2" PARTUUID="00098acd-01"
/dev/sda5: UUID="c5653896-3d1b-48b4-855a-e76e6d88711a" TYPE="swap" PARTUUID="00098acd-05"
/dev/sda6: LABEL="root" UUID="0ae6d08b-d9c5-4109-9100-9a18fb068b2e" TYPE="ext4" PARTUUID="00098acd-06"
/dev/sda7: LABEL="home" UUID="ddffd3ed-205b-447d-852d-4552619e35d3" TYPE="ext4" PARTUUID="00098acd-07"
/dev/sdb1: UUID="720824B65B01A6C4" TYPE="ntfs" PARTUUID="21039491-01"
/dev/sdc1: LABEL="storage" UUID="0AED64E911A2FB1E" TYPE="ntfs" PARTUUID="e071ab3f-01"

Look for the partition you want to automatically mount and take note of the UUID and TYPE of the partition.

For example if I wanted to mount /dev/sdc1 I would open gedit or something you are familiar with to type text .. and copy the UUID and TYPE UUID="0AED64E911A2FB1E" TYPE="ntfs" then paste it into the editor so I can easily copy it when I need it

Now say I want it mounted right off / and I want to call it storage

I would first have to make an empty folder located at /storage if one didn't already exist .. if one does exist it needs to be an empty folder.

sudo mkdir /storage

We now have everything we need

Now we need to open /etc/fstab. This has to be done as root and I myself like to use gedit over a terminal to edit this so next in terminal type

sudo gedit /etc/fstab

This will contain all the partitions that mount at boot. You would need to add a line after all the others

The prefered format of the fstab that you have to worry about is UUID, mount point and type

So at the end of the file after everything else we would add the UUID a space then the mount point a space then the type .. .there is more but you don't have to concern yourself about it just remember to add the stuff I printed out after the type in my example full fstab line :D With the information we got from block id (blkid) and where we decided to make our mount point the line would look like this

UUID=0AED64E911A2FB1E /storage ntfs defaults 0 2

note that there is no quotes like blkid printed out so make sure if you paste in the UUID and type from the information we pasted into the editor for later use, that you remember to remove the quotes.

save the file and .. make sure the partition/drive isn't already mounted previously .. then type

sudo mount -a

you should not get any errors and you should see the drive/partition mounted at /storage (if you already had files on it you would see them now and the drive would be mounted) ... at this point every reboot the drive/partition would be mounted at /storage

Do not use this method to automatically mount a USB partition because if it is not plugged in during boot it can majorly slow the boot process or even cause the system to stop responding. This method should only be used for permanently installed hardware