all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to hook into mount during boot
       [not found] <e2c67977-b8a4-4e95-abf4-c76d73ab3b13.ref@ymail.com>
@ 2024-01-03 12:32 ` Tristan Kohl
  0 siblings, 0 replies; only message in thread
From: Tristan Kohl @ 2024-01-03 12:32 UTC (permalink / raw)
  To: help-guix

Hey guys,

I wish you all a happy new year!

I am using Guix for a few months now and am in the process of migrating 
my home server.

The server hosts 5 drives which are LUKS-encrypted. The "keyfile" is at 
an offset into some small trailing free space of a specific thumb drive. 
Right now I boot up my server, plug in the drive and run following 
script as there is no /etc/crypttab which does this on other 
distributions. Luckily the server only needs a reboot every couple 
months. Still this process is quite inconvenient and imho defeats the 
idea of Guix' awesome configuration. Also I can not have my containers 
come up on boot.


#!/bin/sh

KEYFILE=/tmp/keyfile

dd if=/dev/disk/by-uuid/<UUID> of="$KEYFILE" bs=512 count=1 skip=<offset>

|cryptsetup open /dev/disk/by-uuid/<DISK1> --key-file "$KEYFILE" pool1|

|||cryptsetup open /dev/disk/by-uuid/<DISK2> --key-file "$KEYFILE" pool2|

|...|

|rm "$KEYFILE"
|

|btrfs device scan|

|mount /dev/mapper/pool1 /pool|


Since Guix does not currently support decryption via a keyfile from an 
external source I think this is my best bet right now. But how do I tell 
the system to run this so the pool drives are ready when Guix tries to 
mount?

Thank you very much for any help,
Tristan

|
|||



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-04 20:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <e2c67977-b8a4-4e95-abf4-c76d73ab3b13.ref@ymail.com>
2024-01-03 12:32 ` How to hook into mount during boot Tristan Kohl

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.