-
Notifications
You must be signed in to change notification settings - Fork 61
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
toltec-bootstrap #163
toltec-bootstrap #163
Conversation
Test scenarios
|
Gave it a quick test and it seems to work well. 👍 |
Maybe an issue
Running entware-reenable seemed to reinstall everything. That doesn't seem to be the intended action according to what you said above. Some packages also failed to install for me, though that might be because they could've been more up-to date custom files before for reviewing. Log of ./entware-install
|
Hmm, when I tested earlier it was working for me. Could you run the reinstall commands without the opkg call to see what it reports needs to be reinstalled for you? For me it was just reinstalling two packages. Edit: I should also add some logic to keep from installing packages where the version isn't available anymore. Maybe add an |
this mostly worked for me, it guessed i had draft, rm2fb and oxide installed (but not remux? need to look into that). it didn't reinstall a bunch of packages like it did for linus, just the three named ones |
I think what @LinusCDE is running into is that he's got versions of packages that aren't out yet, so it's not able to find the correct version yet. It should be simple enough to filter it out though. I'll be home from house shopping soon, so I'll take a look at the extra filtering. |
That could well be. Though it reinstall basically everything for me. Running it a second time does pretty much the same except the entware packages. Also many packages were pulled from my or other peoples servers since I have a lot of them in. It may also be that I ran bootstrap which switched testing to stable for me and than it may have found a lot more version differences than I probably have anyway. |
The script seems to cause all kinds of problems for me. Just ran it again and the device suddenly rebooted and the screen stayed white (probably after the normal starting screen). The last thing it did was configuring draft (didn't even know I had it installed). I sshd in and it seemed that it had switched off remux and enabled tarnish. Enabling remux --now did nothing (disabled --now tarnish before) and when I rebootet the devices failsafe probably triggered since the ssh key changed, but my xochitl version got downgraded to 2.4.1.30 (most likely switched to backup roofs). Gonna take a break for today. I'm probably not the most normal user when it comes to repos and stuff, but the script seems to hate me in particular. |
It shouldn't have enabled anything, our install scripts don't do that. Likely it was just switching to the other root partition which had tarnish installed. Could you next time just try running the code manually without the # Get the list of installed packages with files on root
packages=$(opkg list-installed | awk '{print $1}' | while read -r pkg; do opkg files "$pkg" | grep -v /opt | grep -v "is installed on root" | grep -v /home/root | awk "{print \"$pkg\",\$0}"; done | awk '{print $1}' | uniq)
# Get the list of packages that can be installed
available_packages=$(gunzip -c /opt/var/opkg-lists/* | grep Package: | awk '{print $2}' | uniq)
# Reinstall all packages that have files on root that are available to install
echo "${packages[@]}" "${available_packages[@]}" | sed 's/ /\n/g' | sort | uniq -d |
Not sure why, but it seemed to do so. Maybe it was due to some file errors. The switch to 2.4 happened after that. So it was not a result of that. After that downgrade, I let the device upgrade again and ran the script again to get me set up. I have the logs this time. It did the same thing (aside from differing logs and maybe errors if not mistaken). The device automatically rebooted for some reason, had a white screen (maybe some packages disabled xochitl but no one enabled itself?). After not doing a thing, it started downgrading again. Gonna upgrade it again... Logs
I'll run the stable bootstrap next time and then do the renable with your suggested changes. |
I have now restored to the device to seemingly normal working state (reenabled with official bootstrap script, reinstalled oxide + deps, remux and removed draft). Enabled oxide and disabled xochitl.
Output (with older script)
Ran the new entware-renable script (79c43b7): Seemed ok and reinstalled fewer packages. (Lost the output due to next). It restarted again, ended up at white screen and after some time rebooted to downgrade. While this happened though I tried to (re)start tarnish and xochitl some times and go this interesting log from xochitl via journalctl:
So it's not an direct issue with the reenable-script but the rm2fb server. Didn't know that it would even get used on the rM 1. @raisjn |
You shouldn't have rm2fb installed on an rM1. That's likely the issue. Did you have the other packages installed to begin with? |
after looking at the script, i think the logic for detecting overlap is not specific enough. my hypothesis for what happened with linus is that the line for detecting which packages are installed and have files on the root partition picked up duplicate packages because of the multiple repositories (or maybe another reason) and many packages were seen as needing to be re-installed. rm2fb might have been in two repositories (his local testing repo and the official toltec testing repo, for example) and therefore installed on his machine. (and this would explain the mystery of how rm2fb got there at all). recommendation: do set intersection another way |
The crashes/downgrades really seemed to be that some version of the entware-reenable script from this PR, installed it. I never noticed it and removed it, so subsequent scripts might have reenabled all the hooks that lead to a crash on the next reboot. Though I'm still now sure why the device rebooted at all. (Maybe also rm2fb's doing?) |
Should be easy enough to remove duplicates of the same version if there are duplicate repos. EDIT: Actually the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a lot better now.
Running while everything is installed
reMarkable: /home/root/ ./entware-reenable
Downloading https://bin.entware.net/armv7sf-k3.2/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Downloading https://rmtestrepo.cosmos-ink.net/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmtestrepo
Downloading https://opkg.rmkit.dev/testing/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmkit-testing
Downloading https://toltec-dev.org/testing/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/toltec
Removing package dotnet-profile from root...
Removing package reboot-guard from root...
Failed to disable unit: Unit file rguard.service does not exist.
You can force removal of packages with failed prerm scripts with the option:
--force-remove
Removing package remux from root...
Disabling remux
Removing package tarnish from root...
Disabling tarnish
Removed /etc/systemd/system/multi-user.target.wants/tarnish.service.
Installing dotnet-profile (3.1.10-1) to root...
Downloading https://toltec-dev.org/testing/dotnet-profile_3.1.10-1_armv7-3.2.ipk
Package reboot-guard (1.0.1-2) installed in root is up to date.
Installing remux (0.1.3-1) to root...
Downloading https://toltec-dev.org/testing/remux_0.1.3-1_armv7-3.2.ipk
Installing tarnish (2.0.1~beta-2) to root...
Downloading https://toltec-dev.org/testing/tarnish_2.0.1~beta-2_armv7-3.2.ipk
Configuring tarnish.
Configuring remux.
Run the following command(s) to use remux as your launcher
$ systemctl enable --now remux
Configuring dotnet-profile.
Make sure to source /etc/profile.d/dotnet-profile.sh before running dotnet
Collected errors:
* pkg_run_script: package "reboot-guard" prerm script returned status 1.
* opkg_remove_pkg: not removing package "reboot-guard", prerm script failed
Reactivating after unmounting /opt and the service worked good as well (pretty much the same output as above).
Seems pretty stable now. 👍
Looks like reboot-guard's preremove script needs a tweak. I'll do that in another PR. |
* add toltec-bootstrap package
Fix #140