Jump to content

cIddeab

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by cIddeab

  1. Ok, finally I found some time to solve this problem. I adopted the root-ro project which is for the RaspberryPi to standard Debian / Armbian. If anyone is interested, the code can be found here: https://gitlab.com/cIdde/bananapim2pluspowerbuttonshutdownservice Clone the repo, call install.sh and you are done. (Well, maybe read the docs first and have a backup of your root drive at hand, if anything should fail.) At least for me, it worked like a charm: on a virtual standard Debian 10 system as well as on my BananaPi M2+ EDU board running Armbian / Debian 9.
  2. @yam1: thanks for the link. After reading it, I still think, that overlayfs is the best way to go. Well, as there doesn't seem to be a ready-to-use solution, it looks like I'll have to do some porting of the "overlayroot"-package solution to systemd ... Will surely take a while, but when I have something, I'll report it here - for anyone else, who might be looking for such a solution.
  3. Hi all, I've been struggling with the issue in the topic for a few days now. Actually the ideal solution would be a read-only root file system (with a writable overlayfs on top), so that I can just turn the power off, without risking any SD-card/filesystem corruption. There seems to be an easy solution for that according to this page: https://docs.armbian.com/User-Guide_Advanced-Features/ section "How to freeze your filesystem?". But the package "overlayroot" that is mentioned there does not seem to be available for Debian (Armbian Stretch). A quick attempt to adopt the overlayfs-startup scripts to Debian failed, because Debian is using systemd and the script that I found was obviously for sysv-init. Anyway, next best solution that I searched for was using the on-board power button to shut down the system. I found two posts that seemed like a solution: using acpid and adding a udev-rule to detect the onboard power button as acpi-power-button. But neither of the two worked on my BananaPi M2+ board. https://frank-mankel.de/kategorien/10-bananapi/62-bananapibananapro-powerbutton https://stackoverflow.com/questions/53757996/banana-pi-m2-execute-script-when-power-button-was-pressed-via-udev-does-not-wo I've not been able to see any events in acpid (acpi_listen or in the acpi-log files) when pressing the power button. And in the meantime, I doubt, that it can work on the BananaPi M2+, as the power button is connected to one of the GPIO-Pins here. What I did manage to do so far, after inspecting the circuit diagrams of the board and thus finding out which GPIO-pin the power button is connected to, is to write a little python program that estabilshes an interrupt when that GPIO shows a fallig edge (i. e. when the power button is pressed) and then shuts down the system. This python script I have installed as a systemd service. So currently, I managed to shut down the BananaPi by pressing the power button. (For anyone who is interested: I uploaded the source code to GitLab here: https://gitlab.com/cIdde/bananapim2pluspowerbuttonshutdownservice ) Anyway, I am still interested in the readonly-root / overlayfs / overlayroot solution for Debian stretch, as this is safer in the long run. Does anyone have any pointers for me there? Has anyone tried that already or is there a solution for the u-boot / systemd combination that would be easy to adopt?
  4. Hi alterfritz, did you make any progress on this, yet? I am searching for a similar solution: something like overlayroot for Armbian_5.65 for a BananaPi M2+ (Debian_stretch_next_4.14.78). The overlayroot package that is mentioned in this thread (1st reply): would be just what I would need, but the "overlayroot" package doesn't seem to be available for Debian Stretch. So, before starting to botch something together myself, I would like to know, if you have found a good solution already.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines