Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] My initramfs, embedded in the kernel (Requested from "remote installation, dual boot")
Date: Sat, 25 Apr 2015 09:40:13
Message-Id: 5127577.bRe6ssi7Km@andromeda
1 On Friday, April 24, 2015 03:38:53 PM james wrote:
2 > J. Roeleveld <joost <at> antarean.org> writes:
3 > > This is one of the reasons why I have given up on genkernel and dracut for
4 > > initramfs creation and now simply build my own and have it integrated
5 > > into the kernel:
6 > > $ zcat /proc/config.gz | grep INITRAMFS_SOURCE
7 > > CONFIG_INITRAMFS_SOURCE="/usr/src/initramfs/config"
8 > >
9 > > If you're interested I will send you the required files.
10 > >
11 > > Joost
12 >
13 > I'd be curious to look at exactly how you are doing this,
14 > if you want to post them somewhere, or send me a copy too,
15 > It would be appreciated.
16
17 The final solution was quite simple. Attached the "init" file and the "config"
18 file.
19
20 Both of these live in " /usr/src/initramfs " on my laptop.
21
22 I have 2 drives in my laptop which are both encrypted. The actual encryption
23 key is in a file called 'key.iso'. You can remove those references if you want.
24
25 For completeness, the commands to create the 'key.iso' are in "create_key"
26 And the commands to encrypt a drive/partition/... using that key.iso are in
27 "encrypt_partition"
28
29
30 Something neither genkernel or drucat support is to enter an encryption key
31 once and use that to decrypt all the drives. This is why I looked into doing
32 my own.
33
34 The part that occasionally needs to be updated is the list of dynamic
35 libraries needed for the applications embedded in the initramfs.
36
37 The command I use to build that list is in the "config" file.
38
39 If you have any questions let me know.
40
41 --
42 Joost

Attachments

File name MIME type
init application/x-shellscript
config text/plain
encrypt_partition text/plain
create_key text/plain