public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Encrypting everything
Date: Wed, 1 Jul 2009 12:40:20 +0200	[thread overview]
Message-ID: <200907011240.21313.wonko@wonkology.org> (raw)

Hi there!

The last two PCs (A and B) I installed are fully encrypted. I used 
different methods. I used genkernel --luks --lvm --install all to create 
kernel and initramfs. I like to have everything as kernel modules, but the 
crypto stuff has to be directly in the kernel, unless I put these modules 
into the initramfs by hand.


A: LVM -> LUKS
Many partitions make two volume groups with many LVMs. Each LVM is LUKS-
encrypted. This gives me maximum flexibility, who knows what other OSes I 
might need to install on that drive. The boot partition is on a USB stick 
and also holds the key.

This did not work out of the box, I had to modify 
/lib/rcscripts/addons/dm-crypt-start.sh in order to open the other 
partitions than swap and root. I need to add something to close them when 
shutting down, but it seems to work fine without this for the moment. Do 
you know if there already is a solution for this?


B: LUKS -> LVM
A simpler approach. sda1 is a small boot partition, sda2 (the rest of the 
drive) is a LUKS-formatted LVM physical volume with volume group 'pvcrypt' 
on it. This does not work yet, the initramfs does not find the LVM.

I looked into the init script. I wants to do a cryptsetup luksOpen 
$LUKS_DEVICE $LUKS_NAME with $LUKS_NAME=root, which is not the name I use. 
But changing this does not help anyway. I get /dev/mapper/pvcrypt created, 
but pvscan does not find it. At this point I thought I'd ask here, do you 
have ideas what's wrong?

Using a live CD I can easily access my data:
cryptsetup luksOpen /dev/sda2 pvcrypt
pvscan
vgchange -a y
mount /dev/vgcrypt/root /gentoo

	Wonko



             reply	other threads:[~2009-07-01 10:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 10:40 Alex Schuster [this message]
2009-07-02  0:24 ` [gentoo-user] Encrypting everything Alex Schuster
2009-07-02 17:04 ` Dirk Heinrichs
2009-07-04 12:51   ` Alex Schuster
2009-07-04 15:11     ` Dirk Heinrichs
2009-07-05 14:28       ` Alex Schuster
2009-07-05 14:48         ` Dirk Heinrichs
2009-07-05 17:53           ` Alex Schuster
2009-07-05 18:09             ` Dirk Heinrichs
2009-07-05 18:26               ` Alex Schuster
2009-07-05 18:36                 ` Dirk Heinrichs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907011240.21313.wonko@wonkology.org \
    --to=wonko@wonkology.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox