Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] systemd and initramfs
Date: Tue, 20 Aug 2013 06:54:05
Message-Id: 521311AC.6010307@gmail.com
In Reply to: Re: [gentoo-user] systemd and initramfs by Helmut Jarausch
1 On 20/08/2013 08:44, Helmut Jarausch wrote:
2 > On 08/19/2013 04:55:29 PM, Mike Gilbert wrote:
3 >> On Mon, Aug 19, 2013 at 5:58 AM, Helmut Jarausch
4 >> <jarausch@××××××××××××××××.de> wrote:
5 >> > Hi,
6 >> >
7 >> > what binaries and libraries have to be put into an initramfs for a
8 >> system
9 >> > booting with init=/usr/lib/systemd/systemd ?
10 >> > (I am building the initramsfs myself)
11 >> >
12 >>
13 >> You need to get your root filesystem and /usr mounted. Just keep that
14 >> goal in mind and start adding files to support it.
15 >>
16 >> There doesn't need to be anything systemd-specific.
17 >>
18 >
19 > I am not sure about "timing".
20 >
21 > Initially the kernel has only the "mini" /usr partition contained within
22 > the initramfs.
23 > Then it switches to "real root" and only then it tries to mount the
24 > "real" /usr partition.
25 > Does this all happen before the kernel hands control over to the init
26 > process (i.e. systemd) ?
27
28 Yes.
29
30 init requires / to be properly mounted.
31
32 You have a typo in your description, it should be:
33
34 "Then it switches to "real root" and mounts the "real" / partition."
35
36 The kernel mounts /, init mounts /usr (read from fstab).
37 The kernel does not mount /usr (although there can be one in the
38 initramfs, this is discarded when real root is mounted)
39
40
41 --
42 --
43 Alan McKinnon
44 alan.mckinnon@×××××.com