[7.470][BUG][NOTABUG] Factory reset fails from command line

If I run factory reset from command line as a last resort when only console access is available, I am presented with two options. 
1. Start
2. Reset
If i run /etc/init.d/factoryreset start, I get the error message in screenshot. The reset command works as expected and the machine is reset to factory defaults
Parents Reply Children
  • Factory reset via CLI is accomplished by entering 'init 4' at a root shell. Yes, it is a special runlevel.

    If you want to reboot in the end instead of halting the system (very useful if you have a cluster or no physical access to the machine), you may edit file '/etc/init.d/rc4.d/S10freset' and change the last line from '/etc/init.d/halt' to '/etc/init.d/reboot'.

    After factory reset, you will have initial settings that you entered during installation (Soft-ASG) or out-of-the-box values (Appliance).

    Please note that factory reset does only kill the configuration and some files like certificates etc but does NOT restore the initial software version! So if something got damaged because you played the 'I am root' game and lost, a factory reset may not necessarily help. You have to do a fresh install in this case.
  • Thank you for the explanation. I was just pointing to the error if you run /etc/init.d/factoryreset start. I know I probably could have changed the init script but if the start option is available by default, why is it not working? Otherwise /etc/init.d/factoryreset reset works fine.
    Regards
  • The script is just not supposed to be run in another runlevel [:D]
  • I guess I should have looked at the script in the first place. I see it calling init 4 at the end[:P]

    If you want to reboot in the end instead of halting the system (very useful if you have a cluster or no physical access to the machine), you may edit file '/etc/init.d/rc4.d/S10freset' and change the last line from '/etc/init.d/halt' to '/etc/init.d/reboot'.

    Thanks for this, I always hate when the computer just sits there and beeps instead of rebooting.