Moving from Raspi 4 to 5?

Hello, I have a question. At the moment I have a Raspberry pi4 with 8gb ram. Case is from Argon one m.2 with a nvme ssd 1tb. Today I get my Raspberry pi 5 with 8gb ram. Operating system is dietpi and running the following programs: homebridge, plex, pihole etc. Can I simply remove the nvme from the Raspi 4 and install it in the Raspi 5 or would I have to reinstall everything?

Thanks in advance for info

You need to be on latest DietPi v8.25. Once done, execute the migration script before moving from RPi4 to RPi5 Image | Raspberry Pi 5 · Issue #6676 · MichaIng/DietPi · GitHub

1 Like

Thanks for the info. I’ll test it tonight and let you know

I happen to come here. Personally, I would reinstall everything. There will always be something that is not right. Good luck.

Had to upgrade from Bullet to Bookworm first. Made a backup beforehand and used this command:
G_DEV_BRANCH beta # for a quick switch + update to beta branch :slight_smile:
bash <(curl -sSf ‘https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-rpi-firmware-migration’)

executed. Everything went smoothly. Thanks for that :slight_smile:

1 Like

There is no need to use beta branch anymore as DietPi v8.25 has been released already on last weekend.

1 Like

I have one more question. I downloaded the backup file via File Browser as a zip file. I want to install a larger ssd in the Raspi 5. Could I somehow put this backup zip file on the new ssd? Or is there an easy way?

Thanks in advance for your help

What data the backup contains? Is it a DietPi backup or something else?

yes from dietpi the backup file mnt/file.

A dietpi-backup is a full system backup and contains the whole system, not just /mnt :wink:

Was that backup created before running the RPi5 migration script? Or after the new firmware file system layout has been applied?

no before that. Should I make another backup before I change the ssd?

Yes, that would be best. It’s quite complicate to restore a backup that has been created before running the migration script https://github.com/MichaIng/DietPi/issues/6676#issuecomment-1866929082

root@DietPi:~# bash <(curl -sSf 'https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-rpi-firmware-migration')
[  OK  ] dietpi-rpi-firmware-migration | Free space check: path=/ | available=123064 MiB | required=200 MiB
/dev/fd/63: Zeile 11: ((: > 128000000 : Syntaxfehler: Operator erwartet. (Fehlerverursachendes Zeichen ist "> 128000000 ").
[FAILED] dietpi-rpi-firmware-migration | You can run this script on a system with at least 128 MiB boot partition only!

just want to perform migration get this error message

Can you share

df -h
root@DietPi:~# df -h
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root       181G     53G  121G   31% /
devtmpfs        3,8G       0  3,8G    0% /dev
tmpfs           3,9G    2,8M  3,9G    1% /dev/shm
tmpfs           1,6G     11M  1,6G    1% /run
tmpfs           5,0M       0  5,0M    0% /run/lock
tmpfs           3,9G       0  3,9G    0% /tmp
tmpfs            50M     16K   50M    1% /var/log
/dev/mmcblk0p1  127M     60M   67M   48% /boot/firmware
/dev/sda1       932G     43G  889G    5% /mnt/media
overlay         181G     53G  121G   31% /mnt/dietpi_userdata/docker-data/overlay2/c4981907168f149506ecef1496a9abd7a50dfe6870946bf7cd1807fe3175435b/merged

are you trying to run the migration script again? Looks like it has been executed already.

You’re right, I overlooked it.
That means on the new hard disk I can install the Dietpi image from Raspi 4 on the Raspi 5 and copy the data into the backup folder and restore Diepti-launcher back?

I’m not sure if we misunderstood or if I still don’t get what you are trying to do.

Soo, what exactly you like to copy from A to B and what are you trying to restore. Maybe you can be more specific on the folder or data in question.

At least it should be possible to simply more your SD card and SSD from RPi4 into RPi5 without the need to copy or restore further data.

Hi, I just want to copy the data from the existing SD card to the larger SSD. Is it that easy or do I have to install Dietpi on the SSD and then copy the content from the SD over to the new one?

Thank you for your help and Merry Christmas

Maybe this could help to move from SD card to SSD Moving a running DietPi system to a USB stick/disk or an onboard eMMC – DietPi Blog