Merge pull request #1804 from unraid/detect-bad-root-in-syslinux

Detect bad root value in syslinux.cfg
This commit is contained in:
tom mortensen
2024-07-27 01:10:26 -07:00
committed by GitHub

View File

@@ -77,6 +77,9 @@ done
# this serves to synchronize this script with USB subsystem
abort() {
read -p "$1 - press ENTER key to reboot..."
if /bin/mountpoint -q /boot; then
/bin/umount -v /boot
fi
/bin/echo
/sbin/reboot
}
@@ -161,6 +164,7 @@ else
/sbin/mount -w -v -n -o remount /
RETVAL=$?
[[ $RETVAL -gt 0 ]] && abort "failed to remount $UNRAIDROOT r/w with return value $RETVAL"
[[ ! -f /etc/rc.d/rc.S.cont ]] && abort "unable to boot - you must remove 'root=$UNRAIDROOT' from syslinux.cfg"
fi
# set permissions for non vfat boot on /boot