this post was submitted on 11 Mar 2025
24 points (92.9% liked)

Linux

51586 readers
364 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] American_Jesus@lemm.ee 7 points 19 hours ago* (last edited 19 hours ago) (4 children)
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)

[–] 9tr6gyp3@lemmy.world 4 points 18 hours ago* (last edited 18 hours ago) (1 children)

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.

[–] ocean@lemmy.selfhostcat.com 1 points 18 hours ago (1 children)
[–] eskuero@lemmy.fromshado.ws 4 points 18 hours ago* (last edited 18 hours ago) (1 children)

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

extra UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /root/keyfile.bin luks

[–] 9tr6gyp3@lemmy.world 4 points 17 hours ago

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.

load more comments (2 replies)