RPi-Distro / pi-gen

Tool used to create the official Raspberry Pi OS images
BSD 3-Clause "New" or "Revised" License
2.65k stars 1.65k forks source link

Building image on btrfs #487

Open utement opened 3 years ago

utement commented 3 years ago

I can succesfully build btrfs root image, however I did got stuck on boot with kernel panic "Failed to execute /init: Kernel panic - not syncing: No init found". I did follow this tutorial as reference https://feldspaten.org/2019/07/05/raspbian-and-btrfs/.

I believe the issue is with comman mkinitramfs -o /boot/initramfs-btrfs.gz where I should probably specify pi-gen version, but I guess it takes default or vagrant box kernel version that I'm runing pi-gen build on.

How can I get pi-gen version in export-image scripts?

I'm building stretch.

XECDesign commented 3 years ago

fake-uname may help

Related - https://github.com/RPi-Distro/pi-gen/issues/485

utement commented 3 years ago

I did create initramfs-btrfs.gz with standard pi-gen generated image, and copied it to my modified image. It does complain on load that parted, partition id is not correct, but with confirming it loads system. I still have to start working on resize script but before that I need to find out how can I build correct initramfs-btrfs.gz in pi-gen build time.

Any idea how can I run mkinitramfs as it would be run on actual partition.

solskogen commented 1 year ago

Now with bookworm I hope this can see some love :-)