Managing Raspberry Pi images: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
Line 20: Line 20:
  Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 2acf7afcba7d11500313a7b93bb55a2aae20b2d6, stage2
  Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 2acf7afcba7d11500313a7b93bb55a2aae20b2d6, stage2


I have to run pi-gen on an x64 computer. I tried on a Pi5 and it would not run.
I have to run pi-gen on an x64 computer; I tried on a Pi5 and it would not run. I use the Docker version. I use [[Murre]] as my build machine, and I run an apt cache on [[Bellman]] to speed up repeated builds. I set up a pi-gen folder (on both Murre and Bellman).
I want to use the Docker version. I am running on Murre where git and Docker are already installed. There is a copy on Bellman.
 
You have to download pi-gen and you have to install the apt package "qemu-user-static" so that you can build arm64 images. You probably only need qemu on the builder not the cacher.  


<pre>
<pre>
Line 27: Line 28:
git clone https://github.com/RPI-Distro/pi-gen.git
git clone https://github.com/RPI-Distro/pi-gen.git
cd pi-gen
cd pi-gen
docker compose up
</pre>
</pre>


Not sure where this leaves me. It did something. :-) It ran "apt-cacher" whatever that is.
In the "config" file on each machine I added "APT_PROXY=http://192.168.123.2:3142"; this tells the copy on Bellman to be a cache when I run "docker compose up -d" and it tells the builder on Murre to use Bellman as the cache. This means I can run a cache on the server and build on the fast machine, or I can build on Bellman remotely.
 
On the "builder" then in the pi-gen folder, I run "./builder-docker.sh" and wait. Eventually I get an img file in the deploy/ folder. From the console then I can burn the image using the Raspberry Pi imager to an SD Card or an NVME drive.
 
 


[[Category: Raspberry Pi]]
[[Category: Raspberry Pi]]
[[Category: Embedded]]
[[Category: Embedded]]

Revision as of 21:49, 10 March 2024

Creating SD cards

There is a Windows program that some people use but I only use the Raspberry Pi imager, or sometimes Balena Etcher.

Copy IMG

Mick warns that pi-shrink is unreliable. Here it is all the same.

https://www.instructables.com/How-to-BackUp-and-Shrink-Your-Raspberry-Pi-Image/

I did this on Bellman and worked there I think. I think. Did I make notes?

sudo apt install dcfldd gparted

Building new images

pi-gen is what the Raspberry Pi folk use. See /boot/issue.txt on a standard image. For example,

Raspberry Pi reference 2023-12-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 2acf7afcba7d11500313a7b93bb55a2aae20b2d6, stage2

I have to run pi-gen on an x64 computer; I tried on a Pi5 and it would not run. I use the Docker version. I use Murre as my build machine, and I run an apt cache on Bellman to speed up repeated builds. I set up a pi-gen folder (on both Murre and Bellman).

You have to download pi-gen and you have to install the apt package "qemu-user-static" so that you can build arm64 images. You probably only need qemu on the builder not the cacher.

cd ~/Documents/Projects/TARRA
git clone https://github.com/RPI-Distro/pi-gen.git
cd pi-gen

In the "config" file on each machine I added "APT_PROXY=http://192.168.123.2:3142"; this tells the copy on Bellman to be a cache when I run "docker compose up -d" and it tells the builder on Murre to use Bellman as the cache. This means I can run a cache on the server and build on the fast machine, or I can build on Bellman remotely.

On the "builder" then in the pi-gen folder, I run "./builder-docker.sh" and wait. Eventually I get an img file in the deploy/ folder. From the console then I can burn the image using the Raspberry Pi imager to an SD Card or an NVME drive.