Skip to content

How to create a DietPi image for Raspberry Pi

MichaIng edited this page May 14, 2019 · 10 revisions

Flash onto SDcard using: dd (Linux), Rufus (Windows) or Etcher (multi platform)

(Optional)

  • Enable SSH by creating a file named ssh in partition 1 (beside config.txt).
  • Edit cmdline.txt and config.txt to your needs. The latter will be overwritten by DietPi-PREP.

Plug the SDcard into the RPi, boot and login with pi:raspberry

  • The default hostname is raspberrypi which you can use to get the local IP for SSH: ping raspberrypi

DietPi-PREP

  • sudo bash -c "$(curl -sSL https://raw.githubusercontent.com/MichaIng/DietPi/master/PREP_SYSTEM_FOR_DIETPI.sh)"
  • Git branch: master
  • Enter your name
  • Pre-image name: Raspbian Lite
  • Device: 0 : Raspberry Pi (all models)
  • WiFi: 1 : I require WiFi
  • Distro: 4 : Stretch
  • sudo shutdown now

Image creation

cd /tmp
wget https://raw.githubusercontent.com/MichaIng/DietPi/dietpi-image/.meta/dietpi-image
chmod +x dietpi-image`
./dietpi-image <mount_dev> 2 DietPi_RPi-ARMv6-Stretch
  • The image will be created as /root/DietPi_RPi-ARMv6-Stretch.img and a 7zip archive with hash file and README.md included at: /root/DietPi_RPi-ARMv6-Stretch.7z