From 9430366eafeb05349929b6ce1d130b62cd1eafad Mon Sep 17 00:00:00 2001 From: ljm42 Date: Wed, 24 Jul 2024 10:51:10 -0700 Subject: [PATCH] Detect bad root value in syslinux.cfg --- etc/rc.d/rc.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/rc.d/rc.S b/etc/rc.d/rc.S index f5d10dc8f..1264e4950 100755 --- a/etc/rc.d/rc.S +++ b/etc/rc.d/rc.S @@ -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