User avatar
butchkemper
Posts: 136
Joined: Sat Jul 22, 2017 8:03 pm
Location: Sachse, Tx. Dallas is a nearby suburb of Sachse.

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Thu Feb 18, 2021 8:48 pm

jotapesse wrote:
Sat Jan 02, 2021 7:46 pm
Akeo wrote:
Sat Jan 02, 2021 6:30 pm
The UEFI firmware is not yet compatible with the Pi 400 (a classic case of too new & not enough volunteers on the UEFI Open Source side), so that won't work.
Thank you for clarifying this for me. Hopefully this will be sorted soon. This is my first Pi but I thought that generic/vanilla OS boot and install would be much more easier by now than what currently seems to be available. I would rather have vanilla Debian with my custom settings than depend on the RaspberryPi OS.
As a new user to the Raspberry Pi world, you may not be familiar with the fact that Debian is the foundation for Raspberry Pi OS. I can speak from experience that currently the work involved to install Raspberry Pi OS is significantly less than the Vanilla Debian 11 release. That may change in the future but right now Buster is easier to get operational than Vanilla Debian 11.

Butch

otalado
Posts: 29
Joined: Tue Oct 27, 2015 4:17 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Fri Feb 19, 2021 5:55 am

@alx.manpages, this may interest you. I just obtained the 128GB Patriot Rage Elite USB key which is declared 400MBs read / 100MBs write. I did not measure if these specs are true, but I must say I was impressed with how it performs. Not much slower than SSD! Price is around 25€ (in Slovenia), not exactly cheap but IMHO worth it.

otalado
Posts: 29
Joined: Tue Oct 27, 2015 4:17 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Fri Feb 19, 2021 6:20 am

I did install the debian using @akeo instructions and with some help from @danpacu. I also installed desktop env (LXDE) and successfully copied (cloned) the whole thing to HDD with the dd command.
However, when I tried this again with the different USB key and SSD this time, I ran into trouble. I cannot boot from SSD. It just enters the pxe boot after displaying the Pi logo.
I think one possible reason could be that the SSD drive needs quirk settings (?). Unfortunately, I don't know where and how to do it in this EFI boot scenario. Perhaps somewhere in GRUB settings??

otalado
Posts: 29
Joined: Tue Oct 27, 2015 4:17 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Fri Feb 19, 2021 9:22 am

Well, the idea that cloned SSD is not working because of possible missing quirks settings, went into the recycle bin. I've 'liberated' HDD drive from somewhere and cloned the USB key to it. Sadly, it fails on the boot the i.e. with >>>Start PXE over IPV4., same way as with SSD. So something with GRUB settings is not OK??

TuxoHolic
Posts: 10
Joined: Fri Jan 22, 2021 9:19 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Mon Feb 22, 2021 3:24 pm

I tried multiple ways to get snd_bcm2835 working with sound in xfce, aplay -l never displays the 2 necessary card devices (hdmi, headphones).

Is this related to missing X blob in the EFI firmware? They only ship fixup4.dat and start4.elf and the ones from raspi-firmware (fixup4x.dat and start4x.elf) are not compatible with EFI.

I tried with

Code: Select all

/etc/modprobe.d/snd_bcm2835.conf 
options snd_bcm2835 enable_headphones=1
options snd_bcm2835 enable_hdmi=1
options snd_bcm2835 enable_compat_alsa=0
and the inverse whitch is supposed to work well with pulseaudio

Code: Select all

/etc/modprobe.d/snd_bcm2835.conf 
options snd_bcm2835 enable_headphones=0
options snd_bcm2835 enable_hdmi=0
options snd_bcm2835 enable_compat_alsa=1

Code: Select all

/boot/efi/config.txt 
arm_64bit=1
enable_uart=1
uart_2ndstage=1
enable_gic=1
armstub=RPI_EFI.fd
disable_commandline_tags=1
disable_overscan=1
device_tree_address=0x1f0000
device_tree_end=0x200000
dtoverlay=miniuart-bt
dtoverlay=vc4-fkms-v3d
hdmi_drive=2
dtparam=audio=on

Japp
Posts: 1
Joined: Tue Feb 23, 2021 3:07 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Tue Feb 23, 2021 3:45 pm

It also not support 3440 * 1440 screen resolution only 2560*1080, but XFCE only uses 1920 x 1080 with black edges hmm?

andrewufrank
Posts: 5
Joined: Sat Mar 08, 2014 11:34 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Fri Feb 26, 2021 9:46 pm

I installed following the advice. writing the ESP partition on a linux computer was a bit tricky. (rufus on linux would be appreciated!). here my approach:
- in a new directory unpack the two packages necessary (net install iso and UEFI firmware)
- with gparted initiallize the ssd with gpt and create a partition formated as fat32 of say 600MB; mount it and copy the unpacked files to it.
- use gparted to set the esp flag on the partition.
- add a second partition - which will be where the installed deb os will reside.
connect. the installation will start.
I use advanced installer and select the 'manual' method to select the partition for installation.

the network was not properly connected, but the installation ran through minimally. when it rebooted, it had only one entry in sources.list for the security updates. after adding the regular debian mirror for bullseye, i could update/upgrade.

great work to make a regular debian installation possible! thank you!

User avatar
alx.manpages
Posts: 6
Joined: Sun Dec 27, 2020 6:23 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Fri Feb 26, 2021 10:39 pm

otalado wrote:
Fri Feb 19, 2021 9:22 am
Well, the idea that cloned SSD is not working because of possible missing quirks settings, went into the recycle bin. I've 'liberated' HDD drive from somewhere and cloned the USB key to it. Sadly, it fails on the boot the i.e. with >>>Start PXE over IPV4., same way as with SSD. So something with GRUB settings is not OK??
I tried something similar:

Instead of having the installer in the same flash drive where I was going to install, I tried to have two pendrives, one for the installation (initially containing the ESP partition with the firmware, and an empty partition for the installation), and one for the installer (containing both the installer and the firmware) (a similar scenario to a desktop PC where the installer and the installed drives are different). It failed with the same error as you. I did that to try to have a flash drive available always to be used as an installer for several RPis to be installed.

So yes, it looks like there's something wrong.

andrewufrank
Posts: 5
Joined: Sat Mar 08, 2014 11:34 am

no support for dual monitors - Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Fri Feb 26, 2021 10:57 pm

I have used the receipt to install a Debian MATE desktop; it was all smooth sailing - no surprises (and a nice welcome screen!).
I hoped that the *vanilla* installation would give me dual monitors - as is current with Debian MATE (and other desktops) on the amd64 platform; unfortunately the vanilla installation drives only one monitor. I understand that RPi4 requires some special tweaks, but both the RaspianOS and the ubuntu RPi4 (for 64bit) allow 2 monitors.

What are tweaks necessary? what additional software is required? Any suggestions highly appreciated!

tpprynn
Posts: 25
Joined: Fri Apr 19, 2013 5:47 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Sat Feb 27, 2021 9:46 pm

Would it be a bad suggestion to say that screenshots of the procedure might be helpful? I've used Linux since 2008 and Debian excusively for three years but have not successfully got anywhere with this. I'm thinking something very simple went wrong or that something about the image downoaded was the problem but if I coud see someone else's desktop/ file manager at the points where the disk has the operating system on it things might become clear.

When I switch the Pi on it still wants the SD card, stalls at the bootloader, it's not seeing either of the disks I've used, both a Sandisk 32gb USB3 pendrive and a Samsung SSD connected to one of the USB 3 ports. The pendrive is from a reputable source. (I gather the guide was specifically for using pendrives but I thought I'd additonally try the SSD as it was present and not being put to use.)

My English is good eough to understand directions, I think, but a couple of iimages would speak better at this point. For all I know the wrong stuff is on the disk, for whatever reason. I've used Rufus before to install Windows 10 and to install Linux distros when getting round UEFI felt like The Krypton Factor, so its workings are familiar.

Overall, whether my issue here sounds familiar or not my main point is regarding the possible value of adding screenshots.

Thanks.

botpet
Posts: 1
Joined: Thu Mar 04, 2021 1:34 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Thu Mar 04, 2021 2:20 am

I had the same problem as otalado and alx.manpages. Everything goes well (except networking during installation) and after I reboot I have a working Vanilla Debian 11 on a USB stick, network and all. Then I clone the stick to an SSD and I try to boot, but it fails, most of the time after it loads the kernel and tries to load initramfs image. I tried four different enclosures and three different SSDs, and always the same thing. I googled a lot and read a lot until i found the cause and solution on the official Debian wiki for Raspberry Pi4 (https://wiki.debian.org/RaspberryPi4) deep down at "Root file system on a USB disk" section:
Many USB3 enclosures (especially with jmicron chip) do not work with uas. To make them work find out the device/vendor id with lsusb and add usb-storage.quirks=152d:9561:u to your kernel command line (replace 152d:9561 with your device/vendor id).
So, to quickly find out if you have the same problem, connect your SSD in the USB enclosure to a working Debian (or other) Linux and run:
lsusb -t | grep uas

Code: Select all

dejan@rpi4:~$ lsusb -t | grep uas
    |__ Port 6: Dev 6, If 0, Class=Mass Storage, Driver=uas, 5000M
If you see Driver=uas then run lsusb | grep 'Device 006' , just replace 006 with whatever the number you see next to Dev above

Code: Select all

dejan@rpi4:~$ lsusb | grep 'Device 006'
Bus 004 Device 006: ID 152d:1561 JMicron Technology Corp. / JMicron USA Technology Corp. JMS561U two ports SATA 6Gb/s bridge
Note "152d:1561". That is what you have to supply in the kernel parameters usb-storage.quirks=152d:1561:u
Now, boot you RPI4 from the working USB stick and edit /etc/default/grub file and change the following line:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet"
to:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet usb-storage.quirks=152d:1561:u"
Of course, use the device ID that you found via lsusb. Save it and run:

Code: Select all

dejan@rpi4:~$ sudo update-grub
[sudo] password for dejan: 
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-3-arm64
Found initrd image: /boot/initrd.img-5.10.0-3-arm64
Adding boot menu entry for EFI firmware configuration
done
Now clone the USB stick onto an SSD, resize the ext4 partion and file system, connect it to your RPI4 and boot. If you run again lsusb -t, you will find that drvier is now usb-storage, not uas. Here is another useful link from this foum:
"STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this"viewtopic.php?t=245931
Enjoy the speed!

LinAdmin
Posts: 9
Joined: Sat Jan 09, 2021 5:35 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Fri Mar 19, 2021 5:22 pm

Looking at the past weeks in this thread I get the impression that this approach still does not allow to have good sound output at headphones and HDMI?

Any clues how to get sound with Debian 11?

Bf546
Posts: 4
Joined: Sun Mar 17, 2019 2:01 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Mon Mar 22, 2021 3:58 pm

Thank you for this guide!

I used the UEFI firmware version 1.24 and the bullseye image from March 15th.

Issues I ran into:
- The installer told me I didn't have a dhcp server on the network which is ridiculous. I skipped the networking portion.
- After Debian was installed I couldn't boot it. Had to go into the UEFI firmware, boot management, and add my install as a boot option.
- /etc/network/interfaces only had an entry for loopback so added enabcm6e4ei0 and configured it for DHCP
- Needed to edit the apt sources.list and add a mirror for bullseye. Removed the cdrom entries.
- Normally when installing Debian I uncheck every package option except for SSH server. However since the installer was unable to configure the network properly I was only presented with "standard system utilities" which I never select anyway. No big deal, just needed to apt install ssh.

I now have a clean minimal system. Thank you!

LinAdmin
Posts: 9
Joined: Sat Jan 09, 2021 5:35 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Wed Mar 24, 2021 10:18 am

@Bf546:
Sorry for ranting, but IMHO that guide is badly broken and not really supported because after 5 days I did not get a single answer regarding sound.

Does your "clean minimal system" have good sound??

User avatar
Akeo
Posts: 59
Joined: Wed Aug 14, 2019 7:17 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Wed Mar 24, 2021 11:28 am

The reason you didn't get an answer is because this is an installation guide, and sound (or any other non-critical device) support has nothing to do with it.

The guide has a complete paragraph titled "What about other Pi 4 devices that aren't supported yet?", which is 100% relevant to your question, so please read it. If you can't live without sound support, then please work with the Debian/kernel maintainers to get it supported, because this is squarely out of scope of this topic, that, again, only relates to installing Debian and not to fixing kernel drivers that don't work yet.
Last edited by Akeo on Wed Mar 24, 2021 12:44 pm, edited 1 time in total.

Bf546
Posts: 4
Joined: Sun Mar 17, 2019 2:01 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Wed Mar 24, 2021 12:32 pm

@LinAdmin

I haven't tested sound, video, Xorg, or any of the hundreds of desktop environments/window managers. I have zero interest in ruining a perfectly good server OS with these things.

User avatar
butchkemper
Posts: 136
Joined: Sat Jul 22, 2017 8:03 pm
Location: Sachse, Tx. Dallas is a nearby suburb of Sachse.

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Thu Mar 25, 2021 8:06 pm

andrewufrank wrote:
Fri Feb 26, 2021 9:46 pm
I installed following the advice. writing the ESP partition on a linux computer was a bit tricky. (rufus on linux would be appreciated!). here my approach:
- in a new directory unpack the two packages necessary (net install iso and UEFI firmware)
- with gparted initiallize the ssd with gpt and create a partition formated as fat32 of say 600MB; mount it and copy the unpacked files to it.
- use gparted to set the esp flag on the partition.
- add a second partition - which will be where the installed deb os will reside.
connect. the installation will start.
I use advanced installer and select the 'manual' method to select the partition for installation.

the network was not properly connected, but the installation ran through minimally. when it rebooted, it had only one entry in sources.list for the security updates. after adding the regular debian mirror for bullseye, i could update/upgrade.

great work to make a regular debian installation possible! thank you!
The Debian Installer is missing the mdio-bcm-unimac.ko module which prevents the Pi4 ethernet connection from being activated. I solved the problem by letting the Installer complete and then copying mdio-bcm-unimac.ko from /lib/modules/5.10.0-5-arm64/kernel/drivers/net/mdio/ on the SSD to a usbstick. I then started the Net Install process over from the beginning:
  • Using rufus to rebuild the Net Install on the SSD
  • Booted the SSD on the Pi and continued until the dhcp error occurred.
  • Used the keyboard Alt-F2 to open an console:
  • Made a mount-point directory at /media/usbstick and mounted the usbstick.
  • cd /lib/modules/5.10.0-5-arm64/kernel/drivers/net/mdio/
  • cp -p /media/usbstick/mdio-bcm-unimac.ko ./
  • Use insmod mdio-bcm-unimac.ko to install the module in the kernel.
  • Used the keyboard Alt-F1 to return to the installation process and selected go-back to restart the network configuration process.
Once the missing module was installed in the kernel, the Net Install system could access the network and properly complete the installation.

The Debian Weekly image dated 2021-03-15 still has the problem.

Butch

LinAdmin
Posts: 9
Joined: Sat Jan 09, 2021 5:35 pm

Several PI4 kernels and root partitions selected in Grub menu?

Tue Mar 30, 2021 9:20 pm

I just wonder if there is a possibility to select in Grub menu various Pi4 kernels with different config.txt and cmdline?

As far as I understand, config.txt is read before the Grub menu is used?

User avatar
Akeo
Posts: 59
Joined: Wed Aug 14, 2019 7:17 pm

Re: Several PI4 kernels and root partitions selected in Grub menu?

Tue Mar 30, 2021 9:59 pm

LinAdmin wrote:
Tue Mar 30, 2021 9:20 pm
As far as I understand, config.txt is read before the Grub menu is used?

Yes, it is actually read long before any actual ARM boot code executes (since it is processed by VideoCore rather than the ARM CPU), including before the UEFI firmware is loaded and executed. This should actually make sense, since it's config.txt that tells the Raspberry Pi to launch the UEFI firmware, with its armstub=RPI_EFI.fd line.

All this to say that, as far as the Raspberry Pi is concerned, there can only ever be one config.txt that applies once ARM code starts to execute, and if you want a different config.txt, you have no choice but to overwrite the existing one and reboot the platform. Especially, neither GRUB nor the UEFI firmware can alter any of the config.txt that were used for booting, because by the time they run, VideoCore has already processed them.

You can however edit the Linux commandline options in GRUB, or select a different kernel, if that's what you are after. There's plenty of GRUB documentation around that should help you achieve just that. As a matter of fact, the same GRUB configuration that applies to an x86 PC, in terms of adding kernels or kernel options does apply to a Debian installation that was carried out using this guide, as the whole idea is to have the Pi behave in the same was as a UEFI based PC would. In other words, whereas non-UEFI boot of Linux kernel on the Raspberry Pi usually requires editing config.txt to tell which kernel and what kernel options to use, UEFI boot makes all that obsolete, as GRUB (or whatever other UEFI compatible bootloader) will be in charge of defining the kernel and kernel options.

So you should probably forget about Raspberry Pi specific guides, and instead follow PC specific guides if you want to alter your Linux boot configuration...

thatchunkylad198966
Posts: 644
Joined: Thu Jul 04, 2019 10:21 am
Location: UK, Birmingham

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Mon May 10, 2021 3:07 am

Anyone else having issues with the RPI firmware?
I can't select anything and I'm stuck at 3GB RAM.
[NEW] Ubuntu - CM4/RPi4B custom image(s)! XFCE4, LXQt, i3-WM, WireGuard, Samba, Kodi, Latest MESA graphics drivers!

Code: Select all

https://www.raspberrypi.org/forums/viewtopic.php?f=131&t=314419

User avatar
Akeo
Posts: 59
Joined: Wed Aug 14, 2019 7:17 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Mon May 24, 2021 4:42 pm

Just a quick note that the latest Debian weekly testing ISOs (tested with the 2021.05.24 version) now include the fix for the DHCP/missing mdio issue.

This means that the installation described in this guide should work without trouble again, and that the same should apply to the upcoming Debian 11 release.

pinguim86
Posts: 5
Joined: Fri Sep 25, 2020 6:58 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Thu Jun 10, 2021 2:46 am

Trust me,

The hardware with only one type of OS...
You guys that are keeping the organization of RaspiberryPI, are not going in a right direction. The Idea to buy a hardware is to use any operational system.

Trust me. You are not going to the right direction.

I Should be able to use Debian, CentOS, WIndows etc. And not buying an hardware that there is an operational system, and open source, for use it.

Trust me this is no right.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 31210
Joined: Sat Jul 30, 2011 7:41 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Thu Jun 10, 2021 9:33 am

pinguim86 wrote:
Thu Jun 10, 2021 2:46 am
Trust me,

The hardware with only one type of OS...
You guys that are keeping the organization of RaspiberryPI, are not going in a right direction. The Idea to buy a hardware is to use any operational system.

Trust me. You are not going to the right direction.

I Should be able to use Debian, CentOS, WIndows etc. And not buying an hardware that there is an operational system, and open source, for use it.

Trust me this is no right.
Why should we trust your word on this? What are your credentials?

Given that making other distro's work on the Raspberry Pi hardware is down to the maintainers of those distro's, not Raspberry Pi, shouldn't you be talking to them? Talk to Debian, CentOS, Microsoft and ask them if their distro doesn't work on the very popular (i.e. third largest hardware base behind the Mac and the PC) Raspberry Pi hardware, why doesn't it?
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

User avatar
butchkemper
Posts: 136
Joined: Sat Jul 22, 2017 8:03 pm
Location: Sachse, Tx. Dallas is a nearby suburb of Sachse.

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Thu Jun 10, 2021 2:37 pm

pinguim86 wrote:
Thu Jun 10, 2021 2:46 am
Trust me,

The hardware with only one type of OS...
You guys that are keeping the organization of RaspiberryPI, are not going in a right direction. The Idea to buy a hardware is to use any operational system.

Trust me. You are not going to the right direction.

I Should be able to use Debian, CentOS, WIndows etc. And not buying an hardware that there is an operational system, and open source, for use it.

Trust me this is no right.
Please explain how you became the Grand Poobah full of knowledge and wisdom and why your opinions should be valued and trusted over all others.

Butch

kpf
Posts: 20
Joined: Fri Mar 23, 2018 11:20 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Tue Jun 15, 2021 10:17 am

Thanks for posting this guide! I used the 2021-06-14 snapshot netinst image, along with the 1.27 firmware package, to install a system. After reflashing the bootloader to switch to USB MSD boot mode, the process went very smoothly. The only 'hiccup' in the installation process was that the installer claimed one of the system devices needed non-free firmware (brcm/brcmfmac43455-sdio.bin), and I told it to load from the USB drive, but it could not do so. This didn't impact the installation though, the wired Ethernet connection worked just fine.

One small note: in the post-install section about eliminating the 3GB RAM limit, the raspberry logo displayed by the UEFI firmware is now in color, not black-and-white :)

Return to “Debian”