Building your own Raspbian Image for Raspberry Pi: pi-gen

My recent project requires the use of the Raspberry Pi (RPi for short). I bought one early in June and has been playing with it for about 2 months. Quite an interesting adventure. As I needed to deploy a number of RPi’s, I had to do something to make the configuration management more sane for myself. I started with trying to build a standard image for all my RPi’s, and (my current planned approach) use Ansible to configure the parts that are different.

Good that that Raspbian provides an open source repository for the project they use to generate the Raspbian image at https://github.com/RPi-Distro/pi-gen.

I spent quite some time on this and here are some learning points I have:

There are two ways to run pi-gen, one is to run it within a host that calls the build.sh script to build the image, and the other is to run it within a docker image which in turns calls the same build.sh script.

Once you have completed the modifications above, you can start to run pi-gen using one of these two methods.

Sustainability is key

I Learn, I Think, I Solve, I Create

I used to blog a lot, back when I had a lot of time. Looking back, some of the posts are still interesting when I read them now. I realise that if I want to remember the things I am doing today, I need to write them down somewhere, otherwise in years to come, when I try to recall what I have been spending my time on, I might pull a blank. So here I am, trying to start another blog, this one to focus on the technical stuff that I am do on a day-to-day basis. Basically every day I do one of these four things: Learn something new, Think about what I have learnt, and try to use it to Solve some problem that I am facing, and at the end, possibly Creating a way to do certain things. Yah, I think I sound abstract, but let’s see what I produce in this blog and we can better define this…