-# make sure mdadm isn't executed in initrd:
-if [ -f "$target"/etc/default/mdadm ] ; then
- sed -i "s/START_DAEMON=.*/START_DAEMON=false/" "$target"/etc/default/mdadm
- sed -i "s/INITRDSTART=.*/INITRDSTART=none/" "$target"/etc/default/mdadm
+if [ -z "$KERNELVERSION" ] ; then
+ echo "Error: No kernel found, can not create initramfs. Exiting.">&2
+ exit 1