Solved Booting to the Pi 4B via GPT & EFI?


Well-Known Member

Reaction score: 49
Messages: 297

I've got a Pi 4B up and running 13.0 on the prebuilt image, but as that was not ideal for me I wanted to move it to another microSD card after making some changes. Namely, I wanted to use ZFS instead of UFS. I followed a guide, adapting where necessary to the Pi, but I didn't notice that the original image used MBR partitioning instead of GPT. As such, I set up the new disk using GPT, and copied the entire contents of the original /boot/msdos directory over to the ESP on the new card (which includes the crutial /EFI/BOOT/bootaa64.efi as well as other files).

Unfortunately, it does not boot. Does the Pi not support booting from GPT partitioned drives, and only support MBR? If so, is there any way to convert from GPT to MBR within FreeBSD, without having to copy all the data over again? If it does support GPT, is there something I'm missing or forgetting to do that's not covered in that guide?

Edit: Wanted to update this as I think I found the issue. First, I made sure the firmware and u-boot were up to date (sysutils/rpi-firmware and sysutils/u-boot-rpi4). I then converted from GPT to MBR (using sysutils/gdisk), though I'm not sure this was actually necessary. Even after all these steps, I still just got the "rainbow" pattern when booting, which most troubleshooting guides will tell you is a problem with the boot loader or firmware. However, I noticed that the LEDs on the Pi were acting different than if it was typically stuck there, so I figured that couldn't be the issue. Finally, I plugged the HDMI cable into the left port (the one closer to the USB-C power port) instead of the right one, and was finally greeted with the FreeBSD console.

As such, it's likely it was booting before, and I just didn't realize it as FreeBSD does not duplicate the output to both displays. I think GPT partitioning might have worked, but I'm not going to convert back to it as I don't want to break anything now that it's working.

Edit2: I've since confirmed that it will boot from a GPT drive.
Last edited: