summaryrefslogtreecommitdiff
path: root/man/kernel-install.xml
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2021-03-16 16:47:34 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-12-17 14:57:56 +0100
commit641e2124de6047e6010cd2925ea22fba29b25309 (patch)
tree2d89885a320cbbb11e5c470bf8bfdc2cac8d0d62 /man/kernel-install.xml
parentba679b8d567e2e5b347865800da421a1bb87df75 (diff)
downloadsystemd-641e2124de6047e6010cd2925ea22fba29b25309.tar.gz
kernel-install: replace 00-entry-directory with K_I_LAYOUT in k-i
341890de866f2ee34919a47ce3fc6c8cd3c1924c made "bootctl install" create ESP\MID, in preparation of cf73f650890b56a59bfb713c4c82b4e29daa7316 that followed it and created 00-entry-directory.install to make ESP\MID\KVER if ESP\MID existed ‒ this meant that "bootctl install" followed by "kernel-install $(uname -r) /boot/vml*$(uname -r) /boot/ini*$(uname -r)" actually installed the kernel correctly. Later, 31e57550b552e113bd3d44355b237c41e42beb58 reverted the first commit, meaning, that now running those two commands first installs sd-boot, but then does nothing. Everything appears to work right, nothing errors out, but no changes are actually done. To the untrained eye (all of them), even running with -v appears to work: all the hooks are run, as is depmod, but, again, nothing happens. This is horrible. Nothing in either manpage suggests what to do (nor should it, really), but the user is left with a bootloader that appears fully funxional, since nothing suggests a failure in the output, but with an unbootable machine, /no way to boot it/, even if they drop to an EFI shell, since the boot bundle isn't present on the ESP, and no real recourse even if they boot into a recovery system, apart from installing like GRUB or whatever. 00- is purely instrumentation for 90-, and separating one from the other has led to downstream dissatisfaxion (indeed, the last mentioned commit cited cited exactly that as the reversion reason), while creating $ENTRY_DIR_ABS is only required for bootloaders using the BLS, and shouldn't itself toggle anything. To that end, introduce an /{e,l}/k/install.conf file that allows overriding the detected layout, and detect it as "bls" if $BOOT_ROOT/$MACHINE_ID ($ENTRY_DIR_ABS/..) exists, otherwise "other" ‒ if a user wishes to select a different bootloader, like GRUB, they (or, indeed, the postinst script) can specify layout=grub. This disables 90- and $ENTRY_DIR_ABS manipulation.
Diffstat (limited to 'man/kernel-install.xml')
-rw-r--r--man/kernel-install.xml62
1 files changed, 48 insertions, 14 deletions
diff --git a/man/kernel-install.xml b/man/kernel-install.xml
index c6414b13dd..83255bb932 100644
--- a/man/kernel-install.xml
+++ b/man/kernel-install.xml
@@ -71,23 +71,21 @@
<programlisting>add <replaceable>KERNEL-VERSION</replaceable> <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename> <replaceable>KERNEL-IMAGE</replaceable> [<replaceable>INITRD-FILE</replaceable> ...]</programlisting>
</para>
- <para>Three default plugins execute the following operations in this case:</para>
+ <para>Two default plugins execute the following operations in this case:</para>
<itemizedlist>
- <listitem><para><filename>00-entry-directory.install</filename> creates the directory
- <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
- if <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/</filename> already exists.
- </para></listitem>
+ <listitem><para><command>kernel-install</command> creates
+ <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable></filename>,
+ if enabled (see <varname>$KERNEL_INSTALL_LAYOUT=</varname>).</para></listitem>
<listitem><para><filename>50-depmod.install</filename> runs
<citerefentry project='man-pages'><refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum></citerefentry> for the
<replaceable>KERNEL-VERSION</replaceable>.</para></listitem>
- <listitem><para><filename>90-loaderentry.install</filename> copies <replaceable>KERNEL-IMAGE</replaceable>
- to
+ <listitem><para><filename>90-loaderentry.install</filename>
+ copies <replaceable>KERNEL-IMAGE</replaceable> to
<filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/linux</filename>.
- If an <replaceable>INITRD-FILE</replaceable> is provided, it also copies <replaceable>INITRD-FILE</replaceable>
- to
+ If <replaceable>INITRD-FILE</replaceable>s are provided, it also copies them to
<filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL_VERSION</replaceable>/<replaceable>INITRD-FILE</replaceable></filename>.
It also creates a boot loader entry according to the <ulink
url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink> in
@@ -96,9 +94,7 @@
<filename>/etc/os-release</filename> or <filename>/usr/lib/os-release</filename> (if the former is
missing), or "Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
- <para>If the entry directory
- <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
- does not exist, this plugin does nothing.</para></listitem>
+ <para>If <varname>$KERNEL_INSTALL_LAYOUT=</varname> is not "bls", this plugin does nothing.</para></listitem>
</itemizedlist>
</listitem>
</varlistentry>
@@ -119,13 +115,15 @@
<para>Two default plugins execute the following operations in this case:</para>
<itemizedlist>
-
<listitem><para><filename>50-depmod.install</filename> removes the files generated by <command>depmod</command> for this kernel again.</para></listitem>
<listitem><para><filename>90-loaderentry.install</filename> removes the file
<filename>$BOOT/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.</para></listitem>
- </itemizedlist>
+ <listitem><para><command>kernel-install</command> removes
+ <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable></filename>,
+ if enabled (see <varname>$KERNEL_INSTALL_LAYOUT=</varname>).</para></listitem>
+ </itemizedlist>
</listitem>
</varlistentry>
@@ -172,6 +170,30 @@
either 32 hexadecimal characters or the special value <literal>Default</literal>.</para>
<para><varname>KERNEL_INSTALL_BOOT_ROOT=</varname> is set for the plugins to the root directory (mount point, usually) of the hierarchy
where boot-loader entries, kernel images, and associated resources should be placed. Can be overridden by setting <varname>BOOT_ROOT=</varname>.</para>
+
+ <para><varname>KERNEL_INSTALL_LAYOUT=bls|other|...</varname> specifies the installation layout.
+ Defaults to <option>bls</option> if <filename>$BOOT/<replaceable>MACHINE-ID</replaceable></filename> exists, or <option>other</option> otherwise.
+ Additional layout names may be defined by convention. If a plugin uses a special layout,
+ it's encouraged to declare its own layout name and configure <varname>layout=</varname> in <filename>install.conf</filename> upon initial installation.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term>bls</term>
+ <listitem>
+ <para>Standard <ulink url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink> layout,
+ compatible with <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>: entries in
+ <filename>$BOOT/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>[+<replaceable>TRIES</replaceable>].conf</filename>,
+ kernel and initrds under <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename></para>
+ <para>Provided by <filename>90-loaderentry.install</filename>.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>other</term>
+ <listitem>
+ <para>Some other layout not understood natively by <command>kernel-install</command>.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</refsect1>
<refsect1>
@@ -251,6 +273,18 @@
Otherwise, <literal>Linux <replaceable>KERNEL-VERSION</replaceable></literal> will be used.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <filename>/usr/lib/kernel/install.conf</filename>
+ <filename>/etc/kernel/install.conf</filename>
+ </term>
+ <listitem>
+ <para>Configuration options for <command>kernel-install</command>,
+ as a series of <varname>KEY=</varname><replaceable>VALUE</replaceable> assignments,
+ compatible with shell syntax.
+ See the Environment variables section for supported keys.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>