update-initramfs -k all ... otherwise just comes back without
taking any actions, so we have to build the initramfs explicitely
on our own at least once. (Why this is necessary at all needs
to be investigated seperately, but for now we definitely have
to solve this issue).
echo "$GRML_NAME $VERSION Release Codename $RELEASENAME [$DATE]" > $CHROOT_OUTPUT/etc/grml_version
chmod 644 $CHROOT_OUTPUT/etc/grml_version
einfo "Rebuilding initramfs"
- # make sure new /etc/grml_version reaches the initramfs:
+ # make sure new /etc/grml_version reaches initramfs, iterate over all
+ # present kernel versions (note: we can't really handle more than one
+ # kernel version anyway right now)
# chroot $CHROOT_OUTPUT update-initramfs -u -t => might break when using kernel-package :(
- chroot $CHROOT_OUTPUT update-initramfs -u -k all
+ for initrd in "$(basename $CHROOT_OUTPUT/boot/vmlinuz-*)" ; do
+ chroot $CHROOT_OUTPUT update-initramfs -k "${initrd##vmlinuz-}" -c
+ done
eend $?
fi