Bug#826045: systemd: New kernels are not booted
Andre Heider
a.heider at gmail.com
Tue Feb 28 11:15:14 GMT 2017
Just as a reference, maybe it's of some use to others:
I'm using the attached scripts as:
/etc/kernel/postinst.d/zz-systemd-bootd
/etc/kernel/postrm.d/zz-systemd-bootd
They're very basic, but worked for me just fine for the kernel updates
of the past +2 month.
That's the kind of distribution<->systemd-bootd integration I was
looking for,
Regards,
Andre
-------------- next part --------------
#!/bin/sh -e
version="$1"
kernel=/boot/vmlinuz-"${version}"
[ -x /usr/bin/kernel-install ] || exit 0
# passing the kernel version is required
if [ -z "${version}" ]; then
echo >&2 "W: systemd-bootd: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} did not pass a version number"
exit 2
fi
# absolute file name of kernel image may be passed as a second argument
if [ -n "$2" ]; then
kernel="$2"
fi
# avoid running multiple times
if [ -n "$DEB_MAINT_PARAMS" ]; then
eval set -- "$DEB_MAINT_PARAMS"
if [ -z "$1" ] || [ "$1" != "configure" ]; then
exit 0
fi
fi
echo >&2 "I: systemd-bootd: installing kernel ${kernel}"
kernel-install add "${version}" "${kernel}"
-------------- next part --------------
#!/bin/sh -e
version="$1"
[ -x /usr/bin/kernel-install ] || exit 0
# passing the kernel version is required
if [ -z "${version}" ]; then
echo >&2 "W: systemd-bootd: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} did not pass a version number"
exit 0
fi
# avoid running multiple times
if [ -n "$DEB_MAINT_PARAMS" ]; then
eval set -- "$DEB_MAINT_PARAMS"
if [ -z "$1" ] || [ "$1" != "remove" ]; then
exit 0
fi
fi
echo >&2 "I: systemd-bootd: removing kernel ${version}"
kernel-install remove "${version}"
More information about the Pkg-systemd-maintainers
mailing list