Skip to content
Snippets Groups Projects
Commit 0b7b2a3a authored by Denis Pynkin's avatar Denis Pynkin
Browse files

kernel-install: allow to create $BOOT/$MACHINE_ID

Commit [cf73f650890](https://github.com/systemd/systemd/commit/cf73f650890

)
provides script `00-entry-directory.install` which creates the entry
directory only if `$BOOT/$MACHINE_ID` folder exists.
This part was moved out of `kernel-install` script and may introduce
the problem during upgrade since before Apertis v2022dev2 we do kernel
install with `$MACHINE_ID` generated in a build time. Later we remove
`/etc/machine-id` file allowing to generate an unique machine ID during
first boot, so there will be no directory `$BOOT/$MACHINE_ID` with a new
ID preventing from new entry generation during kernel upgrade in runtime.
Hence remove the part checking the `$BOOT/$MACHINE_ID` existence and
allow to create the proper entry in any case, returning the previous
`kernel-install` behaviour.

Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>
parent 3740a22f
No related branches found
No related tags found
No related merge requests found
From f462882b9f851adb9bd0a420f2b3e5912bbfb712 Mon Sep 17 00:00:00 2001
From: Denis Pynkin <denis.pynkin@collabora.com>
Date: Sun, 2 May 2021 21:47:16 +0300
Subject: kernel-install: allow to create $BOOT/$MACHINE_ID
Commit cf73f650890 provides script `00-entry-directory.install` which
creates the entry directory only if `$BOOT/$MACHINE_ID` folder exists.
This part was moved out of `kernel-install` script and may introduce
the problem during upgrade since before Apertis v2022dev2 we do kernel
install with `$MACHINE_ID` generated in a build time. Later we remove
`/etc/machine-id` file allowing to generate an unique machine ID during
first boot, so there will be no directory `$BOOT/$MACHINE_ID` with a new
ID preventing from new entry generation during kernel upgrade in runtime.
Hence remove the part checking the `$BOOT/$MACHINE_ID` existence and
allow to create the proper entry in any case, returning the previous
`kernel-install` behaviour.
Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
---
src/kernel-install/00-entry-directory.install | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/kernel-install/00-entry-directory.install b/src/kernel-install/00-entry-directory.install
index e2fc396..f753794 100644
--- a/src/kernel-install/00-entry-directory.install
+++ b/src/kernel-install/00-entry-directory.install
@@ -16,14 +16,6 @@ if [ "$COMMAND" != "add" ]; then
exit 0
fi
-# If the boot dir exists (e.g. $ESP/<machine-id>),
-# create the entry directory ($ESP/<machine-id>/<kernel-version>).
-# This is the only function of this plugin.
-MACHINE_ID_DIR="${ENTRY_DIR_ABS%/*}"
-if ! [ -d "$MACHINE_ID_DIR" ]; then
- exit 0
-fi
-
if [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ]; then
echo "+mkdir -v -p $ENTRY_DIR_ABS"
exec mkdir -v -p "$ENTRY_DIR_ABS"
--
2.29.3
......@@ -26,3 +26,4 @@ apertis/Remove-bashisms-from-the-depmod-wrapper.patch
apertis/Remove-bashisms-from-the-UEFI-entries-generator.patch
apertis/Reworked-kernel-install-script.patch
apertis/Remove-bashisms-from-the-entry-directory-plugin.patch
apertis/kernel-install-allow-to-create-BOOT-MACHINE_ID.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment