mb1986 / rm-hacks

Small improvements and tweaks for rM devices, covering both rM1 and rM2.
Other
544 stars 9 forks source link

Flipping boot partition removes rmHacks #393

Closed CoolPenguin42 closed 1 month ago

CoolPenguin42 commented 1 month ago

Hello! So I have been trying to dual-boot my remarkable where one partition is 3.11.2.5 and the other is 3.3.2.1666. The former will have rmHacks on it, the latter is for toltec and stuff like that (koreader mainly). I have my partitions correct so each has the right version on it. I installed rmHacks on the partition, then flipped partition w/ Remarkable Connection Utility. Upon flipping back, rmHacks disappeared! I saw one abstract reference to this happening on a reddit post but of course they gave absolutely no detail as to how to fix this haha.

Additionally, after it removed itself after flipping partitions, it now seems like I cannot reinstall it! I follow the prompts after running install script, and it seems like a successful installation. However, upon looking at the software version on the tablet it doesn't show that rmhacks is installed!

Is this a bug, or is it fixable via some patch I do not currently have installed? Thank you!

Eeems commented 1 month ago

https://remarkable.guide/tech/dualboot.html

CoolPenguin42 commented 1 month ago

https://remarkable.guide/tech/dualboot.html

Hmmmm, well that was the guide I was following 🙈. I did the "setting without Toltec" one for QML_DISK_CACHE_PATH. After swapping partitions and back then it disappeared and seems that I cannot install it again? I can try doing the QML on my other partition simce I could get Toltec on that and do it there, maybe that could work? Although now idk how to get rmhacks back since after successful running installer nothing happens on-device

Eeems commented 1 month ago

Hmmmm, well that was the guide I was following 🙈. I did the "setting without Toltec" one for QML_DISK_CACHE_PATH. After swapping partitions and back then it disappeared and seems that I cannot install it again? I can try doing the QML on my other partition simce I could get Toltec on that and do it there, maybe that could work?

The guide gives you instructions for the toltec partition that it seems you didn't follow. You'll need to setup the toltec partition as it instructs, as the "setting without toltec" option doesn't work with toltec.

Although now idk how to get rmhacks back since after successful running installer nothing happens on-device

My guess is that you applied the QML_DISK_CACHE_PATH change to the 3.11.2.5 partition instead of the toltec partition, which means that the installer is running successfully, but you've told xochitl to use a different cache, so it's not running the files the installer updated. You'll want to undo the changes to the 3.11.2.5 partition so it can go back to using the correct files:

rm /etc/systemd/system/xochitl.service.d/override-qmlcache.conf
systemctl daemon-reload
systemctl restart xochitl

You will need to reinstall rm-hacks again if you launch xochitl while booted to the toltec partition before applying the toltec changes for the qml cache.

CoolPenguin42 commented 1 month ago

The guide gives you instructions for the toltec partition that it seems you didn't follow. You'll need to setup the toltec partition as it instructs, as the "setting without toltec" option doesn't work with toltec.

My guess is that you applied the QML_DISK_CACHE_PATH change to the 3.11.2.5 partition instead of the toltec partition, which means that the installer is running successfully, but you've told xochitl to use a different cache, so it's not running the files the installer updated. You'll want to undo the changes to the 3.11.2.5 partition so it can go back to using the correct files:

You will need to reinstall rm-hacks again if you launch xochitl while booted to the toltec partition before applying the toltec changes for the qml cache.

Ohhhhhh I see what you mean!!! In the guide I though you just picked the one that fit ie setting the QML cache non-toltec since I didn't have it installed lol. But what you are saying is I gotta setup QML cache non-toltec on 3.11.2.5 partition and the Toltec version (after Toltec install) on the 3.3.3.1666? Or do I just do the QML setup on the 3.3.3.1666? Just to confirm haha. And thanks for the script that will be helpful in fixing what I screwed up lol

Eeems commented 1 month ago

But what you are saying is I gotta setup QML cache non-toltec on 3.11.2.5 partition and the Toltec version (after Toltec install) on the 3.3.3.1666? Or do I just do the QML setup on the 3.3.3.1666? Just to confirm haha. And thanks for the script that will be helpful in fixing what I screwed up lol

  1. Boot to the toltec partition, follow https://remarkable.guide/tech/dualboot.html#setting-it-on-toltec
  2. Boot to the 3.11.2.5 partition, run the commands I gave you in the previous comment
  3. Run the rm-hacks installation script.
CoolPenguin42 commented 1 month ago

But what you are saying is I gotta setup QML cache non-toltec on 3.11.2.5 partition and the Toltec version (after Toltec install) on the 3.3.3.1666? Or do I just do the QML setup on the 3.3.3.1666? Just to confirm haha. And thanks for the script that will be helpful in fixing what I screwed up lol

  1. Boot to the toltec partition, follow https://remarkable.guide/tech/dualboot.html#setting-it-on-toltec
  2. Boot to the 3.11.2.5 partition, run the commands I gave you in the previous comment
  3. Run the rm-hacks installation script.

Much appreciated, thanks! Will try that later today 🫡. If it all works I'll close the issue and if something else went wrong I will let you know!

CoolPenguin42 commented 1 month ago
  1. Boot to the toltec partition, follow https://remarkable.guide/tech/dualboot.html#setting-it-on-toltec

in the toltec partition (older version one), running the specified commands doesn't work since it doesnt find the file we are trying to write to: Screenshot 2024-10-18 170640

Eeems commented 1 month ago

If the directory doesn't exist, you aren't on the toltec partition.

CoolPenguin42 commented 1 month ago

If the directory doesn't exist, you aren't on the toltec partition.

currently on partition running 3.3.2.1666 that has toltec installed Screenshot 2024-10-18 172358 Screenshot 2024-10-18 172455

If it helps, here are all filenames/directories containing "xochitl" in them: Screenshot 2024-10-18 173047

Eeems commented 1 month ago

That seems to be an out of date toltec installation as toltectl should have a status command which is what I would be asking for next.

CoolPenguin42 commented 1 month ago

That seems to be an out of date toltec installation as toltectl should have a status command which is what I would be asking for next.

Here you go! Screenshot 2024-10-18 200450

Eeems commented 1 month ago

And /opt/etc/xochitl.env.d doesn't exist? That should exist as it's part of the xochitl wrapper package in toltec: https://github.com/toltec-dev/toltec/blob/stable/package/xochitl/package#L45

CoolPenguin42 commented 1 month ago

And /opt/etc/xochitl.env.d doesn't exist? That should exist as it's part of the xochitl wrapper package in toltec: https://github.com/toltec-dev/toltec/blob/stable/package/xochitl/package#L45

This is what I have in that directory: Screenshot 2024-10-18 204019

And these are the only things containing "xochitl" in the name: Screenshot 2024-10-18 204106

I will try uninstalling and reinstalling toltec and see if that will work?

Eeems commented 1 month ago

What does opkg list-installed | grep xochitl output. Instead of uninstall and reinstall, we can just get you updated with all the required packages. Have you updated toltec recently?

CoolPenguin42 commented 1 month ago

And /opt/etc/xochitl.env.d doesn't exist? That should exist as it's part of the xochitl wrapper package in toltec: https://github.com/toltec-dev/toltec/blob/stable/package/xochitl/package#L45

Ah so i figured out one issue: It didn't have xochitl package installed for some reason! installing it did indeed add that environmental variable! However, upon swapping the partitions, I found that the 3.11.2.5 one got overwritten to the 3.3.2.1666. Upon swapping back to try and upload back to the new firmware, it seems like the tablet has gotten stuck in a boot loop! So i might have screwed myself over since I do not know what to do for the bootloop lol. Although i did get the xochitl.env.d configured as it should...

Eeems commented 1 month ago

It should drop you back in 3.11.2.5 after a bit instead of staying boot looped, are you able to SSH in at the very least before it restarts?

CoolPenguin42 commented 1 month ago

It should drop you back in 3.11.2.5 after a bit instead of staying boot looped, are you able to SSH in at the very least before it restarts?

unfortunately it is a true bootloop :/ gets to remarkable is starting, and when it boots into the gui it just restarts itself! however, when the remarkable is starting screen pops up i can ssh into it if i am fast enough (very tight window but i can hit it) -> i could potentially do something to freeze the boot sequence so that I can mess around with ssh? If there is a way to do that it would probably allow me to fix whatever went wrong!!!

Eeems commented 1 month ago

systemctl stop xochitl may be enough

CoolPenguin42 commented 1 month ago

systemctl stop xochitl may be enough

OK!!!!!!! That halted the boot loop, so it is stuck on remarkable is loading screen. SSH connection is stable now! What are the next steps to figure out the bootloop? Looks like I am on the parition for 3.11.2.5: Screenshot 2024-10-19 090520

CoolPenguin42 commented 1 month ago

systemctl stop xochitl may be enough

Also, upon a bit of testing: after halting xochitl on 3.11.2.5, i was able to successfully swap into the 3.3.2.1666 partition, the file /opt/etc/xochitl.env.d/99-override-qmldir.env has been edited but toltec isn't installed anymore on the partition lol. But i am able to be in the remarkable OS at least. I have no qualms against a factory reset since i already have an RCU full-data backup of my files from before starting all of this so could i just factory reset, get 3.11.2.5, load my stuff back on, then try again from the top?

Or, if you happen to know what might be causing the instability of boot on 3.11.2.5 I could try to fix that!

Eeems commented 1 month ago

Without knowing for sure what has happened, I don't know if it's really worth trying to walk you through sorting out what you broke over github issue comments, a reinstall from the top would be fine.

CoolPenguin42 commented 1 month ago

Without knowing for sure what has happened, I don't know if it's really worth trying to walk you through sorting out what you broke over github issue comments, a reinstall from the top would be fine.

Sounds good! Ill just do the factory reset and restore via RCU and try it again :)

Eeems commented 1 month ago

Without knowing for sure what has happened, I don't know if it's really worth trying to walk you through sorting out what you broke over github issue comments, a reinstall from the top would be fine.

Sounds good! Ill just do the factory reset and restore via RCU and try it again :)

Not a factory reset using the UI, follow this: https://remarkable.guide/tech/factory-reset.html

CoolPenguin42 commented 1 month ago

Not a factory reset using the UI, follow this: https://remarkable.guide/tech/factory-reset.html

Ok thanks! Since I had attempted install of rmhacks on 3.11.2.5 partition should I swap to that one, halt xochitl to stop bootloop, remove rmhacks with the script just in case, then swap back and do the Toltec removal and the other stuff?

CoolPenguin42 commented 1 month ago

Without knowing for sure what has happened, I don't know if it's really worth trying to walk you through sorting out what you broke over github issue comments, a reinstall from the top would be fine.

Sounds good! Ill just do the factory reset and restore via RCU and try it again :)

Not a factory reset using the UI, follow this: https://remarkable.guide/tech/factory-reset.html

SUCCESS! No idea what happened but after booting into the 3.11xx partition, halting xochitil, I just tried uninstalling rmhacks. Rebooted, and no bootloop! Then I went back to 3.3xx and uninstalled + reinstalled toltec, added the xochitl package, and then ran the thing from the guide to redirect the qml cache. Booted back into 3.11x and it still hasn't bootlooped. Gonna try installing rmhacks then flipping partitions to ensure the hacks stick :) If it all works I can close the issue! Thanks for all the help man!