Posts: 80
Threads: 26
Joined: Nov 2014
Reputation:
0
11-09-2014, 12:47 AM
(This post was last modified: 02-10-2015, 04:12 PM by Scott(0).)
I have system(s) on 128GB SSD. Most files and data are on 1 TB HD. I would like this to mount automatically each time on startup rather than having to mount manually, input PW etc. each time.
Is this possible and if so how?
Posts: 8,898
Threads: 542
Joined: Feb 2014
Reputation:
5
Covered in the Help Manual under - Install Guide, Mounting drives & partitions. I'm assuming that drive uses ntfs, if so follow the ntfs guide.
Posts: 80
Threads: 26
Joined: Nov 2014
Reputation:
0
Yes, it is covered, but I have been unable - after many attempts - to do it. I also installed Disks and tried a GUI solution but that didn't work either. Frustrating since I did it successfully a few days ago but cannot find the right search result which walked me through it.
I am sure the problem involves a little word here or there. I am simply trying to have my main data HD mounted automatically at startup. It's a 1 TB Sata Drive. Here is the blk output:
dev/sda1: UUID="7886cc4c-02f0-4dff-a51f-98338d1daf9f" TYPE="ext4"
/dev/sda2: UUID="222cd123-de88-46e2-917e-3d0b12a910cf" TYPE="ext4"
/dev/sda3: UUID="22f4d75f-62b5-4a23-94e8-5b4691e3783a" TYPE="ext4"
/dev/sda5: LABEL="XTRA" UUID="681b604c-0dad-43b4-9fdc-731290644acb" TYPE="ext4"
/dev/sda6: UUID="455af578-e1c7-437f-a5c8-338440805338" TYPE="swap"
/dev/sdb1: LABEL="BIG HD" UUID="2d15b124-0435-43ad-a876-18cac765f7e3" TYPE="ext4"
Could someone kindly write out the line I need to insert into fstab?
The only example in the manual is for the Home folder. (It would be helpful to have several examples and that way you can better understand how the language works and actually understand what you are inputting vs. simply copying and pasting.
This is what I attempted last which didn't work at all:
# BIG HD by Ash on /dev/sdb1 during installation
UUID=2d15b124-0435-43ad-a876-18cac765f7e3/ ext4 discard, defaults 0 3
Thanks in advance.
Posts: 80
Threads: 26
Joined: Nov 2014
Reputation:
0
I think I now understand that I didn't input the mount point correctly, but don't know how to determine what that should be.
Could that mount point be:
/media/BIG HD
?
Posts: 85
Threads: 8
Joined: Feb 2014
Reputation:
0
A drive can be mounted at startup by crontab using the command:
@reboot mount -------
Posts: 80
Threads: 26
Joined: Nov 2014
Reputation:
0
thxs bobw, but that's over my experience level to know what to put instead of ---- !
I changed it to the above and it didn't reboot.
Although the drive name displays as BIG HD, it has to be BIGHD in fstab. I noticed in the text display whilst booting up in recovery mode that it had an error trying to mount the drive BIG. So luckily, by simply erasing out the space, now it works.
So NOW I can make a system backup file with this clean install which has all basic programs running and simple things like being able to have the Data HD mount on startup so that programs which reference folders/files therein will work immediately without my having to remember to manually mount the HD, enter PW etc. etc.
Thank you for help.
Posts: 85
Threads: 8
Joined: Feb 2014
Reputation:
0
Glad you've solved it, CaperAsh.
Re your question about what to put instead of -----, when you mount a drive by right-clicking the desktop icon or selecting it in Thunar, the system, by default, creates a directory in /media/user using the drive label as the directory name, then mounts the drive at that point. If you want to mimic that, and assuming that you are user CaperAsh, the mount point should be /media/CaperAsh/BIG HD.
If using crontab as I suggested, you would need two commands in the root crontab:
@reboot mkdir /media/CaperAsh/"BIG HD"/
@reboot mount /dev/sdb1 /media/CaperAsh/"BIG HD"/
The inverted commas in the commands are needed because of the space in the directory name.
Posts: 80
Threads: 26
Joined: Nov 2014
Reputation:
0
Thank you bobw.
I have never heard of crontab before so that is why I was so flummoxed. Have since googled it and not sure if I need/want to learn another interface whilst still have so much to understand in terms of Linux basics.
I did what you explained already. On re-reading what I had input I realised that there was no mount point entry (because the line above was for the swap file). So then I input media/ash/BIGHD and it worked, although the first time it didn't work because I put in BIG HD which is how it is labelled in partition manager and displays in File Manager. In fstab, though, nospacesallowedthat'showitthinksIguess.
Thanks.
Again, though, I think the manual should slightly improve that section by giving just 2-3 more examples of different fstab lines because the ones they give are just for /home which nearly all systems are going to have already, so good to see how to set up a partition on a different HD, which I suspect is often what people want to do first thing in order to access all their saved data files.