Raspberry Pi 4 USB Boot
Hey Alpine team,
I'm unable to boot a Raspberry Pi 4 using an Alpine archive extracted onto a USB drive.
For verification, I actually duplicated all of this work exactly, only with an SD Card, and Alpine was able to boot off of the SD Card without issue. However, when only the USB is plugged in following these steps, the Raspberry Pi refuses to boot past the rainbow screen and issues the 7 blinks on the green LED.
Steps to get working bootable SD Card but non-working bootable USB Drive:
- Run live distro with a GUI and GParted (I happened to use a Solus OS and ClearLinux OS I had sitting around)
- Plug in target drive
- Launch GParted
- Select the target drive in GParted
- Remove all existing partitions (if any), write changes
- Create a partition table (I used GPT)
- Create a partition on the drive (I used a size of 4 GBs, formatted as FAT32)
- Set ESP and Boot flags on partition created in latter step
- Write changes
- Exit GParted
- Download Aarch64 Raspberry Pi Alpine tar
- Mount created partition in (7) to somewhere in
/mnt(I just created a
/mnt/alpinepath and mounted the partition there)
cdinto the mount target folder
cpthe downloaded alpine archive to the current directory
tar xfthe alpine archive
cdout of the mount point
sudo umountthe mounted partition in (7)
- Remove drive
- Plug in drive to Raspberry Pi 4 and boot
Following each of those steps but with an SD Card vs a USB Drive produces the above problematic behavior.
An interesting note:
I found this answer SO:
And though that problem revolves around the SD Card not being bootable, I was able to apply those changes (moving the files in the
boot folder to the
/ folder and modifying
config.txt accordingly) to the USB Drive install and was able to successfully boot from the USB drive.
Which makes me think there was a fix made to allow Alpine to boot from the SD Card but perhaps some configuration was left out to also allow booting from USB?
I'm unfamiliar with how the boot system works on the Raspberry Pi's so I am not confident in going any further in troubleshooting.
Was able to perform a full sys-install on the USB Drive. It looks like after using the sys-install, all the kernel and boot files do reside in
/boot, and everything is working fine and behaving beautifully.
I want to also note the above downloaded Aarch64 Alpine Image came from the Alpine downloads page and was tagged at version 3.14.2. During the sys-install, I chose to enable the
edge apk repos and currently my system is at alpine release