Libre “Renegade” SSD Booting Guide

Libre Computers "Renegade" SSD Boot Guide
Libre Computers “Renegade” SSD Boot Guide

The ROC-RK3328-CC Firefly “Renegade” by Libre Computers is a $50 single board computer. You actually get USB 3.0 with the “Renegade” which is going to make it even more worth it to use a SSD with than the “Le Potato”.

This method requires a sacrificial SD card to serve as the bootloader. After booting though it will use your SSD for the system’s root filesystem. We will then benchmark it to measure the improvement/gains.

In this guide I’ll walk you through the process. Let’s get started!

Hardware Used

Libre Computers "Renegade"
Libre Computers “Renegade” ROC-RK3328-CC Firefly

The ROC-RK3328-CC Firefly “Renegade” from Libre Computers is a very powerful RockChip based single board computer. The “Renegade” features 2G of DDR4 RAM, USB 3.0, a quad-core ARM Cortex-A53 CPU, a Mali-450 GPU and 1 USB 3.0 port!

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.sg*

StarTech 2.5" SATA Adapter
StarTech 2.5″ SATA Adapter

The StarTech USB 3.1 to 2.5″ SATA adapter is one I have recommended for many years for use with all kinds of devices including the Raspberry Pi, Orange Pi, ODROID, Libre “Renegade” and Tinker Board. It’s widely compatible and works with gaming consoles as well.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Sabrent Powered USB Hub
Sabrent Powered USB Hub

The Sabrent powered USB hub delivers a whopping 2.5A of dedicated power for your USB attached devices. It will easily power the most thirsty of setups such as NVMe enclosures.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.uk*, Amazon.es*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*

Note: Make sure Amazon doesn’t try to take you to the non-powered version and that it’s the one with the AC adapter that plugs in to provide extra power

Preparing SD Card

First you should have a completely working installation on a SD card of the OS that you would like to use. I used Armbian 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

If you are using a different package manager then update the image however you need to for your distribution.

Preparing SSD

Now we are going to connect your SSD to the “Renegade”. First we are going to completely remove all partitions from the drive so it’s completely blank. If you only have one drive plugged into the “Renegade” (and nothing else) this should be /dev/sda.

sudo fdisk /dev/sda

Now remove all partitions from the device. If you press “p” it will print out the partitions. Here’s an example on mine:

root@renegade:~# sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: CT250MX200SSD1  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x39524a4b

Device     Boot Start       End   Sectors  Size Id Type
/dev/sda1        8192 123469824 123461633 58.9G 83 Linux

Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

If you get an error that the device was busy don’t worry. After unplugging and replugging the SSD the partition table will be clear.

Once the drive is all cleared off you’re ready for the next step.

Cloning Installation to SSD

We’re now ready to clone your installation to the SSD. If you don’t have the eMMC attached your current root filesystem should be /dev/mmcblk0p1 (or /dev/mmcblk1p1 on some operating systems, check ls /dev or blkid).

We can now copy your drive to the SSD with the following command:

cat /dev/mmcblk0 > /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). It may take several minutes or longer. You are copying an entire drive from one to another basically with that one command.

Mine took about 30-40 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:

sudo su

Now try running the command again and as the superuser you should not encounter any permission errors.

Change SD card’s UUID

Now unplug the SSD and plug it back in. 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 -U random /dev/mmcblk0p1

We can verify that it has changed with blkid like this:

root@renegade:~# sudo blkid
/dev/mmcblk0p1: LABEL="armbian_root" UUID="c2a8cffc-9d4a-4629-b408-6f56332e03f6" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="910ca03c-01"
/dev/sda1: LABEL="armbian_root" UUID="72f42008-24a6-466f-bc3b-1690902fd466" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="910ca03c-01"
/dev/zram0: UUID="12a7b136-4351-4fff-bc39-956516fb2ae1" TYPE="swap"
/dev/zram1: LABEL="log2ram" UUID="d5ec015b-2be5-4877-8d01-128563a2eb1e" BLOCK_SIZE="4096" TYPE="ext4"

Notice that /dev/sda1 and /dev/mmcblk0p1 no longer have matching UUIDs. This is exactly what we want.

Run fsck

Before we reboot run e2fsck on the drive like this:

sudo e2fsck -yf /dev/sda1

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 “Renegade” with:

sudo reboot

With any luck you should be booted using your SSD! We can verify this with the mount command like this:

root@renegade:~# mount
/dev/sda1 on / type ext4 (rw,noatime,errors=remount-ro,commit=600)
/dev/sda1 on /var/log.hdd type ext4 (rw,noatime,errors=remount-ro,commit=600)
/dev/zram1 on /var/log type ext4 (rw,relatime,discard)

Here we can see that our root partition (/) is indeed on /dev/sda1 and not /dev/mmcblk0p1. Success!

Testing Performance

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

SD Card Test

To show the improvement between having a SD card rootfs and having a SSD rootfs I did a before test here with the SD card:

     Category                  Test                      Result     
HDParm                    Disk Read                 64.24 MB/s               
HDParm                    Cached Disk Read          57.55 MB/s               
DD                        Disk Write                22.3 MB/s                
FIO                       4k random read            3574 IOPS (14299 KB/s)   
FIO                       4k random write           261 IOPS (1047 KB/s)     
IOZone                    4k read                   12437 KB/s               
IOZone                    4k write                  2926 KB/s                
IOZone                    4k random read            12402 KB/s               
IOZone                    4k random write           3148 KB/s                

                          Score: 1,361                                        

SSD Test

     Category                  Test                      Result     
HDParm                    Disk Read                 305.13 MB/s              
HDParm                    Cached Disk Read          239.02 MB/s              
DD                        Disk Write                115 MB/s                 
FIO                       4k random read            23432 IOPS (93729 KB/s)  
FIO                       4k random write           12190 IOPS (48761 KB/s)  
IOZone                    4k read                   20588 KB/s               
IOZone                    4k write                  25046 KB/s               
IOZone                    4k random read            16739 KB/s               
IOZone                    4k random write           31967 KB/s               

                          Score: 7,656

You may view the full “Renegade” benchmark on Pi Benchmarks for this guide here.

Wow, that’s quite a dramatic improvement. We went from 1,361 to 7,656. That’s nearly a 5x increase! You can also look at the raw IOPS and MB/s numbers on HDParm and the various test categories if you are more familiar with those to see the improvement.

Conclusion

Even though we are limited to USB 2.0 bus speeds we can still achieve about 3.5x the performance of the SD card using a SSD with a USB to 2.5″ SATA adapter. This is definitely worthwhile as it was on boards like the Raspberry Pi 3 that had USB 2.0 as well.

I haven’t tested the eMMC modules for the “Renegade” yet because they are currently out of stock on Amazon. I do plan on testing these when they become available.

Using a SSD is the best upgrade you can give your single board computer. With the USB 3.0 ports available on this board it’s extra worth it!

Other Resources

If you are moving from a Raspberry Pi to a “Renegade” see my Raspbian Portability Tool for Libre Boards Guide

Definitely don’t miss my full “Renegade” ROC-RK3328-CC Firefly SBC review here

You may also be interested to see my Libre Computers “Le Potato” Review

Make sure to check out my ODROID XU4Q review which includes eMMC tests and benchmarking

All of my single board computer reviews are available here

Subscribe
Notify of
guest

31 Comments
Inline Feedbacks
View all comments
Dan Reynolds
Dan Reynolds
1 year ago

I followed your instructions and it worked perfectly. Except I had the bright idea to update/upgrade after I moved over.
It seemed to be OK. It reboots, I see the Armbian start up screen and then it gets stuck running a script:
Loading, please wait...
Starting systemd-udcvd version 252.6-1
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... (initramfs)

It doesn’t act dead… There is network activity and the “red” light is blinking.
I’m using lates version of Armbian Bookworm.
My eventual goal is to try Plex.
It should be OK to update/upgrade the SSD after you move it right?

Nicole
Nicole
1 year ago

Hi! I’m getting an error when trying to assign a random number to my SD card’s UUID:

tune2fs: Bad magic number in super-block while trying to open /dev/mmcblk1p1
/dev/mmcblk1p1 contains a vflat file system labeled ‘system-boot’

Is there any way around this? I tried to execute as a super user as well to no avail.

Mike R
Mike R
1 year ago

James, I’m running the libre Raspberry pi OS on my Renegade and followed the directions on this page. My drive was successfully cloned, and after running fsck (from the debian SSD directions you linked to in your reply to Nicole), everything ended up looking good. But, no joy on reboot. Do I need to use mlabel to change the SD card UUID as well as the SDA, similar to the debian instructions?
Thanks for the help!
Cheers,
Mike

Mike
Mike
1 year ago

James,
Here’s the lsblk after rebooting without the SSD attached, then plugging it back in. I’ll probably try the Libre flash tool that they mentioned in your reddit post.

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 256M 0 part
└─sda2 8:2 0 7G 0 part
mmcblk1 179:0 0 7.2G 0 disk
├─mmcblk1p1 179:1 0 256M 0 part /boot/efi
└─mmcblk1p2 179:2 0 7G 0 part /

Mike
Mike
1 year ago

James,
I ran the tool but had the same problem mentioned in the reddit discussion– no wifi on reboot. I edited /etc/network/interfaces but still had no luck. I run my Renegade headless, so I’m not sure if it’s actually booting my SSD correctly or not. Next step is to boot it with a monitor and see what it does that way. The tool seems to work pretty well though- my wpa_supplicant.conf on the flashed SD card had my correct network settings at least. More to follow!

Mike R
Mike R
1 year ago

So, it would not boot at all with the SSD. But, after replacing the SSD with the original SD card (that was cloned to the SSD) in a USB stick adapter, the renegade booted right up from the Libre flash tool built SD card. SO… I’m going to start over with the SSD and build it from scratch with the Libre Raspbian lite, then see if that works (then reload the BirdNET-Pi software on it, which is the whole point anyway.)

Anyway, thanks for all the help, fingers crossed for the next try, haha!

Doug
Doug
1 year ago

James, What are your thoughts on using this as a standalone retro gaming system using an emulator?

John Moulton
John Moulton
1 year ago

Have a Libre renegade. The usb ports aren’t putting out any power to my LCD display when the Libre is powered (red and green LEDs on).

Trying to determine if the problem is the boot os on my ssd card or a bad Libre.

Do the USB devices output power regardless of a proper bootable OS on the SSD? Or do the USBs only get powered when the OS successfully boots?

Ian
Ian
1 year ago

When using the cat command to clone to the SSD, do I cat the entire drive (like cat /dev/mmcblk1 > /dev/sda) , or just the partition with the root filesystem (like cat /dev/mmcblk1p2 > /dev/sda) ?

You use the former command in the codeblock, but your previous sentence makes it sound like I should use the latter command. Just wanted to clarify before attempting this.

Thanks a lot for the guide!

Frederico
Frederico
1 year ago

Hi James,

I was wondering how safe it is to perform the cat operation from a running system?

A cursory Google search suggests that it could be troublesome for running databases, such as the one supporting Pi-Hole and other common projects that run on these devices.

Do you stop any services before running this type of clone? Do you have any experience using rpi-clone or similar tools?

I was looking for an existing tool that facilitates rebooting into a ramdisk-based OS that would allow cloning using cat without fear of potential disk corruption, but sadly did not find anything.

Thanks,
Frederico

Mike Tupker
Mike Tupker
1 year ago

How would you go about expanding the partition? I tried the below steps, but just ended up at an initramfs prompt.

apt install cloud-utils
growpart /dev/sda 1
resize2fs /dev/sda1

Mike Tupker
Mike Tupker
1 year ago

I’m using Armbian on the renegade. I got the ssd working and expanded, but I’m not 100% sure what that initial issue was. I “think” I was trying to power the device with an under-powered power supply. I tried swapping out the supply after a few other attempts and it worked. I’m going to be looking around on amzn for something better to power a cluster. If I run into issues again I’ll take a look at your suggestion.

Oscar James
Oscar James
1 year ago

Hi James,

Can you tell me if this process can be run on a Renegade running Raspbian from an SD?

I am wanting to clone the running OS from SD to an eMMC. The Libre guides all seem to require a Linux environment and although there are mentions that it might work from MacOS, your guide here seems like it might be the more straight forward method (assuming it were possible!).

Thanks for your time.
Oscar

Oscar James
Oscar James
1 year ago

Thanks James, that’s great.

Unfortunately I was copying from a 32GB Sd to a 16GB eMMC. I anticipated this might be a problem but thought I’d go through the motions and begin again from a 16GB Sd if things went awry. I stupidly neglected to erase the eMMC again when the clone failed and my Renegade now defaults to the eMMC which I am unable to SSH into.

Live and learn I guess. I think if I had a potato I could rectify the situation but from here it looks like the eMMC module is toast.

Thanks for your time.
Oscar

Oscar James
Oscar James
1 year ago

Thanks James,

I was aware of this process I just don’t have the time nor mental capacity right now to apply myself to such a critical and delicate procedure (as evidenced by my neglecting to delete the failed clone before regrouping). Having said that, the eMMC shows as 14.6GB so a 16GB SD card would likely have presented with the same problem as the 32GB and I would probably have made the same mistake the second time so there’s no saving it really.

I reaslise the module isn’t bricked but it is effectively unusable until I can apply myself to nutting out the Firefly solution which is probably not until the end of the year at this point.

Thanks for your guides and for taking the time to reply!

Best regards,
Oscar

Oscar James
Oscar James
1 year ago

Hi James.

Just to cap it all off (or attempt to) I’ve been in touch with the seller, LoverPi, who directed me to a Libre forum post on rebinding of the eMMC module.

Apparently you can attach the module after booting to the SD card and the rebind with the codes detailed in this post https://hub.libre.computer/t/emmc-re-detection-by-driver-re-binding/150

Just another option to the mix, it might be useful to someone. I’ll give it a try when I can find an 8GB micro Sd that might be fast to boot an OS.

Thanks again.

Best regards,
Oscar