Skip to content

alexandrelamberty/xraspios

Repository files navigation

Xraspios

Extended Raspberry Pi OS Lite Image based on Raspios and packaged with Packer.

This operating system is installed on my Raspberry Pi 4 and serve as a home lab server. It mainly run IaaS and APIs with Docker.

Features

  • Docker
    • Portainer
  • Git
  • Tmux
  • Vim
  • Security
    • SSH
      • User / Password
      • Key

Requirements

Build Image

The image is built from the Raspios Lite Armhf 2022-09-07

See builder.pkr.hcl

Initialize the project, update dependencies

packer init config.pkr.hcl

Build the image

sudo packer build build.pkr.hcl

Once the build is finished, the image will be available in thes build folder as xraspios-lite.img

Docker

Build with the official Packer Docker image

Not tested !

Initialize

docker run \
    -v `pwd`:/workspace -w /workspace \
    -e PACKER_PLUGIN_PATH=/workspace/.packer.d/plugins \
    hashicorp/packer:latest \
    init .

Build

docker run \
    -v `pwd`:/workspace -w /workspace \
    -e PACKER_PLUGIN_PATH=/workspace/.packer.d/plugins \
    hashicorp/packer:latest \
    build .

Write Image

Write the image to and SD card

Raspberry Pi Imager

Use Raspberry Pi Imager to configure WiFi, users and more and write to image to the card.

Check how rpi-imager write config

https://github.com/raspberrypi/rpi-imager/blob/ce0b02b823a40ada3cd4a12a257da9506e46dda1/src/OptionsPopup.qml#L589

DD

When rpi-imager no more needed to configure the wifi and user. TODO: Keys and no user?!

sudo dd bs=4M if=/dev/zero of=/dev/sdb oflag=sync
sudo dd bs=4M if=/path/to/image of=/dev/sdb oflag=sync

References

About

💿 eXtended Raspberry Pi OS Lite Image based on Raspios and packaged with Packer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published