Hardware - Support > Hard Drives and SSDs

Can I Mount HD on Startup?

(1/2) > >>

Wirezfree:

--- Quote from: CaperAsh on November 10, 2014, 01:08:27 PM ---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.

--- End quote ---

Hi,

I had some similar issues when I started..
I initially couldn't get my head around mount points and putting them in fstab.
I got some really good help and guidance from "gold_finger"
He's also got this:
https://www.linuxliteos.com/forums/index.php?topic=203.msg997#msg997
It's about a separate data partition, but it applies to doing more.
Go through the above, it also covers "binding" so you can have the partitions folders
linked directly to folders in your /home directory.

I have 4 partitions on my 2nd drive:
/home (keep my home separate ease of backup/recovery)
/data (keep my data separate ease of backup/recovery)
/vbox (keep Virtualbox VMS separate, easy to omit from backups)
/vault (keep a local backup of key things, just in case)

Dave

CaperAsh:
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.

bobw:
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.

CaperAsh:
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.

bobw:
A drive can be mounted at startup by crontab using the command:
@reboot mount -------

Navigation

[0] Message Index

[#] Next page

Go to full version