Dietpi-rpi-firmware-migration fails with error

Greetings, I wanted to comment that when I put the command to migrate it gives me an error

[FAILED] dietpi-rpi-firmware-migration | You can run this script on Debian Bookworm or Trixie systems only!

I updated to beta 9.0.1 and put the microSD in the raspberryPi5 and it works fine.
Will I have any problems due to this error in the migration?

If you see this error, the migration has not been applied but the script exited right at the start, isn’t it? Strange that it did boot on an RPi 5, as the old kernel does not contain any device tree for it :thinking:.

Just to be sure, there was not lengthy package install process and a dialogue which allowed to to choose optional kernel packages etc, was it?

In the meantime, DietPi v9.0 has been released, so you can migrate back to stable branch:

G_DEV_BRANCH master

There was no installation process or anything. The only thing I did was install beta 9.0 on the raspberry pi4 and change the SD to the raspberry pi5. It worked perfect.

Do you recommend that you do the migration and how can I do it?

thanks

I have made a backup of the Rasberry Pi4 installation on an HDD, do you know if it will work for me on the Raspberry Pi5 in a clean installation? when there is a final version

the migration seems to be done before already. Otherwise your system would not be able to boot on RPi5.

Can you check:

uname -a
dpkg -l raspi-firmware
ls -l /boot/firmware

Well I don’t understand, because I used a raspberry pi4 with the stable version v8.25 with jellyfin. I tried to run the script and it gave me an error. Then the only thing I did was install the v9.0 beta and put the SD in the raspberry pi5 to test if that was how it worked and it started perfectly.

root@DietPi:~# uname -a
dpkg -l raspi-firmware
ls -l /boot/firmware
Linux DietPi 6.1.61-v8_16k+ #1696 SMP PREEMPT Thu Nov  2 16:49:24 GMT 2023 aarch          64 GNU/Linux
dpkg-query: no packages found matching raspi-firmware
ls: cannot access '/boot/firmware': No such file or directory

strange, it is the new kernel required for RPi5 but usually this requires the new firmware package?

very strange yes, right now I have the pi5 working like this with jellyfin

my raspberry pi5 is a 8gb model

I also tried a clean installation on raspberry pi4 and loaded backup then tried to put the migration script and it kept giving me FAILED and that’s when I put the beta v9.00 and then changed the SD to the pi5 and it started perfectly with my jellyfin and everything as it was had

You ran rpi-update. That explains it, since it ships the new kernel but without the new firmware packages (and hence partitioning change). I strongly suggest to re-run the script. However, the error means that you are using a Bullseye system, so you need to upgrade to Bookworm first: Debian Bookworm has been released – DietPi Blog
EDIT: Um, the upgrade to Bookworm might break the kernel you are currently using. So you might to finish this on the RPi 4. But try on the RPi 5 first. If it does not come up after reboot after the upgrade to Bookworm finished, plug it into the RPi 4 to rerun the migration script.

Keep in mind that rpi-update is a development and testing tool, NOT intended to be used on production systems, unless you have an explicit reason to require/test an edge kernel version or specific commit.

Oh, I see an issue: The suffix is “v8_16k+” while our script expects “v8-16k+”, like it should be now: rpi-firmware/modules at master · raspberrypi/rpi-firmware · GitHub
Indeed this changed: GitHub - raspberrypi/rpi-firmware at d1ba55dafdbd33cfb938bca7ec325aafc1190596
I’ll implement support for this old suffix as well.

EDIT: Done. For this to work, you need to apply this patch:

apt install patch
cd /boot
curl -sSf 'https://github.com/MichaIng/DietPi/commit/09ebeda.patch' | patch -p1
1 Like
apt install patch
cd /boot
curl -sSf 'https://github.com/MichaIng/DietPi/commit/09ebeda.patch' | patch -p1
root@DietPi:~# apt install patch
cd /boot
curl -sSf 'https://github.com/MichaIng/DietPi/commit/09ebeda.patch' | patch -p1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  ed diffutils-doc
The following NEW packages will be installed:
  patch
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 121 kB of archives.
After this operation, 250 kB of additional disk space will be used.
Get:1 https://deb.debian.org/debian bullseye/main arm64 patch arm64 2.7.6-7 [121 kB]
Fetched 121 kB in 0s (279 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package patch.
(Reading database ... 25789 files and directories currently installed.)
Preparing to unpack .../patch_2.7.6-7_arm64.deb ...
Unpacking patch (2.7.6-7) ...
Setting up patch (2.7.6-7) ...
patching file dietpi/func/dietpi-set_software
root@DietPi:/boot#
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
patching file dietpi/func/dietpi-set_software
Reversed (or previously applied) patch detected!  Assume -R? [n]

what do I do here?

Did you run the patch twice?

I don’t know because I don’t know what to give there.
I think I do apply it but I haven’t seen anything happen

first apply rpi-update and now in uname -a I get this:

Linux DietPi 6.1.73-v8-16k+ #1722 SMP PREEMPT Thu Jan 18 11:00:27 GMT 2024 aarch64 GNU/Linux
root@DietPi:~# apt install patch
cd /boot
curl -sSf 'https://github.com/MichaIng/DietPi/commit/09ebeda.patch' | patch -p1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
patch is already the newest version (2.7.6-7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
patching file dietpi/func/dietpi-set_software
root@DietPi:/boot#

I think your patch is already applied

rpi-update is okay

Linux DietPi 6.1.73-v8-16k+ #1722 SMP PREEMPT Thu Jan 18 11:00:27 GMT 2024 aarch64 GNU/Linux

the system continues to boot perfectly

This is causing some challenges actually. You should not use rpi-update as long as you don’t know what you are doing. You moved to a development kernel version now.

Furthermore you are running Debian Bullseye, which is not really supported and intended for RPi5. That’s why you got the error message on the migration.

Might be, but your system is in an inconsistent status due to usage of rpi-update

ready I have Bookworm now and everything keeps starting okay

rpi-update: modify only the OS or also the raspberry pi5. Can the raspberry pi5 be damaged?

Should I now apply the script? now that I’m a bookworm

The patch was applied already, as you can see from your output:

Please read my post(s) carefully:

Do NOT run rpi-update ever, as long as you are not absolutely sure what you are doing and that you definitely require it. The tool itself should actually warn you about exactly that. At best remove the package:

G_AGP rpi-update

Then rerun the migration script.

okay, well what I did was the following
I installed the latest raspberry pi4 image then reloaded the backup (all this on the pi4) updated to v9.0.2 then with everything correct I went to bookworm and finally I put the migration script and it came out correctly.

Then I put the SD in the pi5 and everything works perfectly and running jellyfin.

When I put the uname -a command I get this again:

Linux DietPi 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

Sorry for seeing the rpi-update command executed before, I know for the next time. I have bad English, I am using a Google translator.

How can I reverse the firmware of the raspberry pi5 or should I leave it as is?

1 Like