X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=chroot-script;h=e499c9568fd3b84a65d367e0888553678411501d;hb=0b2edcac5ef44527debc5217a684852889ec4c66;hp=a033d8d6bcbf30e06910c26987f4e8010406c74d;hpb=4c49de9d47fef1e743d87bd7bd08fd4ac7d36f9c;p=grml-debootstrap.git diff --git a/chroot-script b/chroot-script index a033d8d..e499c95 100755 --- a/chroot-script +++ b/chroot-script @@ -479,11 +479,16 @@ createfstab(){ 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 @@ -596,7 +601,12 @@ initrd() { # 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 } # }}}