You are not logged in.
Pages: 1
Topic closed
I've created an /etc/crypttab file, now how do I run it? What is the equivalent of typing `mount -a` to activate /etc/fstab but to activate /etc/crypttab?
Thanks
Last edited by spotshot6544 (2013-08-03 18:58:04)
Offline
Such a thing doesn't exist. systemd reads /etc/crypttab at bootup and generates unit files for systemd-cryptsetup. They're unlocked automatically as the devices show up and then likely mounted according to fstab. I suppose if you wanted to reproduce this behavior manually, you could do something like:
# /usr/lib/systemd/system-generators/systemd-cryptsetup-generator /run/systemd/generator
# systemctl daemon-reload
# systemctl restart cryptsetup.target
But this really just begs the question: what are you really trying to do?
Last edited by falconindy (2013-08-03 17:56:03)
Offline
I don't use disk encryption, but aren't there several varieties - each of which would have their own equivalent to mount if you were not going to have it handled by systemd at boot time?
Truecrypt uses the command `truecrypt` to mount, dm-crypt/LUKS uses `cryptsetup` (based only on a quick read of the wiki). So I second the question above: what are you really trying to do, and/or what setup guide have you followed so far?
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Currently I'm giving the posted commands a look. systemd-cryptsetup-generator doesn't seem to exist, but I haven't investigated.
I'm just trying to setup an encrypted non-system drive for auto-mounting during boot, but I can't reboot at the moment.
Offline
Encrypted how? What method of encryption? Are you following one of the wiki pages, which one?
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
systemd-cryptsetup-generator doesn't seem to exist
It would - if you had systemd installed.
Last edited by Trilby (2013-08-03 17:57:17)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I can open the drive with
cryptsetup open /dev/sdb1 driveName --key-file myKeyfile
and `crypttab status driveName` reports:
/dev/mapper/driveName is active and is in use.
type: LUKS1
cipher: aes-xts-plain64
keysize: 512 bits
device: /dev/sdb1
offset: 4096 sectors
size: 5860526080 sectors
mode: read/write
And then I could certainly mount it with `mount /dev/mapper/driveName /mnt` but I'd prefer to have this setup to happen at boot (before login). I suppose I could add these commands to a custom systemd script, but that doesn't seem the proper way to go.
I tried `pacman -S systemd` and was told that it would be reinstalling.
The problem I might be having is that I am not familiar with systemd, and I have only recently moved to Arch.
(Note, "myKeyfile" exists on my system drive which is encrypted too (with a passphrase), so, for my goals, there is no passphrase and that is fine)
Offline
Offline
# /usr/lib/systemd/system-generators/systemd-cryptsetup-generator /run/systemd/generator
# systemctl daemon-reload
# systemctl restart cryptsetup.target
I just got it to work with this. Though, I only ran `/usr/lib/systemd/system-generators/systemd-cryptsetup-generator` leaving off the argument on the first command. I don't know why it at one point told me that it didn't exist. That's actually pretty weird. I'm looking at my bash history and I typed it in fine. I'm quite confused, perhaps I'm messing up some how. Though I did modify /etc/crypttab in between attempts. But! The important part is, that it worked in the end. Thanks!!
Offline
I've created an /etc/crypttab file, now how do I run it? What is the equivalent of typing `mount -a` to activate /etc/fstab but to activate /etc/crypttab?
I think
cryptdisks_start
is what you are looking for. (you have to specify the volume to setup).
Offline
rsalinas, please don't necrobump old topics, especially when they're marked as solved.
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed