#!/bin/sh set -u set -e FILE=$(ls -1 "$target"/boot/vmlinuz-* | sort -r | head -1) KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}") chroot $target update-initramfs -c -t -k $KERNELVERSION