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

Images built based on Raspberry Pi OS with desktop cannot boot #15

Closed
kfihihc opened this issue Feb 5, 2024 · 4 comments
Closed

Images built based on Raspberry Pi OS with desktop cannot boot #15

kfihihc opened this issue Feb 5, 2024 · 4 comments

Comments

@kfihihc
Copy link

kfihihc commented Feb 5, 2024

I referred to the rugpi-template project and modified the layers/customized.toml to raspios-desktop (referenced from here: https://github.com/kfihihc/tedge-rugpi-core/tree/main/layers). I successfully built it using sudo ./run-bakery bake image tryboot build/image-pi5-rugpi.img. However, after flashing it to the SD card, it fails to boot. The official fan HAT of Raspberry Pi 5 keeps spinning, then stops, waits for a while, and then starts spinning again, indicating that there seems to be a problem with the boot process.

Additionally, when I referred to the rugpi-template project and built an image based on Raspberry Pi OS Lite, it could boot normally. Using rugpi-ctrl update install image-pi5-rugpi.img on a normally booted RPi OS Lite system to OTA to RPi OS Desktop results in an error message saying No enough space or such file.

Is there anything else I need to be aware of when building images based on RPi OS Desktop with Rugpi?

@koehlma
Copy link
Member

koehlma commented Feb 5, 2024

I never tried building an image on top of Raspberry Pi OS Desktop, to be honest.

Nevertheless, here are a few ideas on what the problem may be and how to fix it:

You need to make sure that include_firmware = "none" is set. In case you used the thin-edge.io template as a basis, I just submitted a PR earlier today fixing the issue: thin-edge/tedge-rugpi-image#67. The official template has also previously been broken and erroneously included the firmware update for Pi 4 which will not work on Pi 5.

By default, the size of the system partition is 4 GB. In case of Raspberry Pi Desktop, this may be insufficient resulting in a broken system when bootstrapping (updates will simply fail, as you noticed). This is something, we need to fix in the future (see #16). For now, you need to increase the size manually in /etc/rugpi/ctrl.toml, e.g.:

system_size = "8G"

Note that this is incompatible with the thin-edge.io persist-overlay recipe which will overwrite the ctrl.toml configuration file to persist the overlay by default. If you also want that, use:

system_size = "8G"
overlay = "persist"

I hope that this resolves the issue.

@kfihihc
Copy link
Author

kfihihc commented Feb 6, 2024

It's helpful! Thank you.

I cloned the latest rugpi-template and tested it with RPi OS Desktop. It works.

I also increased the system_size to 8G in /etc/rugpi/ctrl.img, and then it successfully performed OTA updates on another RPi OS Desktop.

However, it seems it cannot open some applications, like chromium-browser :

pi@rpi5-d83addeaaaa3:~ $ chromium-browser 
[4653:4653:0206/083040.393400:FATAL:zygote_host_impl_[linux.cc](http://linux.cc/)(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
Trace/breakpoint trap

I'm wondering if it's because of the Read-only file system?

@koehlma
Copy link
Member

koehlma commented Feb 6, 2024

Perfect! 👍

The filesystem should be writeable as Rugpi mounts a writeable overlay over the original root filesystem. Just for clarification: Does Chromium work when installed on a normal installation of Raspberry Pi OS Desktop? Do other applications fail to start for the same/similar reason? Sandboxing seems very specific to Chromium. Did you install the chromium-sandbox package?

@koehlma
Copy link
Member

koehlma commented Mar 11, 2024

I consider this to be resolved, please open a new issue, if you still have any problems.

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

No branches or pull requests

2 participants