How can I create my own image file for my current configuration using pi_gen / rpi_gen?
Before messing around with the installation I want to create an image of the current state, just like HA RPI Image.
I ran pi_gen but it didn’t create an .img file.
This is what I did:
Set up Raspian Jessie Lite and HA using the all-in-one-installer
- wrote Raspian Jessie Lite to a SD card (2016-09-23-raspbian-jessie-lite.img)
- logged in to the pi:
ssh [email protected]
-
sudo raspi-config
: expand filesystem; update the raspi-config - Used the command for the All-In-One-Installer:
wget -Nnv https://raw.githubusercontent.com/home-assistant/fabric-home-assistant/master/hass_rpi_installer.sh && bash hass_rpi_installer.sh
pi_gen: try to create the image (which did not work)
- Install git:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install git
- clone pi_gen:
git clone https://github.com/home-assistant/pi-gen
- change directory:
cd pi-gen/
- add a name for the image:
touch config
;pico config
;IMG_NAME='Raspian'
, save and quit - install all dependencies:
sudo apt-get install quilt kpartx realpath qemu-user-static debootstrap zerofree pxz zip
- try to build the image:
sudo ./build.sh
- wait 70 minutes
According to the instructions the image should be saved in “rpi_gen\deploy”. However, this directory does not exist.