LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to automount secondary disk inside ecryptfs home directory? (https://www.linuxquestions.org/questions/linux-software-2/how-to-automount-secondary-disk-inside-ecryptfs-home-directory-4175508545/)

coralfang 06-19-2014 05:51 PM

How to automount secondary disk inside ecryptfs home directory?
 
Hello.

Recently installed linuxmint 17 to a machine here, with an encrypted home folder (ecryptfs). The machine is to be used for gaming mostly, and has a second harddrive containing the contents of what would usually be located at ~/.local/share/Steam

I tried adding an fstab entry for the disk,
Code:

UUID=6f97f71e-94dd-4b67-a71c-aa95036c1e18 /home/user/.local/share/Steam jfs rw,noatime 0 0
Although it fails to mount, because the home folder is encrypted using ecryptfs. How can i automount this jfs disk at boot time?

I have it setup this way, as an encrypted disk can cause slower read time (And fast loading in games is important!)

coralfang 06-19-2014 06:13 PM

Ah nevermind. I found a solution (might not be the best, but it seems to work).

Added ... rw,user,noatime ... to /etc/fstab, allowing users to mount the disk, then placed this in the ~/.bashrc

Code:

cat /proc/mounts | grep /home/user/.local/share/Steam > /dev/null
if [ ! $? -eq 0 ] ; then
        mount /dev/disk/by-uuid/6f97f71e-94dd-4b67-a71c-aa95036c1e18
fi

Also needed to add exec to the options, otherwise steam won't launch anything...


All times are GMT -5. The time now is 01:43 AM.