man: slightly enhance docs about "exitrd" and remove TODO entry for it
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 23 Sep 2024 09:41:29 +0000 (11:41 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 8 Oct 2024 15:39:12 +0000 (16:39 +0100)
The concept is fairly well established and present in our docs in various
places.

Say that the exitrd is also marked by the presence of /etc/initrd-release.

(cherry picked from commit ace26a511ff63dbc15f1b2b0b941cbd3294a288c)

TODO
man/bootup.xml
man/os-release.xml

diff --git a/TODO b/TODO
index b375327fe0d0016eb3688f3ea633345e32680911..eed88de0cbbc7323dfeeee01725ce1bd262964e7 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1302,12 +1302,6 @@ Features:
   CapabilityQuintet we already have. (This likely allows us to drop libcap
   dep in the base OS image)
 
-* add concept for "exitrd" as inverse of "initrd", that we can transition to at
-  shutdown, and has similar security semantics. This should then take the place
-  of dracut's shutdown logic. Should probably support sysexts too. Care needs
-  to be taken that the resulting logic ends up in RAM, i.e. is copied out of
-  on-disk storage.
-
 * userdbd: implement an additional varlink service socket that provides the
   host user db in restricted form, then allow this to be bind mounted into
   sandboxed environments that want the host database in minimal form. All
index c942bab34420dd014cc7f6ea5e05d3aa2b716b8f..e753ec74895f95664786456f91b79d78596f8a70 100644 (file)
@@ -344,6 +344,17 @@ systemd-reboot.service     |               |               |               |
     shutdown phase described above.</para>
   </refsect1>
 
+  <refsect1>
+    <title>The exitrd</title>
+
+    <para>The "exitrd" is a concept symmetrical to the initrd. When the system manager is shutting down and
+    <filename>/run/initramfs/shutdown</filename> exists, it will switch root to
+    <filename>/run/initramfs/</filename> and execute <filename>/shutdown</filename>. This program runs from
+    the tmpfs mounted on <filename>/run/</filename>, so it can unmount the old root file system and perform
+    additional steps, for example dismantle complex storage or perform additional logging about the shutdown.
+    </para>
+  </refsect1>
+
   <refsect1>
     <title>See Also</title>
     <para><simplelist type="inline">
index afdb21fc57b92b710f0c507876e3e7e2b12a5774..1a3087a1049880de597f22be510f6e545e65393b 100644 (file)
     <refsect2>
       <title><filename>/etc/initrd-release</filename></title>
 
-      <para>In the <ulink
-      url="https://docs.kernel.org/admin-guide/initrd.html">initrd</ulink>,
+      <para>In the <ulink url="https://docs.kernel.org/admin-guide/initrd.html">initrd</ulink>
+      and exitrd,
       <filename>/etc/initrd-release</filename> plays the same role as <filename>os-release</filename> in the
-      main system. Additionally, the presence of that file means that the system is in the initrd phase.
+      main system. Additionally, the presence of that file means that the system is in the initrd/exitrd phase.
       <filename>/etc/os-release</filename> should be symlinked to <filename>/etc/initrd-release</filename>
       (or vice versa), so programs that only look for <filename>/etc/os-release</filename> (as described
       above) work correctly.</para>