Enabling DeviceTree on Pi 4 4 GB causes boot to fail, it hangs at dracut.initqueue

Hello,
what can I do to investigate failing boot when on DeviceTree on Pi 4 is activated:

It boots well if only ACPI is activated, ACPI+Devicetree and Devicetree cause the boot to fail.
It throws things like:

  • dracut.initqueue
  • Warning: dracut.initqueue: starting timeout scripts
  • /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fdsik\x2fby-uuid\x2f2be-46c03-0a30-4de3-8caf-e442e8d4a31e.sh

I know that Bios support print screens via Ctr-Alt-F12 but no idea where they are stored on FCOS.

Which version of the Raspberry Pi 4 UEFI Firmware Image you are using?

I tested the latest recommended v1.38 release and it works as expected from the EDK2 Firmware: GPIO via DeviceTree description in the docs.

VERSION=v1.34 # use latest one from Releases · pftf/RPi4 · GitHub

it did quite late in the night :sleepy: only copy & paste, so I’m on 1.34.

Can we fix it from within FCOS or do I need to rerun the installer?

  1. Mount $FCOSEFIPARTITION as described in the docs.
  2. Remove everything except the EFI directory and its contents.
  3. Repeat the steps in the docs to write the firmware to the SD card.

Sounds like a plan :sunglasses:, how can check firmware version after boot?

The UEFI firmware version is displayed on the main screen. I’m not sure if it can be checked after boot/login.

EDIT: Actually you can with the hostnamectl status command.

1 Like

can I write to system with toolbox?

unzip is not part of FOCS
normal toolbox cannot write to system.

Tried sudo toolbox create but lost connection (power supply was loose)
Doing it now on Raspberry OS

for reference how to clear the FCOSEFIPARTITION

sudo rm /tmp/FCOSEFIpart/*.*
sudo rm -rf /tmp/FCOSEFIpart/firmware
sudo rm -rf /tmp/FCOSEFIpart/overlays	
ls /tmp/FCOSEFIpart/
EFI

sorry still failing, even on another Pi

I was able to update the firmware to 1.38 using Raspberry OS

photo of Bios

here is the output as I failed in the first run (maybe I forgot something)

raspi@raspberrypi:~ $ FCOSEFIPARTITION=$(lsblk $FCOSDISK -J -oLABEL,PATH  | jq -r '.blockdevices[] | select(.label == "EFI-SYSTEM")'.path)
raspi@raspberrypi:~ $ mkdir /tmp/FCOSEFIpart
raspi@raspberrypi:~ $ sudo mount $FCOSEFIPARTITION /tmp/FCOSEFIpart
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.
raspi@raspberrypi:~ $ ^C
raspi@raspberrypi:~ $ systemctl daemon-reload
Reload daemon failed: Method call timed out
raspi@raspberrypi:~ $ sudo mount $FCOSEFIPARTITION /tmp/FCOSEFIpart
mount: /tmp/FCOSEFIpart: /dev/sda2 already mounted on /tmp/FCOSEFIpart.
       dmesg(1) may have more information after failed mount system call.
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.
raspi@raspberrypi:~ $ pushd /tmp/FCOSEFIpart
/tmp/FCOSEFIpart ~
raspi@raspberrypi:/tmp/FCOSEFIpart $ VERSION=v1.38
raspi@raspberrypi:/tmp/FCOSEFIpart $ sudo curl -LO https://github.com/pftf/RPi4/releases/download/${VERSION}/RPi4_UEFI_Firmware_${VERSION}.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 3310k  100 3310k    0     0   986k      0  0:00:03  0:00:03 --:--:-- 1475k
raspi@raspberrypi:/tmp/FCOSEFIpart $ sudo unzip RPi4_UEFI_Firmware_${VERSION}.zip
Archive:  RPi4_UEFI_Firmware_v1.38.zip
  inflating: RPI_EFI.fd              
  inflating: bcm2711-rpi-4-b.dtb     
  inflating: bcm2711-rpi-400.dtb     
  inflating: bcm2711-rpi-cm4.dtb     
  inflating: config.txt              
  inflating: fixup4.dat              
  inflating: start4.elf              
   creating: overlays/
  inflating: overlays/miniuart-bt.dtbo  
  inflating: overlays/upstream-pi4.dtbo  
  inflating: Readme.md               
   creating: firmware/
   creating: firmware/brcm/
  inflating: firmware/brcm/brcmfmac43455-sdio.clm_blob  
  inflating: firmware/brcm/brcmfmac43455-sdio.bin  
  inflating: firmware/brcm/brcmfmac43455-sdio.txt  
  inflating: firmware/brcm/brcmfmac43455-sdio.Raspberry  
  inflating: firmware/LICENCE.txt    
  inflating: firmware/Readme.txt     
raspi@raspberrypi:/tmp/FCOSEFIpart $ sudo rm RPi4_UEFI_Firmware_${VERSION}.zip
raspi@raspberrypi:/tmp/FCOSEFIpart $ popd
~
raspi@raspberrypi:~ $ sudo umount /tmp/FCOSEFIpart
raspi@raspberrypi:~ $

It still stops with the same error but that is likely because the connection to the USB died with Devicetree set (even Keyboard is not usable anymore)
I’m booting from SD-Card reader and I guess after finishing with systemd-vconsole-setup.service it tries to pull additional things from storage but as USB is dead, it cannot pull anything from the SD-Card reader.

At the end, it says Warning: /dev/disk/by-uuid/ 2be46c03-0a30-4de3-8caf-e442e8d4a31e does not exist
I cannot enter maintenance as the Keyboard is not available.

photo from boot

That is the root disk:

admin@CoreOS:~$ lsblk --fs
NAME   FSTYPE FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0  erofs                                                                       
sda                                                                                
├─sda1                                                                             
├─sda2 vfat   FAT16 EFI-SYSTEM 7B77-95E7                                           
├─sda3 ext4   1.0   boot       47f701cd-9b40-4673-8e2a-9cbbad8e1439  183.4M    41% /boot
└─sda4 xfs          root       2be46c03-0a30-4de3-8caf-e442e8d4a31e   25.1G    14% /var
                                                                                   /sysroot/ostree/deploy/fedora-coreos/var
                                                                                   /etc
                                                                                   /sysroot

When I put the same SD-Card into the Pi’s own Micro-SD card slot and boot it takes ages but it looks like it goes a bit further but suddenly crashes as the screen turns black. The green LED for disk operation keeps flashing for around another 30 seconds, then only the red LED is on.

I try to get the boot captured, need to get another phone, my camera is not the best one

From my experience, I can say that this probably won’t work at all. You can try an external drive (USB to SATA adapter), but I’ve only had luck with one of those. I’m actually surprised it even boots from an SD card reader.

As stated in several places in the docs, booting can take some time, especially if the card is slow. Booting via U-Boot is faster, although it can be more error-prone and complicated to implement, but maybe you could try it.

you state a range of seconds, I’m talking about of a range of several minutes, what is normal, what is strange :confused:
I use 32 Go Carte microSDXC™ SanDisk Extreme® UHS-I | SanDisk.

It works well as long as System Table Selection = ACPI(image).
To get WiFi working, see Is wifi on ARM64 officially supported? - #20 by barryascott. I did everything in an FCOS booting from a USB SD-Card reader.

It might be simply old enough to be supported by Kernel etc. natively

lsusb
admin@CoreOS:~$ toolbox enter

⬢ [admin@toolbx ~]$ lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub

Bus 001 Device 003: ID 14cd:1212 Super Top microSD card reader (SY-T18)

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I can try this but my Mini-HDMI cable broke yesterday :sob: and I’m far from home but back home on Sunday.


Isn’t more interesting, why USB support is failing as soon as System Table Selection = Devicetree?
Is there any chance to dump a crash report?
I have USB support in BIOS and GRUP.
USB gets lost during EFI stub:

image

Can I configure boot to write to an SD-Card put in the Micro-SD card slot ( mmcblk0)?

the methods

rely on writable media that is nonexistent when USB support fails.

As far as I know, enabling DeviceTree mode in the EDK2 Firmware is only useful if you need to access the Pi’s set of GPIO (general purpose input/output) pins. These pins offer a direct connection to the System on Chip (SoC) at the heart of the Pi, enabling the Pi to communicate with external components and addons known as HATs (Hardware Attached on Top). This functionality is provided out of the box by booting via U-Boot.

Personally, I only use these pins to attach a fan, for which I don’t need to enable DeviceTree mode in the EDK2 menu. So the only way I can check if access to GPIO pins is enabled is to follow the docs.

Some time ago, there was a topic in the FCOS Matrix channel related to booting a Raspberry Pi from an SSD connected via a USB adapter. As I mentioned before, after testing several different ones, the only one the Pi was able to boot from was from an external drive. Similar results were reported by the other person in the conversation. So, as far as I know, it’s not an exact science.

My suggestion would be if you want to get extended Pi functionality, use the dedicated SD card slot and boot via U-Boot. This means preparing the SD card on another system and then moving it to the RPi4 as described in Installing FCOS and Booting via U-Boot.

that is exactly what I need to use my PRaZberry 7 — Z-Wave Extension Board for Raspberry Pi

as I understand the documentation, it shall boot from Pi’s own Micro-SD card slot.
If you use a USB SD card reader, you may be lucky (like me) or unlucky (like you).

I can confirm it boots either way, as long as System Table Selection = ACPI with EDK2 Firmware and combined disk (as described in the docs)
As soon as System Table Selection = Devicetree it fails:

  • USB support is not loaded
  • Screen turns suddenly black and boot stops when booting from Pi’s own Micro-SD card slot

When I can a replacement for my Mini-HDMI Cable I can test with U-Boot


I still have a 16GB SanDisk Ultra Fit USB 3.2 Flash Drive | SanDisk and can test that one as well.
EDK2 and U-Boot

This is weird. I just checked again just in case and here is what I got.

Booting via U-Boot using the dedicated SD card slot
Fedora CoreOS 41.20241122.3.0
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://discussion.fedoraproject.org/tag/coreos

Last login: Wed Jan  1 18:50:38 2025 from 172.16.20.12
core@wi-fi-test-rpi4:~$ hostnamectl status 
     Static hostname: wi-fi-test-rpi4.local
           Icon name: computer-desktop
             Chassis: desktop 🖥️
          Machine ID: 5c5ceff211984c778553a0bc812ddfd2
             Boot ID: 8624791150ae423a9afa013195e11153
    Operating System: Fedora CoreOS 41.20241122.3.0   
         CPE OS Name: cpe:/o:fedoraproject:fedora:41
      OS Support End: Mon 2025-12-15
OS Support Remaining: 11month 1w 4d
              Kernel: Linux 6.11.8-300.fc41.aarch64
        Architecture: arm64
     Hardware Vendor: raspberrypi
      Hardware Model: Raspberry Pi 4 Model B Rev 1.4
    Firmware Version: 2024.10
       Firmware Date: Tue 2024-10-01
        Firmware Age: 3month 2d
core@wi-fi-test-rpi4:~$ toolbox enter
⬢ [core@toolbx ~]$ lspci 
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 10)
01:00.0 USB controller: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller (rev 01)
⬢ [core@toolbx ~]$ 
logout
core@wi-fi-test-rpi4:~$ ls -Zlathri /proc/device-tree/ | wc --lines 
43
core@wi-fi-test-rpi4:~$ ls -Zlathri /dev/gpiochip*
 88 crw-------. 1 root root system_u:object_r:gpio_device_t:s0 254, 0 Nov 14 00:00 /dev/gpiochip0
301 crw-------. 1 root root system_u:object_r:gpio_device_t:s0 254, 1 Nov 14 00:00 /dev/gpiochip1
Booting via EDK2 using the dedicated SD card slot
Fedora CoreOS 41.20241122.3.0
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://discussion.fedoraproject.org/tag/coreos

Last login: Thu Jan  2 14:23:20 2025 from 172.16.20.12
core@wi-fi-test-rpi4:~$ hostnamectl status 
     Static hostname: wi-fi-test-rpi4.local
           Icon name: computer-embedded
             Chassis: embedded
          Machine ID: 5c5ceff211984c778553a0bc812ddfd2
             Boot ID: 5a4fd98090c64d4293ecb752796bbf4d
    Operating System: Fedora CoreOS 41.20241122.3.0   
         CPE OS Name: cpe:/o:fedoraproject:fedora:41
      OS Support End: Mon 2025-12-15
OS Support Remaining: 11month 1w 4d
              Kernel: Linux 6.11.8-300.fc41.aarch64
        Architecture: arm64
     Hardware Vendor: Raspberry Pi Foundation
      Hardware Model: Raspberry Pi 4 Model B
    Firmware Version: UEFI Firmware v1.38
       Firmware Date: Wed 2024-08-28
        Firmware Age: 4month 5d
core@wi-fi-test-rpi4:~$ toolbox enter
⬢ [core@toolbx ~]$ lspci 
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 10)
01:00.0 USB controller: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller (rev 01)
⬢ [core@toolbx ~]$ 
logout
core@wi-fi-test-rpi4:~$ ls -Zlathri /proc/device-tree/ | wc --lines 
42
core@wi-fi-test-rpi4:~$ ls -Zlathri /dev/gpiochip*
 88 crw-------. 1 root root system_u:object_r:gpio_device_t:s0 254, 0 Nov 14 00:00 /dev/gpiochip0
303 crw-------. 1 root root system_u:object_r:gpio_device_t:s0 254, 1 Nov 14 00:00 /dev/gpiochip1

Do you want me to try some USB sticks and external devices?

what is really weird is:

  • Device Manager → Raspberry Pi Configuration → Advanced Configuration → System Table Selection → ACPI
    • EDK2: works all fine, boots flawless, besides that lspci is emtpty :party:
    • U-Boot: will do as some as I can connect to the screen again
  • Device Manager → Raspberry Pi Configuration → Advanced Configuration → System Table Selection → DeviceTree
    • EDK2: :skull_and_crossbones:
      • via USB SD-Card Reader: it hangs as it does not load USB Driver, so it cannot find root disk: Warning: /dev/disk/by-uuid/ 2be46c03-0a30-4de3-8caf-e442e8d4a31e does not exist
      • via dedicated SD card slot: don’t know if USB loads, boot log output is too fast, the screen turns black, boot stops
    • U-Boot: will do as some as I can connect to the screen again

Rather not, I don’t how that would help to find the error?


any chance to get the information shown above

toolboxo enter?
Fedora CoreOS 41.20241122.3.0
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://discussion.fedoraproject.org/tag/coreos

Last login: Wed Jan  1 18:50:38 2025 from 172.16.20.12
core@wi-fi-test-rpi4:~$ hostnamectl status 
     Static hostname: wi-fi-test-rpi4.local
           Icon name: computer-desktop
             Chassis: desktop 🖥️
          Machine ID: 5c5ceff211984c778553a0bc812ddfd2
             Boot ID: 8624791150ae423a9afa013195e11153
    Operating System: Fedora CoreOS 41.20241122.3.0   
         CPE OS Name: cpe:/o:fedoraproject:fedora:41
      OS Support End: Mon 2025-12-15
OS Support Remaining: 11month 1w 4d
              Kernel: Linux 6.11.8-300.fc41.aarch64
        Architecture: arm64
     Hardware Vendor: raspberrypi
      Hardware Model: Raspberry Pi 4 Model B Rev 1.4
    Firmware Version: 2024.10
       Firmware Date: Tue 2024-10-01
        Firmware Age: 3month 2d

as they may don’t show when I login via SSH.

I’m not sure I understand the question. It’s a simply copy/paste from the Terminal app window after SSHing into the Pi via a wired connection.

Yes, but I cannot remember that I saw that as I SSH’ed in.
But that could be as I did many relogins as the Pi was running continuously.

all good, did not see this line

back home and eventually all things done, including finding a spare Mini-HDMI cable :slight_smile:

haven’t published EEPROM yet, but here it comes

raspi@raspberrypi:~ $ sudo rpi-eeprom-update
BOOTLOADER: up to date
   CURRENT: Mon 15 Apr 13:12:14 UTC 2024 (1713186734)
    LATEST: Mon 15 Apr 13:12:14 UTC 2024 (1713186734)
   RELEASE: default (/lib/firmware/raspberrypi/bootloader-2711/default)
            Use raspi-config to change the release.

  VL805_FW: Using bootloader EEPROM
     VL805: up to date
   CURRENT: 000138c0
    LATEST: 000138c0
Booting via EDK2 using the dedicated SD card slot
Fedora CoreOS 41.20241122.3.0
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://discussion.fedoraproject.org/tag/coreos
Last failed login: Sun Jan 5 20:30:03 UTC 2025 from 10.10.20.53 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Thu Nov 14 00:01:31 2024
admin@CoreOS:~$ hostnamectl status
     Static hostname: CoreOS
           Icon name: computer-embedded
             Chassis: embedded
          Machine ID: 7494c4a083794392a88d344aea15982c
             Boot ID: 49c09aed4d2d40e8856daa4098fdef8d
    Operating System: Fedora CoreOS 41.20241122.3.0   
         CPE OS Name: cpe:/o:fedoraproject:fedora:41
      OS Support End: Mon 2025-12-15
OS Support Remaining: 11month 1w 1d
              Kernel: Linux 6.11.8-300.fc41.aarch64
        Architecture: arm64
     Hardware Vendor: Raspberry Pi Foundation
      Hardware Model: Raspberry Pi 4 Model B
    Firmware Version: UEFI Firmware v1.38
       Firmware Date: Wed 2024-08-28
        Firmware Age: 4month 1w 2d
admin@CoreOS:~$ toolbox enter
⬢ [admin@toolbx ~]$ lspci
⬢ [admin@toolbx ~]$

Looks like we have slightly different hardware

  1. yours:
    Hardware Vendor: raspberrypi
    Hardware Model: Raspberry Pi 4 Model B Rev 1.4
    Firmware Version: 2024.10
    Firmware Date: Tue 2024-10-01
    Firmware Age: 3month 2d
    
  2. mine
    Hardware Vendor: Raspberry Pi Foundation
    Hardware Model: Raspberry Pi 4 Model B
    Firmware Version: UEFI Firmware v1.38
    Firmware Date: Wed 2024-08-28
    Firmware Age: 4month 1w 2d
    

What are the improvements in Raspberry Pi 4B revision 1.2 and revision 1.4? - Raspberry Pi Forums
Differences Raspberry Pi4 model B 4GB rev 1.2 and Pi4 model B 4GB rev 1.4 - Raspberry Pi Forums

As already mentioned, you can try Installing FCOS and Booting via U-Boot.

I did a last test with EDK2 + Devicetree using the dedicated SD card slot to provide Debugging kernel crashes using kdump :: Fedora Docs.

It boots up :scream_cat:, GPIO are found, I can reach it via SSH but conenction to screen and USB dies. NumLock Key cannot be turned on/off but the Raspi-Keyboard-Mouse-Combo gets powered as the laser of the mouse is on.

I added sudo dmesg and sudo journalctl, plus a video of the boot process.
Hope it helps to find the root cause of lossing USB and monitor output.

Seems like firmware is not loading usb driver
admin@CoreOS:/var/tmp$ sudo dmesg | grep error
[    2.546916] usb 1-1: device descriptor read/all, error -11
[    2.814811] usb 1-1: device descriptor read/all, error -11
[    3.250025] usb 1-1: device descriptor read/8, error -11
[    3.377345] usb 1-1: device descriptor read/8, error -11
[    3.621705] usb 1-1: device descriptor read/8, error -11
[    3.739597] usb 1-1: device descriptor read/8, error -11
[    6.311747] bcm2835-dma fe007000.dma: probe with driver bcm2835-dma failed with error -12
[   18.125338] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin failed with error -2
Booting via EDK2 + Devicetree using the dedicated SD card slot, this time `lspci` si not empty
Fedora CoreOS 41.20241122.3.0
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://discussion.fedoraproject.org/tag/coreos

Last login: Wed Jan  8 18:22:31 2025 from 10.10.20.17
admin@CoreOS:~$
admin@CoreOS:~$ hostnamectl status
     Static hostname: CoreOS
           Icon name: computer-embedded
             Chassis: embedded
          Machine ID: 7494c4a083794392a88d344aea15982c
             Boot ID: cff3667c5c5146ba948749afa611af21
    Operating System: Fedora CoreOS 41.20241122.3.0   
         CPE OS Name: cpe:/o:fedoraproject:fedora:41
      OS Support End: Mon 2025-12-15
OS Support Remaining: 11month 5d
              Kernel: Linux 6.11.8-300.fc41.aarch64
        Architecture: arm64
     Hardware Vendor: Raspberry Pi Foundation
      Hardware Model: Raspberry Pi 4 Model B
    Firmware Version: UEFI Firmware v1.38
       Firmware Date: Wed 2024-08-28
        Firmware Age: 4month 1w 5d
admin@CoreOS:~$ toolbox enter
⬢ [admin@toolbx ~]$ lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20)
01:00.0 USB controller: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller (rev 01)
⬢ [admin@toolbx ~]$
admin@CoreOS:~$ ls /proc/device-tree/ | wc -l
39
admin@CoreOS:~$
admin@CoreOS:~$ ls /dev/gpiochip*
/dev/gpiochip0 /dev/gpiochip1
admin@CoreOS:~$

I’ll test Installing FCOS and Booting via U-Boot on the weekend, when I can spare enought time.


How can I figour out if and what external hardware is on the GPIO, I added PRaZberry 7 — Z-Wave Extension Board for Raspberry Pi