I installed an additional SSD on my pc. Everything works ok, except I need to unlock it with my root password on every session so that it mounts.
I’ve tried formatting it to change the ‘owner’, tried adding it to the user group, and I can’t find any other solutions. Any ideas?
This happens irrelevant of DE (happens on KDE and hyprland). I’m running tumbleweed, though this looks like a config problem rather than a distro problem.
sudo mkdir /media/NewSSD # the name you like lsblk -f # look for UUID of new ssd
then add it to fstab https://wiki.archlinux.org/title/Fstab
Something like
UUID=<insert drive UUID> /media/NewSSD ext4 defaults 0 2
Make sure you use the correct filesystem (e.g. ext4 or other)
If its encrypted, you can also decrypt the drive automatically once booted by adding an entry in
/etc/crypttab
This will make it so you don’t have to type the password.
This never worked for me…
For automatically you need to add a keyfile to a slot in the luks device
# openssl genrsa -out /root/keyfile.bin 4096
# cryptsetup luksAddKey /dev/mapper/extra /root/keyfile.bin
The entry in the crypttab would be like this
And technically the key file can just be a plain text password and still work. Just as long as the key file matches the drive’s encryption password.