-
Notifications
You must be signed in to change notification settings - Fork 7
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
RPI 3B+ not booting after adding some packages #52
Comments
This looks like a classic case of the built image being too big for the RAM available. Can you paste the entire boot log? The initrd unpacking and out-of-memory errors occur much earlier in the boot log. What are the sizes of the built .img files in all your tested cases? (also, if possible, what are the sizes of the initrd files in all cases too) I really dont know what all these other repos contain or are doing. Do you have a minimal testcase patch to the mesh-orange repo that replicates this issue? |
full boot log
ls of sd card
|
That log pretty much confirms the theory that the image is too large - these log lines: [ 0.160020] Trying to unpack rootfs image as initramfs... [ 98.764075] rootfs image is not initramfs (write error); looks like an initrd [ 98.764198] /initrd.image: incomplete write (4096 != 112347770) I think can occur for other reasons, but I have only seen them when there is too much to fit in RAM. What are the sizes of the uncompressed debian images for all your tested builds? ("ls -l debian/build/debian.stretch.armhf.cpio" should show this) |
The raspberry Pi 3b+ has 1 gig of ram |
On the Raspberry Pi 3B The
The
|
Looks like its a size issue any idea why since there seems to be more ram then needed? @benhylau any packages we can take out to see if it will work |
Want to add that the previous version that worked (with both build profiles) have the following
So it is the additional 11M (from 98M to 109M), probably from ff3e59d and 1b762ae. @hamishcoleman do these numbers look significant in any way? |
Firstly, I've led you astray by asking for the image size or the initrd size - they are going to be largely secondary. The important size is the uncompressed sizes of the files going into the initrd. This is the debian/build/debian.stretch.armhf.cpio file. (There are also the kernel modules and firmware cpio files, but they will not be changing sizes when you add/remove packages) So, adding up all the numbers: total = ~370M From the boot log: [ 0.000000] Memory: 881252K/1021952K available (7168K kernel code, 575K rwdata, 2072K rodata, 1024K init, 706K bss, 132508K reserved, 8192K cma-reserved) Telling us that there is ~880M of ram and thus ~440M is available for the initramfs. So, there /should/ be enough ram to unpack the image, but remember that my target size for the initramfs was "under 100M", so this is already three times the expected size. There could easily be another expansion factor somewhere that consumes the 70Meg of space from the above calculations (EG: are there lots of small files? does initramfs have a minimum sector size? does the slack space therefore add up?) |
Sounds like to me like we have a few options
Also i THINK there is a way to set the amount of ram the GPU takes in the pi. Ill try to look through the code (raspi-config) and see if it maybe is just a boot time argument. |
Before you go reading the raspi-config source, have a look at boards/raspberrypi2/config.txt - the line is "gpu_mem=16" (ref https://www.raspberrypi.org/documentation/configuration/config-txt/)
|
I need all of them in the workshop image, so that's not really an option unfortunately.
Agree. |
Confirmed this is a lack of space issue. Stripped out most of the extra packages and finally got it to boot with a 24mb "free space" Possibly two sets of kernel modules installed?
|
The raspberry pi modules package does include modules for both the rpi hardware kernel types, however removing one of them will only buy you 50Meg - the amount that these packages increase the size of things is four times that. I've said it before, but I will say it again now, I dont think that installing all these packages is a good idea. Perhaps you should install all these packages ontop of a different base system? All the troubles you have been getting stem from the scaling up of something that had a target size of under 120Meg to be three times that size. |
When using http://github.com/benhylau/mesh-router-builder to build the mesh-workshop profile the RPI 3B+ will no longer boots and complains about EOF on the ram disk. However using the same builder without the "mesh-workshop" extras (default profile) it boots fine (just like stock mesh-orange).
It seems the only difference between the two are package that are added.
I have included the error copied form serial console durring boot, and the difference between Default and Mesh-Workshop profiles.
Difference in build
The text was updated successfully, but these errors were encountered: