Gentoo Archives: gentoo-user

From: David Shen <davidshen84@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Self created initramfs cannot work
Date: Sat, 27 Jun 2009 12:55:36
Message-Id: 53e35fd50906270555wdf28fd2tadf0e71ee875ea61@mail.gmail.com
In Reply to: Re: [gentoo-user] Self created initramfs cannot work by Dirk Heinrichs
1 thanks a lot
2
3
4 On Sat, Jun 27, 2009 at 7:49 PM, Dirk Heinrichs<dirk.heinrichs@××××××.de> wrote:
5 > Am Samstag 27 Juni 2009 10:25:11 schrieb David Shen:
6 >
7 >> yep, i'd like to learn from your script.
8 >
9 > OK, here you are.
10 >
11 >> BTW, I also put my initramfs into a separate partition /boot.
12 >
13 > Seems you misunderstood. I don't use an initramfs anymore, /boot _is_ my
14 > initramfs replacement. Whatever you put into an initramfs can as well be put
15 > into /boot.
16 >
17 > I've attached both set of scripts, just choose the one you like more.
18 >
19 > mkinitfs_script.tar.bz2 contains the script to put stuff to /boot, while
20 > mkinitramfs_script.tar.bz2 contains the script to create an initramfs for use
21 > inside the kernel (kernel+initramfs will be one file).
22 >
23 > In both cases, you should adapt the /etc/mkinit*fs/config file to your needs,
24 > just adapt the list of executables you need/want in your init*fs and run the
25 > desired script.
26 >
27 > The mkinitramfs.sh script will put everything into /usr/src/initramfs. You
28 > should configure this in your kernel config so that the kernel build system can
29 > create the image for you.
30 >
31 > The other one will put everything into /boot.
32 >
33 > Out of the box, the resulting fs will be suited for accessing / from a logical
34 > volume which may optionally be encrypted using LUKS. The init script will find
35 > out at boot time wether the LV is encrypted and will run cryptsetup to prompt
36 > for a password.
37 >
38 > Finally, you need to adapt your bootloader, depending on which approach you
39 > choose:
40 >
41 > initramfs: realroot=/dev/vg/root  (* NO root=, because that's the initramfs).
42 >
43 > initfs: You'll need both root=/dev/sda1, which should be your /boot, realroot=
44 > as above and rw (this is important).
45 >
46 > BTW: Newer kernels also have a configuration option for this: CONFIG_CMDLINE.
47 >
48 > In case of further questions, just send a mail.
49 >
50 > Bye...
51 >
52 >        Dirk
53 >
54
55
56
57 --
58 Best Regards,
59 David Shen
60
61 http://twitter.com/davidshen84

Replies

Subject Author
Re: [gentoo-user] Self created initramfs cannot work David Shen <davidshen84@××××××××××.com>