F5F Stay Refreshed Software Operating Systems Set up automatic mounting of an encrypted secondary drive with a key file.

Set up automatic mounting of an encrypted secondary drive with a key file.

Set up automatic mounting of an encrypted secondary drive with a key file.

G
GreenLightFabi
Senior Member
696
08-08-2016, 11:42 AM
#1
I'm working with Arch Linux now. I need to configure your backup drive as encrypted. Since your root drive is already secured, I'll set up the secondary drive so that during boot it will prompt you to enter the root password. Once you provide that, the secondary drive will automatically mount under /dev/sda and remain ready without further input. Your main drive stays at /dev/nvme0n1p3, and the secondary is left blank until formatted.
G
GreenLightFabi
08-08-2016, 11:42 AM #1

I'm working with Arch Linux now. I need to configure your backup drive as encrypted. Since your root drive is already secured, I'll set up the secondary drive so that during boot it will prompt you to enter the root password. Once you provide that, the secondary drive will automatically mount under /dev/sda and remain ready without further input. Your main drive stays at /dev/nvme0n1p3, and the secondary is left blank until formatted.

B
154
08-19-2016, 01:17 PM
#2
/etc/crypttab can be used to mount automatically with a keyfile, or it can utilize the same password as the boot drive.
B
Bellabell11295
08-19-2016, 01:17 PM #2

/etc/crypttab can be used to mount automatically with a keyfile, or it can utilize the same password as the boot drive.

B
BryanPlayzz
Member
146
08-21-2016, 05:06 AM
#3
I found a tutorial on the final page of DuckDuckGo (https://www.howtoforge.com/automatically...-a-keyfile). It helped, but you still had to change the ownership of the mount point afterward to enable read and write access.
B
BryanPlayzz
08-21-2016, 05:06 AM #3

I found a tutorial on the final page of DuckDuckGo (https://www.howtoforge.com/automatically...-a-keyfile). It helped, but you still had to change the ownership of the mount point afterward to enable read and write access.

S
Smythers47
Junior Member
6
08-22-2016, 07:52 AM
#4
You don't need to change ownership settings. Just run sudo mkdir -p /run/media/accountname/sharename. For example, if your account is steve and you're using a drive named apps, you'd do sudo mkdir -p /run/media/steve/apps*. Then use that folder as your mount point, and set the permissions to rw,noatime. It should work fine.
S
Smythers47
08-22-2016, 07:52 AM #4

You don't need to change ownership settings. Just run sudo mkdir -p /run/media/accountname/sharename. For example, if your account is steve and you're using a drive named apps, you'd do sudo mkdir -p /run/media/steve/apps*. Then use that folder as your mount point, and set the permissions to rw,noatime. It should work fine.

D
DRGNdragsYT
Senior Member
723
08-22-2016, 01:49 PM
#5
I prefer placing files at /mnt/name_of_drive according to my choice.
D
DRGNdragsYT
08-22-2016, 01:49 PM #5

I prefer placing files at /mnt/name_of_drive according to my choice.

R
riptide1680
Member
169
08-22-2016, 09:13 PM
#6
It's fair enough; the issue is mainly about system settings. By default, systemd mounts files at /run/media/accountname, so moving them elsewhere needs you to adjust permissions.
R
riptide1680
08-22-2016, 09:13 PM #6

It's fair enough; the issue is mainly about system settings. By default, systemd mounts files at /run/media/accountname, so moving them elsewhere needs you to adjust permissions.