The Radxa Zero can definitely be set up to boot from USB storage / using a SSD. You can do this trick using both the eMMC and an SD card. Given that the board also has a quad-core processor you can actually make a tiny and pretty powerful server setup with something like this achieving pretty impressive I/O speeds for such a small package.
In this guide I’ll show you how to set up SSD booting on the Radxa Zero using their official Debian operating system. Let’s get started!
The StarTech USB31CSAT3CB is a USB-C 2.5″ SATA adapter that is perfect for plugging into boards that only have USB-C ports without having to use additional adapters
The Radxa Zero comes in the form factor of the Raspberry Pi Zero but is upgraded to USB-C and a quad-core CPU. Available with RAM options of 1/2/4GB and eMMC options of 8/16/32/64/128GB.
The Geekworm copper heat sink set is designed to fit many different single board computers. It uses thermal conductive adhesive which many “cheap” heat sink kits for SBCs don’t have. Eliminates hot spots and reduces throttling. Can be further enhanced by powered cooling over the heat sinks.
Preparing SD Card / eMMC
First you should have a completely working installation on a SD card of the OS that you would like to use. I used the official Debian desktop image for this guide (recommended) so if your partitions are different it may be your flavor of Linux and need slightly altered instructions.
If you have an already working installation you want to move to your SSD you can use this as well most likely.
You should completely update first with:
sudo apt update && sudo apt full-upgrade
I will be using a SD card for this guide. The method itself will work fine though with the eMMC as well. Just make sure you get the right device paths (/dev/mmcblk1 vs. /dev/mmcblk2, use lsblk to see which ones are actively in use and mounted as /).
First we are going to completely remove all partitions from the drive so it’s completely blank. Your drive should typically be /dev/sda:
sudo gdisk /dev/sda
Now remove all partitions from the device. If you press “p” it will print out the partitions. You can then use “d” to delete them.
Here’s an example on mine:
radxa@radxa-zero:~$ sudo gdisk /dev/sda [sudo] password for radxa: GPT fdisk (gdisk) version 1.0.6 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): p Disk /dev/sda: 488397168 sectors, 232.9 GiB Model: CT250MX200SSD1 Sector size (logical/physical): 512/4096 bytes Disk identifier (GUID): E983E937-26E4-494E-BCD9-A8CA673A8F52 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 2048, last usable sector is 250069646 Partitions will be aligned on 2048-sector boundaries Total free space is 2566799 sectors (1.2 GiB) Number Start (sector) End (sector) Size Code Name 1 61440 585727 256.0 MiB EA00 bootfs 2 585728 247562239 117.8 GiB 8300 Command (? for help): d Partition number (1-2): 1 Command (? for help): d Using 2 Command (? for help): w Warning! Secondary header is placed too early on the disk! Do you want to correct this problem? (Y/N): Y OK; writing new GUID partition table (GPT) to /dev/sda. The operation has completed successfully.
Keep pressing d until all the partitions are deleted. Once they are gone use the ‘w’ command to write your changes.
Cloning Installation to SSD
We’re now ready to clone your installation to the SSD. We can now copy your drive to the SSD with the following command:
cat /dev/mmcblk1 > /dev/sda
Wait for the operation to complete (there won’t be any output but you will have a cursor again and be able to type new commands). Remember that you are copying an entire drive from one to another basically with that one command.
Mine took about 30-45 minutes (although I was using a 64GB SD card and the larger SD card you use the longer it will take to copy the whole drive).
If you are having any trouble with permissions try becoming “root” first with:
Now try running the command again and as the superuser you should not encounter any permission errors.
Change SD card’s rootfs UUID
We need to change our SD card’s UUID so that it doesn’t try to boot from that partition. We can set it to a random one with the following command:
sudo tune2fs -O metadata_csum_seed -U random /dev/mmcblk1p2
We can verify that it has changed with blkid like this:
root@radxa-zero:/home/radxa# sudo blkid /dev/mmcblk1p1: LABEL_FATBOOT="config" LABEL="config" UUID="4917-99FE" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="b6724908-01" /dev/mmcblk1p2: LABEL="rootfs" UUID="d23a0a20-87b7-47e6-ad8f-a89ae736d289" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b6724908-02" /dev/sda1: LABEL_FATBOOT="config" LABEL="config" UUID="4917-99FE" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="b6724908-01" /dev/sda2: LABEL="rootfs" UUID="215a8efd-1276-4faa-a223-30a89609b9a9" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b6724908-02"
Notice that /dev/sda2 and /dev/mmcblk1p2 no longer have matching UUIDs. This is exactly what we want.
Change SSD’s boot UUID
Next we are going to change the boot partition’s UUID on the SSD. This will make it so that the mounted /boot folder inside your operating system actually mounts the SD card (which is your actual boot loader in this configuration).
First make sure you have mtools with:
sudo apt install mtools -y
Now we can change the UUID with:
sudo mlabel -N aaaa1111 -i /dev/sda1 ::
You can verify these are different using the same sudo blkid command as the previous section.
Before we reboot run fsck on the drive like this:
sudo fsck -yf /dev/sda2
This will prevent you from having to run fsck on the CLI the first time you try to boot.
Reboot and Verify
Now reboot the Radxa Zero with:
With any luck you should be booted using your SSD! We can verify this with the mount command like this:
radxa@radxa-zero:~$ mount /dev/sda2 on / type ext4 (rw,relatime) systemd-1 on /config type autofs (rw,relatime,fd=48,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=1975) /dev/mmcblk1p1 on /config type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro,x-systemd.automount) radxa@radxa-zero:~$
Here we can see that our root partition (/) is indeed on /dev/sda2 and not /dev/mmcblk1p2. We can also see that my /boot folder is properly mounted is /dev/mmcblk1p1 (the SD card or eMMC which is serving as our boot loader). Success!
You can verify the performance of your SSD on Pi Benchmarks using the following command:
sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash
Here are the results:
Category Test Result HDParm Disk Read 31.72 MB/s HDParm Cached Disk Read 31.42 MB/s DD Disk Write 33.6 MB/s FIO 4k random read 6259 IOPS (25036 KB/s) FIO 4k random write 6243 IOPS (24975 KB/s) IOZone 4k read 10203 KB/s IOZone 4k write 10552 KB/s IOZone 4k random read 9269 KB/s IOZone 4k random write 11154 KB/s Score: 2,912
This is quite the improvement over my SD card score of 1,049 from my Radxa Zero review. I definitely recommend this for anyone who needs to get higher storage performance out of the Radxa Zero!
Note that it’s USB 2.1 performance so it’s definitely not as high as some other boards can hit. It’s still 3x the speed of a SD card though so I’d say it’s still worth it!
The eMMC on the other hand is faster. If you have a big enough eMMC it may not be worth SSD booting at all (at least for performance reasons). It may make more sense to just attach the SSD and mount it.
No matter what your use case is though this should give you the option to SSD boot if it makes the most sense for what you are trying to do!
Don’t miss my Radxa Rock 5B review here
I’ve written a review about the Rock Pi 4C Plus here