1

I'd like to install "pure" Debian (not Raspberry Pi OS/Raspbian) in a Raspberry Pi 4B.

This is because Raspberry Pi OS diverges too much and makes some stuff in FreedomBox not work fine.

Is that possible? How?

2 Answers 2

1

According to the Debian Wiki it could be possible, because RPi4 now boots from CPU instead of GPU.

Unfortunately, it seems that currently the Debian kernel does not support the RPi4.

Sources: https://wiki.debian.org/RaspberryPi#Raspberry_Pi_4

1
  • Sad but correct answer 😢
    – Yajo
    Jun 19, 2020 at 7:46
0

Pure Debian on RPi 4B

The kernel in use for Bullseye now makes this possible, with some caveats.

  • This works for RPi 4B, other hardware not tested.
  • The SD card is not recognized.
  • The install is to a USB-3 drive.
  • The install is with wired Ethernet.
  • This requires the testing release (Bullseye).

Credits

I am mostly echoing what Akeo posted, but with a little bit more detail on the non-free firmware. I would stop here but SE frowns on answers with just a link and no explanation.

Overview

  • Upgrade the bootloader.
  • Prepare the USB-3 drive.
    • netinst as base
    • add RPi specific firmware
    • add Debian non-free firmware
  • Boot and install!

Upgrade the Bootloader

You can skip this if your RPi 4 is newer than April 2020, or if you just want to wait until other things don't work. If you get as far as the blue screen with an installation option, you don't need to do this.

Follow the instructions here. I found it easiest to boot from a working Raspbian SD card and, as root,

# apt-get update
# apt-get upgrade
# rpi-eeprom-update
# reboot

Be patient. This took a while. I think that the actual update of the EEPROM is during the boot, so you need to wait for it to finish. (Anybody who knows more feel free to jump in and edit this.)

Prepare the USB-3 Drive

Prepare the ESP Partition

I partitioned a 1TB drive using gparted to have a 750MiB EXT-32 partition, formatted, and with the ESP flag set. The boot flag was automatically set.

Mount the ESP partition

$ sudo mount /dev/sd${X}1 /mnt

Extract the Install CD

Find and download a recent netinst CD from here. Extract it directly into the partition. If you extract it elsewhere and copy you might accidentally lose some important hidden files.

$ cd /mnt
$ sudo 7z x ~/Downloads/debian-testing-arm64-netinst.iso

Extract RPi Firmware

Find and download recent firmware from here. Again, extract it directly.

$ sudo 7z x ~/Downloads/RPi4_UEFI_Firmware_v1.27.zip

That much permits the UEFI bootloader to load the Debian installer. But the Debian installer will need the same firmware and won't look in the same place.

$ sudo cp firmware/brcm/* .

Extract Debian Non-Free Firmware

Find and download the Debian non-free firmware packages here. Extract them.

$ cd firmware
$ sudo tar xzf ~/Downloads/firmware.tar.gz

Boot and Install

Don't forget to unmount:

$ cd
$ sudo umount /mnt

Now plug the USB-3 drive into the USB-3 port on the RPi 4 and boot. You should eventually get to the installer. Proceed as you would normally for Debian installation on any other hardware.

I am completely baffled about this next problem. The "Detect network hardware" fails sometimes, asking for some non-free firmware. To fix this, use 'Ctrl-Alt-F2' and press 'Enter' to open a new shell.

# mount -o remount,rw /cdrom
# cd /cdrom/firmware
# cp brcm/* .

Now press 'Ctrl-Alt-F1' to go back to the main installer and press 'Enter'.

If you remember we already copied those to the root of the ESP, which is now mounted as /cdrom. I have tried copying them either to the root or to the firmware directory. Either place is supposed to do the trick. Perhaps I should have done both above. Forgive me, but I'm tired of checking the steps, and knowing this trick is not a bad idea anyway.

Edit

I tried this again with the brcm firmware in both the root of the ESP and in firmware. I still got the request for firmware midway through the install. I did the same remedy as above, except that I ran these in the alternate shell:

# mount -o remount,rw /cdrom
# cd /cdrom
# touch x

And it was able to continue. As I said before, I'm baffled, but it does let me get a complete Debian Bullseye installation.

Again, the credit for this goes to Akeo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.