Using the rockyrpi repo with the official aarch64 image?

Hello Rocky people, Raspberry Pi 4B with a clean install of Rocky from the official aarch64 ISO image. (Note this is the download from (https://rockylinux.org/download), not the unofficial SD card image from Skip)

Seems to work nicely (for my purposes anyways) out of the box, with the exception of LAN. I’m using a USB ethernet dongle as a workaround. I understand the onboard Ethernet gained support with kernel 5.9 or thereabouts.

I have the “rockyrpi” repo enabled, which provides a 5.15 kernel:

[root@raspi ~]# yum repolist 
repo id            repo name
appstream          Rocky Linux 8 - AppStream
baseos             Rocky Linux 8 - BaseOS
epel               Extra Packages for Enterprise Linux 8 - aarch64
epel-modular       Extra Packages for Enterprise Linux Modular 8 - aarch64
extras             Rocky Linux 8 - Extras
powertools         Rocky Linux 8 - PowerTools
rockyrpi           Rocky Linux 8 - Rasperry Pi
[root@raspi ~]#

5.15 kernel is installed from the rockyrpi repo:

 [root@raspi ~]# dnf list installed | grep rockyrpi
raspberrypi2-firmware.aarch64                      5.15.34-v8.1.el8                                          @rockyrpi  
raspberrypi2-kernel4.aarch64                       5.15.21-v8.1.el8                                          @rockyrpi  
raspberrypi2-kernel4.aarch64                       5.15.34-v8.1.el8                                          @rockyrpi  
raspberrypi2-kernel4-devel.aarch64                 5.15.34-v8.1.el8                                          @rockyrpi  
[root@raspi ~]# 

[root@raspi ~]# ls /boot
bcm2710-rpi-2-b.dtb
bcm2710-rpi-3-b.dtb
bcm2710-rpi-3-b-plus.dtb
bcm2710-rpi-cm3.dtb
bcm2710-rpi-zero-2.dtb
bcm2711-rpi-400.dtb
bcm2711-rpi-4-b.dtb
bcm2711-rpi-cm4.dtb
bcm2837-rpi-3-a-plus.dtb
bcm2837-rpi-3-b.dtb
bcm2837-rpi-3-b-plus.dtb
bcm2837-rpi-cm3-io3.dtb
bootcode.bin
config-4.18.0-348.20.1.el8_5.aarch64
config-4.18.0-348.23.1.el8_5.aarch64
config-4.18.0-372.9.1.el8.aarch64
config-kernel-5.15.21-v8.1.el8.inc
config-kernel-5.15.34-v8.1.el8.inc
config-kernel.inc
COPYING.linux-5.15
dtb-4.18.0-348.20.1.el8_5.aarch64
dtb-4.18.0-348.23.1.el8_5.aarch64
dtb-4.18.0-372.9.1.el8.aarch64
efi
fixup4cd.dat
fixup4.dat
fixup4db.dat
fixup4x.dat
fixup_cd.dat
fixup.dat
fixup_db.dat
fixup_x.dat
grub2
initramfs-0-rescue-381a682739f04fe3a1a29c9eea0842eb.img
initramfs-4.18.0-348.20.1.el8_5.aarch64.img
initramfs-4.18.0-348.23.1.el8_5.aarch64.img
initramfs-4.18.0-372.9.1.el8.aarch64.img
initramfs-5.15.21-v8.1.el8.img
initramfs-5.15.34-v8.1.el8.img
kernel-5.15.21-v8.1.el8.img
kernel-5.15.34-v8.1.el8.img
kernel8.img
LICENCE.broadcom
loader
overlays
start4cd.elf
start4db.elf
start4.elf
start4x.elf
start_cd.elf
start_db.elf
start.elf
start_x.elf
symvers-4.18.0-348.20.1.el8_5.aarch64.gz
symvers-4.18.0-348.23.1.el8_5.aarch64.gz
symvers-4.18.0-372.9.1.el8.aarch64.gz
System.map-4.18.0-348.20.1.el8_5.aarch64
System.map-4.18.0-348.23.1.el8_5.aarch64
System.map-4.18.0-372.9.1.el8.aarch64
vmlinuz-0-rescue-381a682739f04fe3a1a29c9eea0842eb
vmlinuz-4.18.0-348.20.1.el8_5.aarch64
vmlinuz-4.18.0-348.23.1.el8_5.aarch64
vmlinuz-4.18.0-372.9.1.el8.aarch64
[root@raspi ~]#

However these 5.15 kernels are not showing in the GRUB boot menu. Only the default 4.18 kernels are listed. Under /boot/loader/entries/ there are only files for the 4.18 kernels, none for 5.15:

[root@raspi ~]# ls -l /boot/loader/entries/
total 16
-rw-r--r--. 1 root root 405 Jun 16  2021 381a682739f04fe3a1a29c9eea0842eb-0-rescue.conf
-rw-r--r--. 1 root root 373 Mar 12  2022 381a682739f04fe3a1a29c9eea0842eb-4.18.0-348.20.1.el8_5.aarch64.conf
-rw-r--r--. 1 root root 373 Apr 29  2022 381a682739f04fe3a1a29c9eea0842eb-4.18.0-348.23.1.el8_5.aarch64.conf
-rw-r--r--. 1 root root 358 May 17  2022 381a682739f04fe3a1a29c9eea0842eb-4.18.0-372.9.1.el8.aarch64.conf
[root@raspi ~]#

Does anyone have experience with this, and know how to get the entries created for these optional 5.15 kernels? I suspect the missing GRUB entries are due to missing the corresponding 5.15 files under /boot/loader/entries/, and I believe the reason those entry files are not being created may be due to the non-standard naming convention of the 5.15 kernel and initrd files? See the outputs above, the filenames follow a different convention. I believe the OS may be searching for vmlinuz-* and therefore not recognizing them?

Any help resolving this is much appreciated.

Guess Rocky Linux just isn’t a very popular OS for the Rpi. That’s unfortunate.

@skip77 or pgreco would need to chime in as they help maintain these bits.

Welp, I’m a few months too late, so I completely missed this lol.

The short answer to this has to do with the differences between the RockyRpi image and doing an install from the “default” Rocky aarch64 ISO (or cloud image).

By default, the Raspberry Pi doesn’t use GRUB at all. It has a very minimal on-board bootloader, and is designed to boot from a very simple static text file. This file is /boot/cmdline.txt in the RockyRpi image, and it loads that “raspberrypi2-kernel4” kernel, along with bundled firmware.

I don’t believe this kernel package will boot from GRUB - maybe with heavy custom modification it could, but certainly not by default. This is the chief difference between the Rocky Rpi image and stock Rocky aarch64: no GRUB, and the custom kernel package. Everything else should be identical - standard aarch64 repositories.

1 Like

Oh, I forgot a couple of things!

The TLDR is that if you just want to run Rocky Linux on the Raspberry Pi (home server, media player, etc. etc.), you should probably use the Rocky Raspberry Pi specific image (downloadable from the main website: https://rockylinux.org/alternative-images )

If you want to work towards building a better “standard” Rocky aarch64 image that runs across a variety of ARM devices, then you can start by doing what you’ve done - getting stock Rocky Linux booting on the RPi. And hopefully talking/sharing your progress on Rocky Linux chat ( https://chat.rockylinux.org , channel “SIG/AltArch” ).

Dev team member @Sherif is working along these lines, and has made some progress towards a more universal image. It’s good to swap tips, workarounds, etc. - there are a lot of technical hurdles to overcome if you go this route. Many things don’t work correctly (yet!).

Sorry for the long-winded explanation, I hope it helps.

-Skip

@skip77 Thank you for the detailed explanation, this clears it up nicely. IMO my confusion came about because nowhere (that I could find anyways) is this rockyrpi repo labeled “For use ONLY with the Raspberry Pi Image, and NOT with a vanilla aarch64 installation”. It would go a long ways I think to add this disclaimer somewhere very visible.

I should have also added that I’m using the UEFI firmware available here for the Rpi4. My vanilla aarch64 installation has been super straightforward and trouble free. The install went exactly as you’d expect from an x86 system. dd the ISO image to a thumb drive, boot from it, installer launches automatically, everything just works. Perhaps having the UEFI firmware is key to this trouble free experience, booting via grub, etc. whereas I’m guessing the RockyRpi Image contains just the OS and does not include or require the UEFI firmware?

Also worth noting, I did try out an Alma 9 installation on my Pi4 and then used this conversion script here to convert the install into Rocky. It too appeared to work seamlessly, completed without error, and produced what appears to be a very clean running Rocky 9 system.

Finally, with the release of Rocky 9, the newer kernels from the rockyrpi repo are no longer relevant to me, so I’ll mark this one as “resolved”. I really just wanted the newer kernel for the onboard Pi4 ethernet driver, which Rocky 9 includes by default. I’m happily running Rocky 9 vanilla aarch64 install now, and everything seems to just work as expected, very happy with this experience now.

Cheers