Page 1 of 1

Hard reboot over SSH?

Posted: Thu Mar 25, 2021 7:30 pm
by chanunnaki
Is it possible?

I pulled my hair out for 20 minutes changing ini setting through ssh and rebooting from there, not realising that the reboot command performs a soft reboot and therefore none of the settings were taking.

Re: Hard reboot over SSH?

Posted: Thu Mar 25, 2021 7:33 pm
by Bas
What does 'shutdown -r now' do? That's generally enough of a reboot to bring any regular Linux box back in line.

Re: Hard reboot over SSH?

Posted: Thu Mar 25, 2021 7:46 pm
by chanunnaki
Bas wrote: Thu Mar 25, 2021 7:33 pm What does 'shutdown -r now' do? That's generally enough of a reboot to bring any regular Linux box back in line.
nothing. :P
Screenshot 2021-03-25 at 19.46.07.png
Screenshot 2021-03-25 at 19.46.07.png (59.42 KiB) Viewed 3686 times

Re: Hard reboot over SSH?

Posted: Thu Mar 25, 2021 7:51 pm
by aberu
Correct, I believe a hard reboot has to be initiated through the menu core.

Try:

Code: Select all

reboot now
That's what the updater script uses:

Code: Select all

if [[ "${REBOOT_NEEDED}" == "true" ]] ; then
	if [[ "${AUTOREBOOT}" == "true" && "${REBOOT_PAUSE}" -ge 0 ]] ; then
		echo "Rebooting in ${REBOOT_PAUSE} seconds"
		sleep "${REBOOT_PAUSE}"
		reboot now
		else
		echo "You should reboot"
    fi
fi
But yes, a full hard reboot will likely require direct input.

Re: Hard reboot over SSH?

Posted: Thu Mar 25, 2021 8:22 pm
by chanunnaki
aberu wrote: Thu Mar 25, 2021 7:51 pm Correct, I believe a hard reboot has to be initiated through the menu core.

Try:

Code: Select all

reboot now
That's what the updater script uses:

Code: Select all

if [[ "${REBOOT_NEEDED}" == "true" ]] ; then
	if [[ "${AUTOREBOOT}" == "true" && "${REBOOT_PAUSE}" -ge 0 ]] ; then
		echo "Rebooting in ${REBOOT_PAUSE} seconds"
		sleep "${REBOOT_PAUSE}"
		reboot now
		else
		echo "You should reboot"
    fi
fi
But yes, a full hard reboot will likely require direct input.
Thanks for this! It's not performing a full reboot, but it's enough for it to take new ini settings. So good enough :D

Re: Hard reboot over SSH?

Posted: Thu Mar 25, 2021 8:46 pm
by aberu
No prob

Re: Hard reboot over SSH?

Posted: Thu Mar 25, 2021 9:59 pm
by Sorgelig
it doesn't even need any reset.
reload the core (or restart MiSTer binary) is enough to apply new ini settings.
Or you can choose the same ini config from OSD menu and it will also reload the core with new ini.

Re: Hard reboot over SSH?

Posted: Fri Mar 26, 2021 12:49 am
by darksakul
I always though a hard reboot is physically turning off all power then turning back on again and booting up again.

if it's done by a code or script it's a soft reboot.