Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Re: Re: Full disk encryption
Date: Thu, 01 Dec 2011 05:40:19
Message-Id: 4ED712E5.9040107@gmail.com
In Reply to: [gentoo-user] Re: Re: Re: Full disk encryption by Jack Byer
1 Jack Byer wrote:
2 > I can tell you how mine is set up.
3 >
4 > emerge -v dracut
5 >
6 > These are the packages that would be merged, in order:
7 >
8 > [ebuild R ~] sys-kernel/dracut-013-r2 USE="-debug (-selinux)"
9 > DRACUT_MODULES="btrfs crypt lvm -biosdevname -caps -crypt-gpg -dmraid -
10 > dmsquash-live -gensplash -iscsi -livenet -mdraid -multipath -nbd -nfs -
11 > plymouth -syslog -xen" 0 kB
12 >
13 > I don't use any of the other modules so all I enable are btrfs, crypt and
14 > lvm.
15 >
16 > /etc/dracut.conf has no changes from the default except for the line:
17 >
18 > add_dracutmodules+="crypt dm lvm"
19 >
20 > but I'm about 80% sure even that isn't necessary and you could just leave
21 > the default values alone. One of these days I'll get around to testing that.
22 >
23 > I make an initramfs with the following command:
24 >
25 > dracut --lzma<hostname>.dracut.lzma<kernel version>
26 >
27 > (obviously change --lzma to whatever type of compression your kernel
28 > expects
29 > to use and name the file whatever you want. Make sure to include the kernel
30 > version just like it appears in your /lib/modules/ directory so that dracut
31 > includes the correct kernel modules)
32 >
33 > Then I make grub.conf look something like this:
34 >
35 > root (hd0,0)
36 > kernel /<hostname> root=UUID=08b00d7f-b633-4c03-98fe-dd5942a8fb7e
37 > initrd /<hostname>.dracut.lzma
38 >
39 > I like to name my kernels and initramfs files by the hostname of the
40 > computer since I have three that I manage but use whatever you want and
41 > just
42 > make sure you put the right filenames in grub.conf.
43 >
44 > You can obtain the UUID of your root filesystem by a number of methods, but
45 > the easiest is to use ls -l /dev/disks/by-uuid/
46 >
47 > That's really all there is to it. Dracut will boot up and load the modules
48 > it is compiled with and search through the disks, logical volumes, and
49 > dmcrypt containers until it finds a filesystem with the UUID you specify.
50 > Once it finds the root filesystem it mounts it with whatever options you've
51 > specified in /etc/fstab and then hands control over to OpenRC.
52 >
53 > If it has the necessary modules (kernel and dracut) and you pass the right
54 > root= option then it Just Works.
55 >
56
57 < Dale copies to his "Important" folder >
58
59 I'm going to give this way a shot next time. I'm downloading a lot of
60 TV shows right now so can't reboot very often.
61
62 Thanks much for posting this tho. This helps me a LOT. With all the
63 time I have on my hands, I really need to learn how to add things to all
64 these wiki sites.
65
66 Dale
67
68 :-) :-)
69
70 --
71 I am only responsible for what I said ... Not for what you understood or how you interpreted my words!