From: Michael Prokop Date: Tue, 19 Jan 2021 22:26:52 +0000 (+0100) Subject: F2FS filesystem doesn't support errors=remount-ro mount option X-Git-Tag: v0.95~2 X-Git-Url: http://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=1537613474d4b4483ea6321f211113a3e6522c04 F2FS filesystem doesn't support errors=remount-ro mount option Fixes: | [ 94.941005] F2FS-fs (sda1): Unrecognized mount option "errors=remount-ro" or missing value | mount: /: mount point not mounted or bad option Closes: grml/grml-debootstrap#163 --- diff --git a/chroot-script b/chroot-script index a5f92c4..a27dd58 100755 --- a/chroot-script +++ b/chroot-script @@ -481,7 +481,15 @@ createfstab(){ EOF if [ -n "$TARGET_UUID" ] ; then - echo "/dev/disk/by-uuid/${TARGET_UUID} / auto defaults,errors=remount-ro 0 1" >> /etc/fstab + local rootfs_mount_options=",errors=remount-ro" + case "${FILESYSTEM}" in + f2fs) + # errors=remount-ro is unsupported, see https://github.com/grml/grml-debootstrap/issues/163 + rootfs_mount_options="" + ;; + esac + + echo "/dev/disk/by-uuid/${TARGET_UUID} / auto defaults${rootfs_mount_options} 0 1" >> /etc/fstab else echo "Warning: couldn't identify target UUID for rootfs, your /etc/fstab might be incomplete." fi diff --git a/grml-debootstrap b/grml-debootstrap index e51f7bf..586edd8 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -394,7 +394,7 @@ while :; do shift; _opt_debopt="$1" ;; --filesystem) # Filesystem that should be used - shift; _opt_filesystem="$1" + shift; _opt_filesystem="$1" ; FILESYSTEM="${_opt_filesystem}" ;; --interactive) # Use interactive mode (frontend) _opt_interactive=T @@ -1671,6 +1671,7 @@ preparechroot() { [ -n "$EXTRAPACKAGES" ] && echo "EXTRAPACKAGES='$(sed "s,','\\\\'',g" <<<"${EXTRAPACKAGES}")'" >> "$CHROOT_VARIABLES" [ -n "$EFI" ] && echo "EFI='$(sed "s,','\\\\'',g" <<<"${EFI}")'" >> "$CHROOT_VARIABLES" [ -n "$FALLBACK_MIRROR" ] && echo "FALLBACK_MIRROR='$(sed "s,','\\\\'',g" <<<"${FALLBACK_MIRROR}")'" >> "$CHROOT_VARIABLES" + [ -n "$FILESYSTEM" ] && echo "FILESYSTEM='$(sed "s,','\\\\'',g" <<<"${FILESYSTEM}")'" >> "$CHROOT_VARIABLES" [ -n "$FORCE" ] && echo "FORCE='$(sed "s,','\\\\'',g" <<<"${FORCE}")'" >> "$CHROOT_VARIABLES" [ -n "$GRMLREPOS" ] && echo "GRMLREPOS='$(sed "s,','\\\\'',g" <<<"${GRMLREPOS}")'" >> "$CHROOT_VARIABLES" [ -n "$GRUB" ] && echo "GRUB='$(sed "s,','\\\\'',g" <<<"${GRUB}")'" >> "$CHROOT_VARIABLES"