Open codekoch opened 5 years ago
Yes, create a berryboot-init sh file and add it to the root of your squash image.
mksquashfs ./berryboot-init my_image.sqsh
It will be run as your image is mounted, before actual switch_root
initiates the OS.
OK. But the problem is that i have to switch off the script sometimes for testing and manipulate the OS. The script is only for updating and resetting the OS.
Maybe looking at my scripts enabling self-update/reset for some popular distribution images (Volumio2/LibreELEC/Lakka) may help you for what you are trying to achieve.
Quite a hack-ish way to self-copy & reroute the init execution with berryboot-init, so that image can then be unmounted, replaced, relaunched... Would be nice if berryboot could offer a clean mechanism to do such things, but works well so far.
I tried it with a tiny script:
echo "Hello?" read -n
And i added it to my image with mksquashfs ./berryboot-init my_image.img
But nothing happens....no "Hello" appears during boot :-(
I guess I unterstand something wrong...
Need more help...
It does print "Executing init script" during boot? If not it did not find your /berryboot-init file.
No, it does'nt print "Executing init script" . But mksquashfs ./berryboot-init my_image.img copied the berryboot-init file....
@codekoch which berryboot version are you using? I remember some early september 2018 release had troubles with locating berryboot-init file. But it has been fixed since (latest Dec 2018 is fine).
Hi, I build a system for schools based on berryboot (http://mediakit.education). Two questions:
Thx in advance.