Gentoo Archives: gentoo-amd64

From: Adrian Middleton <lists@×××××××××××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Using encrypted swap via cryptsetup-luks on amd64
Date: Sat, 21 Oct 2006 11:40:55
Message-Id: 20061021073901.3e81782e@trichrome.mentalcases.net
1 So I have been using this same setup perfectly for like a year until
2 yesterday when I updated my system and rebooted to find that init was
3 hanging when trying to mount my swap. It appears the problem occured
4 because of something to do with a cryptsetup upgrade. I forgot to run
5 dispatch-conf after the system update and found that my system would hang very early in init with 'Warning: exhausting read requested, but key file is not a regular file, function might never return'
6 and an invalid variable 'type=luks' error. So I boot the live cd and mount the root fs and
7 run dispatch-conf and find that indeed there is no longer a 'type'
8 variable. After modifying the new /etc/conf.d/cryptfs to match my old
9 one as much as i could and carefully reading the comments, I rebooted
10 again only to find that the 'invalid variable' error was gone but the
11 error about an exhausting read persisted
12
13 According to the new cryptfs, options '-c aes -h sha1 -d /dev/urandom' are used with swap by default but the command echo'd during boot reflects this, but also appears to use the 'luksOpen' action with the command. when i issued the command from the shell prompt, it didn't prompt for a pass and failed just as i'm assuming it did during boot and gave the same error. i should think the command issued by init would be one that uses the 'create' action rather than 'luksOpen', since that is what is specified in most of the documentation on creating encrypted swaps i have read. when i do it manually with 'create' rather than 'luksOpen' it still works fine so i don't know what is going on with the new script(s) that reference this file. the new /etc/conf.d/cryptfs says that the script should autodetect if it is a LUKS partition or not but apparently it doesn't do a very good job... or i'm missing something really obvious somehow
14
15 any help regarding this would be greatly appreciated. here is a copy of my new /etc/conf.d/cryptfs options:
16
17 ## swap
18 # Swap partitions. These should come first so that no keys make their
19 # way into unencrypted swap.
20 # If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom
21 # If no makefs is given then mkswap will be assumed
22 swap=crypt-swap
23 source='/dev/sda1'
24 #options='-c aes -h 256 -d /dev/urandom'
25
26 ## /home with passphrase
27 target=home
28 source='/dev/sda3'
29
30 Thanks in advance
31 --
32 gentoo-amd64@g.o mailing list

Replies

Subject Author
[gentoo-amd64] Re: Using encrypted swap via cryptsetup-luks on amd64 Duncan <1i5t5.duncan@×××.net>