]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: use the term "initrd" at most places we so far used "initramfs"
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Sep 2022 12:59:02 +0000 (14:59 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 23 Sep 2022 13:10:53 +0000 (15:10 +0200)
In most cases we refernced the concept as "initrd". Let's convert most
remaining uses of "initramfs" to "initrd" too, to stay internally
consistent.

This leaves "initramfs" only where it's relevant to explain historical
concepts or where "initramfs" is part of the API (i.e. in
/run/initramfs).

Follow-up for: b66a6e1a5838b874b789820c090dd6850cf10513

18 files changed:
man/bootup.xml
man/crypttab.xml
man/localectl.xml
man/systemd-fsck@.service.xml
man/systemd-networkd.service.xml
man/systemd.mount.xml
man/systemd.special.xml
man/udev.xml
man/veritytab.xml
src/core/device.c
src/core/main.c
src/hibernate-resume/hibernate-resume-generator.c
src/hostname/hostnamed.c
src/libsystemd/sd-device/device-private.c
src/nspawn/nspawn-mount.c
src/test/test-exec-util.c
test/README.testsuite
test/test-functions

index 62a34fe3d726b086f1c8253439db967189e920fb..16bb9c0b3f8ffe7bf1a8eb5e9b4c0441fa7e93e9 100644 (file)
@@ -31,9 +31,9 @@
     boot loader will then invoke an OS kernel from disk (or the network). On systems using EFI or other types
     of firmware, this firmware may also load the kernel directly.</para>
 
-    <para>The kernel (optionally) mounts an in-memory file system, often generated by
-    <citerefentry project='man-pages'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-    which looks for the root file system. Nowadays this is implemented as an "initramfs" — a compressed CPIO
+    <para>The kernel (optionally) mounts an in-memory file system, often generated by <citerefentry
+    project='man-pages'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>, which
+    looks for the root file system. Nowadays this is implemented as an "initramfs" — a compressed CPIO
     archive that the kernel extracts into a tmpfs. In the past normal file systems using an in-memory block
     device (ramdisk) were used, and the name "initrd" is still used to describe both concepts. It's the boot
     loader or the firmware that loads both the kernel and initrd/initramfs images into memory, but the kernel
index 2a54c81595b1debc91168230bc2e103b8620da56..363691a007b1593791a371034ddf518d4ea338ff 100644 (file)
       <varlistentry>
         <term><option>x-initrd.attach</option></term>
 
-        <listitem><para>Setup this encrypted block device in the initramfs, similarly to
+        <listitem><para>Setup this encrypted block device in the initrd, similarly to
         <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
         units marked with <option>x-initrd.mount</option>.</para>
 
         use. With this option the device will still be detached but later after the root file
         system is unmounted.</para>
 
-        <para>All other encrypted block devices that contain file systems mounted in the initramfs
-        should use this option.</para>
+        <para>All other encrypted block devices that contain file systems mounted in the initrd should use
+        this option.</para>
         </listitem>
       </varlistentry>
 
index a4bda2c4ba640e1c74b713666abdf3c54bf64579..617922ebd5850f35c96eff9a4d1499e40a73475e 100644 (file)
     such as the display manager, as well as the default for users
     after login.</para>
 
-    <para>Note that the changes performed using this tool might require
-    the initramfs to be rebuilt to take effect during early system boot.
-    The initramfs is not rebuilt automatically by <filename>localectl</filename>,
-    this task has to be performed manually, usually using a tool like
-    <citerefentry project='man-pages'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+    <para>Note that the changes performed using this tool might require the initrd to be rebuilt to take
+    effect during early system boot.  The initrd is not rebuilt automatically by
+    <filename>localectl</filename>, this task has to be performed manually, usually using a tool like
+    <citerefentry
+    project='man-pages'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
     </para>
 
     <para>Note that
index aa0d8b12aed1a11b0d6d8985507ca0835fde9d0c..a9aa0ffd0a28927f98b810d8faa863aee3c455fb 100644 (file)
   <refsect1>
     <title>Description</title>
 
-    <para><filename>systemd-fsck@.service</filename> and
-    <filename>systemd-fsck-root.service</filename> are services
-    responsible for file system checks. They are instantiated for each
-    device that is configured for file system checking.
-    <filename>systemd-fsck-root.service</filename> is responsible for
-    file system checks on the root file system, but only if the
-    root filesystem was not checked in the initramfs.
-    <filename>systemd-fsck@.service</filename> is used for all other
-    file systems and for the root file system in the initramfs.</para>
+    <para><filename>systemd-fsck@.service</filename> and <filename>systemd-fsck-root.service</filename> are
+    services responsible for file system checks. They are instantiated for each device that is configured for
+    file system checking.  <filename>systemd-fsck-root.service</filename> is responsible for file system
+    checks on the root file system, but only if the root filesystem was not checked in the initrd.
+    <filename>systemd-fsck@.service</filename> is used for all other file systems and for the root file
+    system in the initrd.</para>
 
     <para>These services are started at boot if
     <option>passno</option> in <filename>/etc/fstab</filename> for the
index df6e180ffcde40af0e4b52de49d48e91045b976f..12cd4c331bd0f87085d69d924070445687a544c1 100644 (file)
     <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
     </para>
 
-    <para>When <filename>systemd-networkd</filename> exits, it generally leaves
-    existing network devices and configuration intact. This makes it possible to
-    transition from the initramfs and to restart the service without breaking
-    connectivity. This also means that when configuration is updated and
-    <filename>systemd-networkd</filename> is restarted, netdev interfaces for
-    which configuration was removed will not be dropped, and may need to be
-    cleaned up manually.</para>
+    <para>When <filename>systemd-networkd</filename> exits, it generally leaves existing network devices and
+    configuration intact. This makes it possible to transition from the initrd and to restart the service
+    without breaking connectivity. This also means that when configuration is updated and
+    <filename>systemd-networkd</filename> is restarted, netdev interfaces for which configuration was removed
+    will not be dropped, and may need to be cleaned up manually.</para>
 
     <para><command>systemd-networkd</command> may be introspected and controlled at runtime using
     <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
index e4e35f2dd86465b29b9b0b9b47f80d257167be4d..773ca04cd6db16a781d41973bacd82c7dee47211 100644 (file)
       <varlistentry>
         <term><option>x-initrd.mount</option></term>
 
-        <listitem><para>An additional filesystem to be mounted in the
-        initramfs. See <filename>initrd-fs.target</filename>
-        description in
+        <listitem><para>An additional filesystem to be mounted in the initrd. See
+        <filename>initrd-fs.target</filename> description in
         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
         </para></listitem>
       </varlistentry>
index 1e3e6d8c3e3a624904e542bb387ba78a90a23e52..85eb8ad0762ab3dcc03eb7894b60b07bee58f59b 100644 (file)
         <varlistentry>
           <term><filename>initrd.target</filename></term>
           <listitem>
-            <para>This is the default target in the initramfs, similar to <filename>default.target</filename>
-            in the main system. It is used to mount the real root and transition to it. See
+            <para>This is the default target in the initrd, similar to <filename>default.target</filename> in
+            the main system. It is used to mount the real root and transition to it. See
             <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
             more discussion.</para>
           </listitem>
index 886455f61f745e531acb003ee0dd8265883e3b40..142f295f3e8f8324d531c2e791884e1878f6f6bf 100644 (file)
                 <varlistentry>
                   <term><option>db_persist</option></term>
                   <listitem>
-                    <para>Set the flag (sticky bit) on the udev database entry
-                    of the event device. Device properties are then kept in the
-                    database even when
-                    <command>udevadm info --cleanup-db</command> is called.
-                    This option can be useful in certain cases
-                    (e.g. Device Mapper devices) for persisting device state
-                    on the transition from initramfs.</para>
+                    <para>Set the flag (sticky bit) on the udev database entry of the event device. Device
+                    properties are then kept in the database even when <command>udevadm info
+                    --cleanup-db</command> is called.  This option can be useful in certain cases
+                    (e.g. Device Mapper devices) for persisting device state on the transition from
+                    initrd.</para>
                   </listitem>
                 </varlistentry>
                 <varlistentry>
index 714615918272f6f579c137c51d4c74683a7aaed4..dc2f11c31e26e7f85d66930b4f987fdd13124eb4 100644 (file)
@@ -149,7 +149,7 @@ This is based on crypttab(5).
       <varlistentry>
         <term><option>x-initrd.attach</option></term>
 
-        <listitem><para>Setup this verity protected block device in the initramfs, similarly to
+        <listitem><para>Setup this verity protected block device in the initrd, similarly to
         <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
         units marked with <option>x-initrd.mount</option>.</para>
 
@@ -160,8 +160,8 @@ This is based on crypttab(5).
         use. With this option the device will still be detached but later after the root file
         system is unmounted.</para>
 
-        <para>All other verity protected block devices that contain file systems mounted in the
-        initramfs should use this option.</para>
+        <para>All other verity protected block devices that contain file systems mounted in the initrd should
+        use this option.</para>
         </listitem>
       </varlistentry>
 
index b3cf77d50c601216748e74f27e11d0d8593783b5..a4fa8705410e24774239b6487e1f9ebd9db6e34f 100644 (file)
@@ -281,13 +281,14 @@ static int device_coldplug(Unit *u) {
          *   other units, or (b) generated when uevents are received.
          *
          * - On switch-root, the udev database may be cleared, except for devices with sticky bit, i.e.
-         *   OPTIONS="db_persist". Hence, almost no devices are enumerated in the step 2. However, in general,
-         *   we have several serialized devices. So, DEVICE_FOUND_UDEV bit in the deserialized_found must be
-         *   ignored, as udev rules in initramfs and the main system are often different. If the deserialized
-         *   state is DEVICE_PLUGGED, we need to downgrade it to DEVICE_TENTATIVE. Unlike the other starting
-         *   mode, MANAGER_IS_SWITCHING_ROOT() is true when device_coldplug() and device_catchup() are called.
-         *   Hence, let's conditionalize the operations by using the flag. After switch-root, systemd-udevd
-         *   will (re-)process all devices, and the Device.found and Device.state will be adjusted.
+         *   OPTIONS="db_persist". Hence, almost no devices are enumerated in the step 2. However, in
+         *   general, we have several serialized devices. So, DEVICE_FOUND_UDEV bit in the deserialized_found
+         *   must be ignored, as udev rules in initrd and the main system are often different. If the
+         *   deserialized state is DEVICE_PLUGGED, we need to downgrade it to DEVICE_TENTATIVE. Unlike the
+         *   other starting mode, MANAGER_IS_SWITCHING_ROOT() is true when device_coldplug() and
+         *   device_catchup() are called.  Hence, let's conditionalize the operations by using the
+         *   flag. After switch-root, systemd-udevd will (re-)process all devices, and the Device.found and
+         *   Device.state will be adjusted.
          *
          * - On reload or reexecute, we can trust enumerated_found, deserialized_found, and deserialized_state.
          *   Of course, deserialized parameters may be outdated, but the unit state can be adjusted later by
index 9ad208fdfca83e2e7cd1158b5a84e03ce4f87df6..9828d1f6d45343f90c4df0b10b6f4f5142214130 100644 (file)
@@ -1660,7 +1660,7 @@ static void initialize_coredump(bool skip_setup) {
 
         /* But at the same time, turn off the core_pattern logic by default, so that no coredumps are stored
          * until the systemd-coredump tool is enabled via sysctl. However it can be changed via the kernel
-         * command line later so core dumps can still be generated during early startup and in initramfs. */
+         * command line later so core dumps can still be generated during early startup and in initrd. */
         if (!skip_setup)
                 disable_coredumps();
 #endif
index f591407f782378114181fe7f913d42c1f2692366..82c2a564932b917f32a8b1c8af3b9102ece4dd0b 100644 (file)
@@ -114,7 +114,7 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
 
         arg_dest = ASSERT_PTR(dest);
 
-        /* Don't even consider resuming outside of initramfs. */
+        /* Don't even consider resuming outside of initrd. */
         if (!in_initrd()) {
                 log_debug("Not running in an initrd, quitting.");
                 return 0;
index d59c783dbc49c35427627c45b6aa8b69475c9d7e..486b093062fcc94aa551071522e2201075a49ab1 100644 (file)
@@ -706,8 +706,8 @@ static void context_determine_hostname_source(Context *c) {
 
                 /* If the hostname was not set by us, try to figure out where it came from. If we set it to
                  * the default hostname, the file will tell us. We compare the string because it is possible
-                 * that the hostname was set by an older version that had a different fallback, in the
-                 * initramfs or before we reexecuted. */
+                 * that the hostname was set by an older version that had a different fallback, in the initrd
+                 * or before we reexecuted. */
 
                 r = read_one_line_file("/run/systemd/default-hostname", &fallback);
                 if (r < 0 && r != -ENOENT)
index 9e120f734efd71c329409faf99cbc28a98a09490..f6041c716572d089a52eb90a81c099b7eb5e4028 100644 (file)
@@ -897,10 +897,8 @@ int device_update_db(sd_device *device) {
         if (r < 0)
                 return r;
 
-        /*
-         * set 'sticky' bit to indicate that we should not clean the
-         * database when we transition from initramfs to the real root
-         */
+        /* set 'sticky' bit to indicate that we should not clean the database when we transition from initrd
+         * to the real root */
         if (fchmod(fileno(f), device->db_persist ? 01644 : 0644) < 0) {
                 r = -errno;
                 goto fail;
index d919533f4a33d4a02518bda234613e88264d734d..a54f1464bac04bb48586c714d400480759ea0085 100644 (file)
@@ -1270,10 +1270,9 @@ int setup_pivot_root(const char *directory, const char *pivot_root_new, const ch
          * This requires a temporary directory, pivot_tmp, which is
          * not a child of either.
          *
-         * This is typically used for OSTree-style containers, where
-         * the root partition contains several sysroots which could be
-         * run. Normally, one would be chosen by the bootloader and
-         * pivoted to / by initramfs.
+         * This is typically used for OSTree-style containers, where the root partition contains several
+         * sysroots which could be run. Normally, one would be chosen by the bootloader and pivoted to / by
+         * initrd.
          *
          * For example, for an OSTree deployment, pivot_root_new
          * would be: /ostree/deploy/$os/deploy/$checksum. Note that this
index e8b04e879f5937b84f8943cfbcd9640b2be8c787..bae06a81ad93f0290fc316c5b9687570b0a25454 100644 (file)
@@ -330,11 +330,9 @@ TEST(environment_gathering) {
         assert_se(chmod(name2, 0755) == 0);
         assert_se(chmod(name3, 0755) == 0);
 
-        /* When booting in containers or without initramfs there might not be
-         * any PATH in the environment and if there is no PATH /bin/sh built-in
-         * PATH may leak and override systemd's DEFAULT_PATH which is not
-         * good. Force our own PATH in environment, to prevent expansion of sh
-         * built-in $PATH */
+        /* When booting in containers or without initrd there might not be any PATH in the environment and if
+         * there is no PATH /bin/sh built-in PATH may leak and override systemd's DEFAULT_PATH which is not
+         * good. Force our own PATH in environment, to prevent expansion of sh built-in $PATH */
         old = getenv("PATH");
         r = setenv("PATH", "no-sh-built-in-path", 1);
         assert_se(r >= 0);
index 7e3d6c0623737f17aa8ab403afb89232f47a1e4f..fb77ad286e5f358955ce6f1193f192e2a59e43f1 100644 (file)
@@ -98,8 +98,8 @@ INTERACTIVE_DEBUG=1
     (e.g. by setting a usable default terminal, suppressing the shutdown after
     the test, etc.)
 
-The kernel and initramfs can be specified with $KERNEL_BIN and $INITRD.
-(Fedora's or Debian's default kernel path and initramfs are used by default)
+The kernel and initrd can be specified with $KERNEL_BIN and $INITRD. (Fedora's
+or Debian's default kernel path and initrd are used by default)
 
 A script will try to find your qemu binary. If you want to specify a different
 one with $QEMU_BIN.
index fa3ad9fbdc600a91e2b063def4201b76deeb45a2..149b7e45b61baffcbd1631f1b8c88aee1982da27 100644 (file)
@@ -2707,7 +2707,7 @@ inst() {
 # inst_any -d /bin/foo /bin/bar /bin/baz
 #
 # Lets assume that /bin/baz exists, so it will be installed as /bin/foo in
-# initramfs.
+# initrd.
 inst_any() {
     local dest file