Hello, with the new beta bootloader, i saw we can boot ramdisk to flash the sd card.
For our project(https://www.candlesmarthome.com/)
We would like to automate an image creation project.
To do this i will need to do the following steps:
-remotely flash a fresh raspbian lite 32bit
-edit cmdline.txt
-boot it and run script
-boot on network to create a .img from the sdcard
Is the new bootloader can help me with that?
Is there any other way possible?
I googled a lot and didn't find a way currenty
Thank you
Re: Network imaging
that sounds like the wet dream of every (virus) skript kiddy ...
Re: Network imaging
If you set a custom imager repo URL in the bootloader configuration for each Pi then you can make it download + write your custom image. You'd need to set this up on each Pi you sell.
Re: Network imaging
Thank you @trejan, this is a good start but maybe some stuff wasn'T clear.
this feature is needed for developpement /build production and not for acutal end user.
the goal is:
having a raspberry as build machine
beeing able to boot from network without keyboard interaction
then i could, with your bootloader repo url, have a specific image run that will achieve the rest of the target.
so with the custom repo url, did i still need to have a screen and keyboard? or i could just start the pi with an empty sd card, and it will build the pi, with my image from ramdisk, and then the image will auto execute the build script to create, and push the image on a ftp or similar?
Re: Network imaging
You need a keyboard. Monitor is probably optional but I've never tried it. It may object to not having any framebuffer.
You'd need to alter the Raspberry Pi OS image to do all of that at first boot. There is no provision for doing what you want with the customisation and then saving a copy of its own SD card.
Generating your card images by automatically booting a Pi, customising it and then saving the card is an unusual workflow. If you're not meticulous about tidying up then you'll end up with lingering bits of junk like pregenerated SSH host keys. The normal route would be to customise pi-gen to directly create your image.
Re: Network imaging
Agree. Seems like pi-gen (as you suggest) or systemd-nspawn (to update/configure a "standard" RasPiOS image) are much better approaches.trejan wrote: ↑Fri Aug 05, 2022 9:11 pmGenerating your card images by automatically booting a Pi, customising it and then saving the card is an unusual workflow. If you're not meticulous about tidying up then you'll end up with lingering bits of junk like pregenerated SSH host keys. The normal route would be to customise pi-gen to directly create your image.
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Re: Network imaging
Thank you, i take a look at it, it seem to ve what i need!
Re: Network imaging
If you're OK starting with the images from Raspberrypi.com, you could use sdm, which uses systemd-nspawn to enable you to fully customize an existing "vanilla" RasPiOS IMG. You don't have the same fine-grained control over the IMG contents as pi-gen, but if you don't need that level of control, sdm seems to be easier for new customizers than pi-gen.
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo