¿Arranque seguro con imagen de kernel unificada en openSuSE?

¿Arranque seguro con imagen de kernel unificada en openSuSE?

Estoy intentando instalar OpenSuSE Tumbleweed en un sistema con una partición raíz cifrada. Al principio intenté configurarCOMIDA, pero se negó a reconocer una partición cifrada con LUKS.

Actualmente estoy intentando utilizar unimagen del kernel unificadaque firma tanto el kernel como el initrd con una clave de arranque seguro para evitar manipulaciones. Debian tienebota seguraPara ello, Arch haactualización.

Dracut, el initrd utilizado en SUSE, también parece teneresta funcionalidad incorporada. Desafortunadamente, el script de postinstalación de dracut (presente /usr/lib/module-init-tools/regenerate-initrd-posttransy reproducido a continuación) parece codificar la línea de comando de dracut. ¿Existe alguna otra forma de automatizar la generación de imágenes del kernel unificadas después de las actualizaciones de RPM?

#!/bin/sh
#
# Packages that install kernels or kernel-modules create a flag
#
#   /run/regenerate-initrd/<kernel image>
# 
# to have the initrd for <kernel image> generated, or
#
#   /run/regenerate-initrd/all
#
# to have all initrds generated. This script is called from posttrans
# and takes care of generating the initrds

: ${DRACUT:=/usr/bin/dracut}
if [ ! -x "$DRACUT" ]; then
    echo "${0##*/}: dracut is not installed, not rebuilding the initrd" >&2
    exit 0
fi

dir=/run/regenerate-initrd

if ! test -d "$dir"; then
    exit 0
fi
for f in "$dir"/*; do
    case $f in
        "$dir/*")
        [ -e "$f" ] || break;;
    esac
    # check if we are in a build chroot
    if ! [  -f /etc/fstab -a ! -e /.buildenv -a -x "$DRACUT" ] ; then
        echo "Please run \"$DRACUT -f --regenerate-all\" as soon as your system is complete." >&2
        rm "$dir"/*
        exit 0
    fi
    break
done

if test -e "$dir/all"; then
    rm "$dir"/*
    "$DRACUT" -f --regenerate-all
    exit
fi
err=0
for f in "$dir"/*; do
    case $f in
        "$dir/*")
        [ -e "$f" ] || break;;
    esac
    rm "$f"
    image=${f##*/}
    kver=${image#*-}
    if ! test -e "/boot/$image"; then
        echo "$0: /boot/$image does not exist, initrd won't be generated"
        continue
    fi
    if ! "$DRACUT" -f "/boot/initrd-$kver" "$kver"; then
        err=$?
    fi
done
exit $err


Respuesta1

Pareceagregando uefi="yes"a dracut.confhace que Dracut produzca imágenes unificadas en la partición EFI (en la ubicaciónesperado por systemd-boot), lo que debería resolver el problema [todavía no he tenido tiempo de comprobarlo]

información relacionada