Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate re-enabling of Toltec after system upgrades #109

Open
raisjn opened this issue Oct 6, 2020 · 10 comments
Open

Automate re-enabling of Toltec after system upgrades #109

raisjn opened this issue Oct 6, 2020 · 10 comments
Labels
install Installation scripts

Comments

@raisjn
Copy link
Contributor

raisjn commented Oct 6, 2020

when opkg/toltec is installed and there is a system upgrade, we need a way to re-enable opkg. the entware package comes with entware_reinstall which re-creates the opt mounting system service. i believe our bootstrap script (thanks linusCDE!) automatically re-enables the opkg as well. (is the bootstrap script saved locally for re-use after upgrade?)

currently, we do not have any hooks into the remarkable's upgrade process to automatically re-enable opkg.

options:

  • try to get hook in upgrade process
  • add something to .bashrc (or similar) that notifies user when they ssh in that opkg isn't enabled and print way to re-enable it
  • ???
@matteodelabre
Copy link
Member

The current bootstrap script creates a script called entware-reenable in the home folder, and shows “Use '/home/root/entware-reenable' to re-enable Toltec after a system update” to the user after install. Automatically detecting in .bashrc when it needs to be run seems like a good idea.

@LinusCDE
Copy link
Member

I think @Eeems had the idea to add a specific feature to reMarkables update_engine. One would need to:

  • Add the feature to their update_engine
  • Create a PR there
  • Hope that they merge it

Maybe creating an issue there would be a better first step, to ask if they would even want to allow such a feature.

@matteodelabre
Copy link
Member

Have we found a way to downgrade to a previous version to test the upgrade path? The only way I know of currently is flashing using uuuflash.

@Eeems
Copy link
Member

Eeems commented Jan 20, 2021

Flashing a previous version to the other root partition while live and then switching partitions.

@matteodelabre
Copy link
Member

Do you know if this is documented somewhere?

@Eeems
Copy link
Member

Eeems commented Jan 20, 2021

Do you know if this is documented somewhere?

Not that I'm aware of.

@matteodelabre
Copy link
Member

matteodelabre commented May 10, 2021

Update: This is now easily doable thanks to ddvk’s remarkable-update project (works on rM1 and rM2).

@matteodelabre matteodelabre changed the title upgrade story Automate re-enabling of Toltec after system upgrades May 10, 2021
@Eeems
Copy link
Member

Eeems commented Dec 6, 2023

https://github.com/Jayy001/codexctl implements full on-device upgrade/downgrade handling, and would be extendable to run post-upgrade scripts for us. At some point soon, I'll add codexctl as a toltec package for us when I sort out automating the build for the device binary.

@Eeems
Copy link
Member

Eeems commented Dec 16, 2023

Something I noticed recently, run-postinsts.service is part of the sysinit.target, which appears to run scripts in /etc/ipk-postinsts. So this might be how we hook in post install scripts easily.

You can use the following to turn on logging to /tmp/postinst.log

echo "POSTINST_LOGGING=1" > /etc/default/postinst
echo "LOGFILE=/tmp/postinst.log" >> /etc/default/postinst

We should probably put a service in place that waits for opt.mount and then runs opkg configure if there isn't already. This script looks like it would run opkg configure if it was installed on the base system. I believe entware has default installed packages for other init systems that we should double-check t osee if we should be integrating somehow. Similar to how the profile stuff wasn't being loaded.

@Eeems
Copy link
Member

Eeems commented Dec 16, 2023

@Jayy001 you should be aware of this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install Installation scripts
Projects
None yet
Development

No branches or pull requests

4 participants