Score:0

Ubuntu Core & Raspberry Pi Zero 2 W

bg flag

I'm trying to run Ubuntu Core 20 on Raspberry Pi Zero 2 W.

According to Install Ubuntu on RPi this should work without a problem when using the 32bit version. Or with 64bit version using following procedure Ubuntu Server support for Zero 2 W.

I tried both options but my RPi Zero 2 W refuses to bootup -> according to LED code 7x blinks this means it's unable to find kernel.img.

Can I ask if someone has some idea or procedure on how to fix this?

Boot SD Card structure:

Folder PATH listing for volume ubuntu-seed
Volume serial number is 3227-A7E8
F:.
├───uboot
│   └───ubuntu
├───snaps
├───overlays
├───.disk
└───systems
    └───20210630
        ├───assertions
        ├───snaps
        └───kernel
            └───dtbs
                ├───broadcom
                └───overlays
PS F:\> ls


    Directory: F:\


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         6/30/2021  12:18 PM                uboot
d-----         6/30/2021  12:18 PM                snaps
d-----         6/30/2021  12:18 PM                overlays
d-----         6/30/2021  12:18 PM                .disk
d-----         6/30/2021  12:18 PM                systems
-a----         6/30/2021  12:18 PM         791356 start4cd.elf
-a----         6/30/2021  12:18 PM           3176 fixup4cd.dat
-a----         6/30/2021  12:18 PM          47761 bcm2711-rpi-400.dtb
-a----         6/30/2021  12:18 PM          19840 bcm2837-rpi-cm3-io3.dtb
-a----         6/30/2021  12:18 PM            733 config.txt
-a----         6/30/2021  12:18 PM           5429 fixup4.dat
-a----         6/30/2021  12:18 PM           3176 fixup_cd.dat
-a----         6/30/2021  12:18 PM          20933 bcm2837-rpi-3-b-plus.dtb
-a----         6/30/2021  12:18 PM          20513 bcm2837-rpi-3-b.dtb
-a----         6/30/2021  12:18 PM         556936 uboot_rpi_arm64.bin
-a----         6/30/2021  12:18 PM           8436 fixup4x.dat
-a----         6/30/2021  12:18 PM           8440 fixup4db.dat
-a----         6/30/2021  12:18 PM          47733 bcm2711-rpi-cm4.dtb
-a----         6/30/2021  12:18 PM           4638 boot.scr
-a----         6/30/2021  12:18 PM           7301 fixup.dat
-a----         6/30/2021  12:18 PM          47600 bcm2711-rpi-4-b.dtb
-a----         6/30/2021  12:18 PM        2940128 start.elf
-a----         6/30/2021  12:18 PM         791356 start_cd.elf
-a----         6/30/2021  12:18 PM          71191 psplash.img
-a----         6/30/2021  12:18 PM         514944 uboot_rpi_3.bin
-a----         6/30/2021  12:18 PM        4788712 start_db.elf
-a----         6/30/2021  12:18 PM          26277 bcm2710-rpi-cm3.dtb
-a----         6/30/2021  12:18 PM        3716808 start4db.elf
-a----         6/30/2021  12:18 PM            117 cmdline.txt
-a----         6/30/2021  12:18 PM          10288 fixup_db.dat
-a----         6/30/2021  12:18 PM          28587 bcm2710-rpi-3-b-plus.dtb
-a----         6/30/2021  12:18 PM          20064 bcm2837-rpi-3-a-plus.dtb
-a----         6/30/2021  12:18 PM        3698952 start_x.elf
-a----         6/30/2021  12:18 PM          10288 fixup_x.dat
-a----         6/30/2021  12:18 PM        2975368 start4x.elf
-a----         6/30/2021  12:18 PM          52456 bootcode.bin
-a----         6/30/2021  12:18 PM          27968 bcm2710-rpi-3-b.dtb
-a----         6/30/2021  12:18 PM          26470 bcm2710-rpi-2-b.dtb
-a----         6/30/2021  12:18 PM         570336 uboot_rpi_4.bin
-a----         6/30/2021  12:18 PM        2215776 start4.elf
-a----          1/1/2022   7:45 PM          27137 bcm2710-rpi-zero-2.dtb
Folder PATH listing for volume ubuntu-boot
Volume serial number is 25E6-AC61
E:.
├───uboot
│   └───ubuntu
│       ├───pi-kernel_302.snap
│       │   └───dtbs
│       │       ├───broadcom
│       │       └───overlays
│       ├───pi-kernel_376.snap
│       │   └───dtbs
│       │       ├───broadcom
│       │       └───overlays
│       └───pi-kernel_377.snap
│           └───dtbs
│               ├───broadcom
│               └───overlays
└───device
Nmath avatar
ng flag
One of the good things about troubleshooting problems on a raspberry pi is that everyone else with the same model has exactly the same hardware as you. If you are experiencing problems right from the start, you must be doing something wrong. Some of the links you posted are not compatible with each other. Are you sure that you're only following directions for Ubuntu Core 20? Ubuntu Server is a different operating system. Mixing and matching the instructions you are following will cause problems. Can you clarify which OS you are trying to install and which guide you are following?
Roman Janiczek avatar
bg flag
@Nmath First I was going according to https://ubuntu.com/download/raspberry-pi which says that Zero 2 supports a 32bit version (downloaded from there) out of the box - and then using RPi Imager I prepared an SD card with custom image selection. Which didn't work. After that, I tried 64bit using the process described at https://ubuntu.com/blog/raspberry-pi-zero-2-w-with-ubuntu-server-support-is-here -> section How to install Ubuntu Core 20. In both cases, I got kernel.img not found on Zero2W. The card works on RPi4B in both cases but not on Zero2W.
Nmath avatar
ng flag
The instructions in your second link for Ubuntu Core first require that you successfully flash and boot. All of the other information in that link is for Ubuntu Server. The first method is a 3 step process. 1) Download the appropriate image file; 2) flash the image to a SD card; 3) put the card in the raspi and connect power and wait for it to set itself up. Something must be wrong with one of these steps. Did you verify the integrity of the downloaded image? Are you flashing it intact, or did you extract the file? Are you waiting long enough for the initial boot to finish?
Roman Janiczek avatar
bg flag
According to 3 step process I downloaded [32bit version of UC20](https://ubuntu.com/download/raspberry-pi/thank-you?version=20&architecture=core-20-armhf+raspi), used RPi Imager to flash it to SD Card and put it in raspi. I let it be like that for around 20 min but got nothing except 7 blinks LED code. I did not check for the integrity, I'll do that but I don't think that's the reason as it worked in RPi4
Nmath avatar
ng flag
Does the RPi imager also verify the integrity of the flash to SD card? I know that balenaEtcher does, so you might want to try that as well
Roman Janiczek avatar
bg flag
I believe it does. I tried balenaEtcher and got the same problem :/. Integrity check passed OK. Also just noticed that the 32bit image seems to be missing the `rpi-zero-2-w.dtb` file. I'll try to look into this more as it seems that the image is missing some files ?!?
Score:0
pl flag

I had the same issue with the 32 bit Ubuntu Server 20.04.3 LTS. The SD card loaded the OS without issue on an RPI 4. However, Ubuntu Server 21.10 worked on the RPi Zero 2. My guess is you are using the LTS version of core instead of the newer version mentioned in sites like https://9to5linux.com/raspberry-pi-zero-2-w-released-with-ubuntu-server-21-10-support.

Score:0
pl flag

I do not think there is anything wrong with the image. The Ubuntu Core 20 image was made before RPi Zero 2. You can try modifying the boot after install to make it more like Ubuntu Server 21.10, but I think the reference mention of Zero 2 on the website for Core 20 was a mistake.

For example, I followed the guidance at the end of this post, "https://qengineering.eu/install-64-os-on-raspberry-pi-zero-2.html", and I was able to boot 64bit Ubuntu Server 21.10 on my Pi Zero 2.

Roman Janiczek avatar
bg flag
This [link](https://qengineering.eu/install-64-os-on-raspberry-pi-zero-2.html) helped the most. I created `rpi-zero-2-w.dtb` from `bcm2710-rpi-3-b.dtb` file and modified `config` with ```[pi0] kernel=uboot_rpi_3.bin``` and it is now booting OK. We will see how this goes later on if there will be some problems but for now, it works. Thanks a lot ;)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.