[SOLVED] Unwanted upgrade from 32-bit to 64-bit

After installing the 32bit version of the ISO (armv7) on a raspberry CM4 module, it automatically upgrades to 64bit during the initial installation. How can I block the 64bit upgrade? some software packages I use only run on 32bit versions.
Thank you in advance
Sandro

it’s not us who did this. Raspberry Pi kernel developer activated the 64bit flag by default on latest kernel version for RPI4. Moving Linux Kernel to 6.1 - Page 11 - Raspberry Pi Forums

You could switch back to 32bit by setting arm_64bit=0 inside /boot/config.txt

3 Likes

Thank you very much Joulinar, work fine…
Sandro

Do you actually face any particular issue when using the 64-bit kernel? I thought as well it is a bad idea to do this switch, but so far we did not receive any actual issues with it (after we hot-fixed dietpi-software to be compatible with it).

The software I use is a software PLC (codesys runtime) which works only with 32bit architecture and has a reasonable price, the 64bit version costs a lot. And essentially there are no performance differences.
the link for those who want to try…
Thanks again for the tip
Sandro

It seems OS forced to switch to 64bit on all raspberry I just realised it too.
As I read Raspberry officially use 64bit system default only on Pi 4B, Pi 400, CM4 and CM4S, but it seems system was switched to 64bit on Raspberry Zero2W either for some reason…
So I have a bunch of 64bit packages…

this is a feature of the RPI kernel. Maybe this has been extended to other boards as well by RPi developer. It’s not something related to DietPi. However this should have impact to kernel mode only. Whole userland should stay on 32bit.

can you check your system.

- Kernel version | `uname -a`
- Architecture | `dpkg --print-architecture`

dietpi@zero2:~$ dpkg --print-architecture
arm64

uname -a
Linux zero2 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

config.txt:
arm_64bit=1

Raspberry OS has 32bit and 64bit images and in 32bit image the 64bit option does not exists in its config.txt

I don’t know if it was a change after some upgrade, or it worked by default like this.
It just turned out to me, because I tried to investigate why I had hard system freeze more times with my compiled 6.6 kernel, and I don’t think so that I need 64bit packages for an SBC which has that little amount of RAM. Last time I tried to compile neo vim on zero 2W to replace the stone aged version one in the repo, but after more hours of unresponsiveness of system I canceled it. There was more error messages in log about journald service.

Your system is a real 64bit system. I guess you choose the 64bit image. It is not a 32bit image that has forced 64bit kernel mode.

If you like 32bit system, you would need to use the DietPi image for RPi1.

No. I used the only dietpi image which is shown on webpage for this platform. For Raspberry Pi 2/3/4 (including Zero 2). They are using the same dietpi image, which is it seems pure 64bit and that info does not shown on the download page.
I didn’t know this, just realised that after using for long time that its basically a 64bit system…
By the way the info on webpage for Raspberry Pi 1/Zero (1) platform which I don’t have: “These images are compatible with all Raspberry Pi models, but we recommend it only for Raspberry Pi 1 and Zero (1) models.”
On official raspberry page can choose from 32 and 64bit images clearly…

Official Pi documentation about the arm_64bit flag:

Defaults to 1 on Pi 4s (Pi 4B, Pi 400, CM4 and CM4S), and 0 on all other platforms. However, if the name given in an explicit kernel option matches one of the known kernels then arm_64bit will be set accordingly.