EOF
if [ -n "$TARGET_UUID" ] ; then
- local rootfs_mount_options=",errors=remount-ro"
+ local rootfs_mount_options=""
+
+ if [ -z "${FILESYSTEM}" ] ; then
+ FILESYSTEM="$(blkid -o value -s TYPE /dev/disk/by-uuid/"${TARGET_UUID}")"
+ fi
+
case "${FILESYSTEM}" in
- f2fs)
- # errors=remount-ro is unsupported, see https://github.com/grml/grml-debootstrap/issues/163
- rootfs_mount_options=""
+ # errors=remount-ro is supported only by a few file systems
+ ext*|exfat|fat|jfs|nilfs2|vfat)
+ rootfs_mount_options=",errors=remount-ro"
;;
esac
# generate initrd
if [ -n "$INITRD" ] ; then
echo "Generating initrd."
- update-initramfs -c -t -k "$KERNELVER"
+ if [ "$INITRD_GENERATOR" = 'dracut' ] ; then
+ DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL dracut
+ dracut --no-hostonly --kver "$KERNELVER" --fstab --add-fstab /etc/fstab --force --reproducible $INITRD_GENERATOR_OPTS
+ else
+ update-initramfs -c -t -k "$KERNELVER" $INITRD_GENERATOR_OPTS
+ fi
fi
}
# }}}