Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] systemd and initramfs
Date: Wed, 21 Aug 2013 00:33:03
Message-Id: 20130821003242.GB18970@waltdnes.org
In Reply to: Re: [gentoo-user] systemd and initramfs by "Canek Peláez Valdés"
1 On Tue, Aug 20, 2013 at 01:54:26AM -0500, Canek Peláez Valdés wrote
2 >
3 > No, the kernel has a mini filesystem (doesn't matter which directory
4 > structure has inside), and it executes the init script (or binary
5 > program) in the root of the initramfs. This init program/script is the
6 > responsible for mounting the real root and other partitions, and
7 > handling control over to systemd (or OpenRC, or whatever).
8 >
9 > Dracut is able to create an initramfs (with the systemd Dracut module)
10 > that executes systemd inside the initramfs, which mounts /usr,
11 > switches to the real root, and gives control to the "real" systemd
12 > instance. At shutdown, the reverse happens: the "real" systemd
13 > surrenders control to the initramfs systemd, it umounts everything,
14 > and finish the shutdow process.
15
16 A possibly stupid question from a non-user of initramfs... why not
17 simply treat the initramfs as "the real system"? This would avoid the
18 hand-off to a second fs at start-up, and the reverse process at
19 shutdown. There would be no need to worry about keeping files synced in
20 2 different locations, because there would only be one location. If
21 necessary, one could use UnionFS http://en.wikipedia.org/wiki/Unionfs to
22 make the hard drive and userspace stuff all look like part of the
23 initramfs.
24
25 --
26 Walter Dnes <waltdnes@××××××××.org>
27 I don't run "desktop environments"; I run useful applications

Replies

Subject Author
Re: [gentoo-user] systemd and initramfs "Canek Peláez Valdés" <caneko@×××××.com>