public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Daniel Troeder <daniel@admin-box.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user]  Re: Genkernel: non-standard crypto setup
Date: Fri, 02 Jan 2009 21:42:37 +0100	[thread overview]
Message-ID: <1230928957.12748.31.camel@maya.local> (raw)
In-Reply-To: <200901022003.40873.dirk.heinrichs@online.de>

[-- Attachment #1: Type: text/plain, Size: 2447 bytes --]

Am Freitag, den 02.01.2009, 20:03 +0100 schrieb Dirk Heinrichs:
> Am Freitag, 2. Januar 2009 19:36:28 schrieb Jens Müller:
> > Raid part 1 \
> > Raid part 2 >- Raid5 -> /dev/md127 = PV1
> > Raid part 3 /
> >
> >                       ...(possibly others)...
> > PV1 --LVM--> VG1 --->    LV1: \dev\mapper\vg1-crypt
> >
> > LV1: \dev\mapper\vg1-crypt --cryptsetup--> \dev\mapper\crypt_pv
> >
> > \dev\mapper\crypt_pv = PV2  --LVM--> VG1 ---> (all the partitions)
    ^^^^^^^^^^^^^^^^^ backslashes - hihi ;-)

> > Basically, I have one encrypted "physical" volume, but I want to be
> > flexible ...
> 
> If you have one encrypted PV from which you build a VG, then every LV inside 
> it will automatically be encrypted. So where's the flexibility?
I think it's a good idea. I have (nearly) my hole disk (except /boot and
1xNTFS) as a partition which is encrypted. Unencrypted it is a PV for a
VG in which all my Linux-partitions lives.
Nicely transparent setup for me, except for the fact, that now I cannot
install anything unencrypted anymore (for guests for example) or use a
different key for different LVs.
I don't know if the added LVM-layer costs notable CPU-time - but I'd be
easy for you to test :)

> For the latter I have some scripts ready to create an initramfs which can be 
> combined with the kernel (It's for EVMS, but it should be easy to adapt to 
> LVM.
I'm pretty sure genkernel can do it. I have observed that _before_ it
asks me for my crypt-password it does a lvm-scan, and also _after_. The
latter is the only one I need, but for Jens the first one will make your
LV for decryption accessible, and the latter will then reveal your LV
for your root.

BTW: I have compiled the modules I need for booting (incl. crypto-stuff)
into the kernel, so I can use this initrd with every new kernel. As it
now contains no modules, there is no need not to use genkernel anymore.

The genkernel-docs tell you to use on the kernel command line:
root=/dev/vg0/gentoo-root         (unencrypted dev - for /proc/cmdline)
real_root=/dev/vg0/gentoo-root    (unencrypted dev - for initrd-script)
crypt_root=/dev/sda2              (encrypted dev   - for initrd-script)
dolvm                             (do LVM scans    - for initrd-script)
keymap=de                         (if not US-kbd   - for initrd-script)

There is also "real_swap" and "real_resume" and other nice stuff :)

Bye,
Daniel

[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

      parent reply	other threads:[~2009-01-02 20:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-02 17:50 [gentoo-user] Genkernel: non-standard crypto setup Jens Müller
2009-01-02 18:28 ` Dirk Heinrichs
2009-01-02 18:36   ` [gentoo-user] " Jens Müller
2009-01-02 19:03     ` Dirk Heinrichs
2009-01-02 19:20       ` Jens Müller
2009-01-02 20:42       ` Daniel Troeder [this message]

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=1230928957.12748.31.camel@maya.local \
    --to=daniel@admin-box.com \
    --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