Skip to content

Installing kmp on transactional system leads to "/boot/initrd-KERNEL_VERSION: file not found" #119

@TobiPeterG

Description

@TobiPeterG

Hi there,

on my transactional system I get this message when I install a kmp:
/boot/initrd-6.14.6-4-yuga: file not found.

I guess this function is again the culprit, the issue occured before on TW, as this didn't support sdbootutil yet:

get_current_initrd() {
local krel=$1
local initrd="/boot/initrd-$krel"
if [ -n "$SDBOOTUTIL" ]; then
if [ -z "$TRANSACTIONAL_UPDATE" ] && [ -s '/etc/kernel/entry-token' ]; then
read -r _ initrd <<<"$(sdbootutil --entry-keys=initrd show-entry $krel)"
initrd="/boot/efi$initrd"
fi
fi
echo "$initrd"
}

Corresponding PR that fixed it for TW:
#113

I guess on transactional systems, we shouldn't get this far and it should be stopped before since the boot files should be generated after the complete transaction like here:

# If we are inside a transaction and using a separate /boot/efi
# partition (ESP) then we cannot touch it, as we will escape the
# atomicity promise. We need to delay the call to this script after
# the transaction has been completed. The component that will call
# again regenerate-initrd-posttrans to generate the new initrd is the
# sdbootutil snapper plugin (this time outside the live transaction),
# and the tukit plugin will migrate the signal from inside the
# transaction to outside.
if [ -n "$is_sdbootutil" ] && [ -n "$TRANSACTIONAL_UPDATE" ]; then
exit 0
fi

Can this issue be reproduced?
Should you need additional information, please let me know :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions