site  contact  subhomenews

Rollback to pristine first-bootup fixed

January 04, 2023 — BarryK

Have just released version 4.5.4 and already discovered a bug!

This bug was introduced with version 4.5, when running in RAM, requiring "save" of session. If you go to the "Shutdown" menu and choose to rollback to a pristine first-bootup, the session is not saved. Unfortunately, there is a file /.rollback.flg that is also not saved, and this file is required by the 'init' script in the initrd, to detect that a rollback is required.

There is a little hack you can do. Open /usr/bin/wmreboot in a text editor, and comment-out these lines:

 #20220526 if top-level zram1, ask if save...
if [ "$EOS_TOP_LEVEL_ZRAM" == "1" ];then
#if [ "${1}" != "nosave" ];then #20221124
if [ "$(cat /var/local/zram1-ask-save-shutdown 2>/dev/null)" != "false" ];then #20220527
killall ROX-Filer #20221110 clear most of desktop.
ask-save-zram1 shutdown #in /usr/sbin 20220527
fi
#fi
fi

...then after having chosen rollback to pristine first-bootup in the "Shutdown" menu, it will ask if save session and you reply in the affirmative.

Or, here is another way to do it. Just before choosing shutdown pristine first-bootup from the menu, go to /mnt/wkg/.session and create a file '.rollback.flg' with this in it:

,erase

This will be fixed in the next release of EasyOS, see commit:

https://github.com/bkauler/woofq/commit/17ad424fced005838150039f88334c4bf0b4cd43   

Tags: easy