-
Notifications
You must be signed in to change notification settings - Fork 1
Creating a new Raspberry Pi release
Roel Broersma edited this page Oct 23, 2023
·
26 revisions
There are two methods, manual and automatic (via a script): Manual Automatic
- Take a Linux machine or (virtual) DietPi.
- Install a Desktop environment like LXDE (dietpi-software and select install software: LXDE: ultra lightweight desktop)
- Install gnome-disk-utility using:
apt-get install gnome-disk-utility -y
- Download the Latest DietPi image for Raspberry Pi systems, using:
cd /tmp wget https://dietpi.com/downloads/images/DietPi_RPi-ARMv8-Bookworm.img.xz -o /tmp/dietpi.img.7z
- Download the latest dietpi.txt from the Tunnel Gui Project:
wget https://raw.githubusercontent.com/roelbroersma/tunnel-gui/main/dietpi.txt
- Install 7zip:
apt-get install 7zip
- Extract the downloaded zipfile:
cd /tmp
7zr x /tmp/DietPi_RPi-ARMv8-Bookworm.img.xz
- Start the Desktop environment on a machine which has a monitor connected (or a Hyper-V console window) using the command:
startx
- Start the Gnome disk utility, open a Terminal and type:
gnome-disks
- Click the Hamburger Menu and click 'Attach Disk Image... (.iso, .img)', now select the unpacked .img file at /tmp/DietPi_RPi-ARMv8-Bookworm.img and make sure to unclick Set up read-only loop device!
- You will see two partitions, select the first FAT partition and click the Play button, it will now mount as /media/....
- Go to the /media/.... folder and drag and drop the /tmp/dietpi.txt file to it that we downloaded in step 5. Overwrite it.
- Go back to the gnome-disk-utility and click the STOP button to stop mounting the FAT partition.
- Now click the MINUS button in the top bar to DETACH the .img file.
- Go to a terminal and zip the .img file using a normal .zip utility (this is more friendly for our Windows users):
cd /tmp
zip -9 -o dietpi_image_output_file.zip DietPi_RPi-ARMv8-Bookworm.img
`#!/bin/bash
cd /tmp wget https://dietpi.com/downloads/images/DietPi_RPi-ARMv8-Bookworm.img.xz
unxz DietPi_RPi-ARMv8-Bookworm.img.xz
offset=$(fdisk -lu DietPi_RPi-ARMv8-Bookworm.img | grep 'img1' | awk '{print $3}')
offset=$((offset * 512))
mkdir -p /mnt/dietpi_img mount -o loop,offset=${offset} DietPi_RPi-ARMv8-Bookworm.img /mnt/dietpi_img
wget https://raw.githubusercontent.com/roelbroersma/tunnel-gui/main/dietpi/dietpi.txt cp dietpi.txt /mnt/dietpi_img
umount /mnt/dietpi_img
Step 6: Zip the .img file using a normal zip (to make it easy for our Windows users) and with maximum compression
zip -9 DietPi_RPi-ARMv8-Bookworm_compressed.zip DietPi_RPi-ARMv8-Bookworm.img`