/proc/mounts has no correct entry for / on such systems.
Use mount instead.
boot_mesg "Re-sizing root partition..."
# Find root device
- while read -r dev mountpoint fs options; do
+ mount | while read -r dev tmp1 mountpoint tmp2; do
# Skip generic entries
[ "${dev}" = "rootfs" ] && continue
rm -f /.resizefs
break
fi
- done < /proc/mounts
+ done
fi
;;
mount -o remount,rw / > /dev/null
evaluate_retval
+ boot_mesg "Create /etc/mtab..."
+ > /etc/mtab
+ mount -f / || failed=1
+ (exit ${failed})
+ evaluate_retval
+
# Detect device
- while read -r dev mountpoint fs options; do
+ mount | while read -r dev tmp1 mountpoint tmp2; do
[ "${dev}" = "rootfs" ] && continue
if [ "${mountpoint}" = "/" ]; then
sleep 15
reboot -f
fi
- done < /proc/mounts
+ done
fi
;;
*)