Gentoo Archives: gentoo-genkernel

From: Dave Flogeras <dflogeras2@×××××.com>
To: gentoo-genkernel@l.g.o
Subject: [gentoo-genkernel] sys-kernel/genkernel-3.4.49.2 and luks+lvm
Date: Sun, 08 Jun 2014 21:25:34
Message-Id: CANB0TnQrEB2nOb4-e0E9idFYefpzxo9-0nFFZn4=PLYkrDqAfQ@mail.gmail.com
1 Hi,
2
3 I have recently decided to make my disk fully encrypted on my laptop.
4 Basically:
5 sda 8:0 0 119.2G 0 disk
6 ├─sda1 8:1 0 500M 0 part
7 └─sda2 8:2 0 118.8G 0 part
8 └─root 254:0 0 118.8G 0 crypt
9 ├─vol00-root 254:1 0 10G 0 lvm /
10 ├─vol00-portage 254:2 0 1G 0 lvm /usr/portage
11 ├─vol00-distfiles 254:3 0 4G 0 lvm /usr/portage/distfiles
12 ├─vol00-data 254:4 0 25G 0 lvm /mnt/data
13 └─vol00-home 254:5 0 25G 0 lvm /home
14
15 Where sda1 is a small efi boot part, and the rest is encrypted with
16 LUKS and has LVM on top of that for all system partitions.
17
18 I have had success booting with genkernel, invoking it with:
19
20 genkernel --no-ramdisk --disklabel --no-ramdisk-modules
21 --no-compress-initrd --luks --lvm initramfs
22
23 [I have all relevant mapper/crypt/ext4 stuff built into my kernel]
24
25 This is then added to the kernel with:
26 CONFIG_INITRAMFS_SOURCE='path to cpio'
27
28 and my command line stuff is built in also with:
29 CONFIG_CMDLINE="rootfs=ext4 crypt_root=UUID=.....
30 real_root=/dev/vol00/root video.brightness_switch_enabled=0 dolvm
31 root_trim=yes".
32
33 I use EFI stub, so it's convenient for me to build all this in.
34
35 My issue is that after the system is booted, /dev/disk/by-XYZ is not
36 populated with anything but things related to the raw disk partitions
37 (ie. sda1 sda2).
38
39 This was working fine before, when I simply had this layout (no LUKS)
40 /dev/sda1 [boot]
41 /dev/sda2 [root]
42 /dev/sda3 [LVM for the rest]
43
44 Is there something obvious I am doing wrong? It's not a huge deal,
45 but things like KDE's disk monitor applets fail to work since they
46 parse the /dev/disk tree (I assume, they no longer see any
47 partitions). The only thing I can see is different is that before I
48 had an actual real disk partition with the LVM flag set, which maybe
49 causes udev to parse it, where now I simply have done pvcreate
50 /dev/mapper/root with no GPT on it.
51
52 Dave

Replies

Subject Author
Re: [gentoo-genkernel] sys-kernel/genkernel-3.4.49.2 and luks+lvm Martin Dummer <martin.dummer@×××.net>