Booting from SSD

I have installed on my Rock 5A an SSD stick 2280 with 200 GB.
I wonder if it would be possible to boot from that SSD.

How can I do ? Would it possible to simply copying the contents of the SD card to the SSD with the dd command ?
I have already installed on the SD card some applications, and would prefer to not have to reinstall them again.

Bear with me… I am a Linux novice.
Thanks.

  1. how did you install a 2280 SSD on Rock 5A? It doesn’t have the correct M.2 socket.
  2. what is the operating system you are using? The booting is different for Armbian and for the Radxa distributions.

I bought together with the board the optional add-on that has an M.2 socket for the various lengths of SSD sticks.

I flashed on the SD card the Debian image downloadable from the Radxa pages.

TNX.

You need to flash uboot image to the spi nor flash. Armbian has the uboot image supporting spi nor and nvme boot.
Download my uboot build: https://github.com/amazingfate/armbian-rock5b-images/releases/download/20230614-0511/linux-u-boot-rock-5a-legacy_23.08.0-trunk--2017.09-Sbf47-P5cd4-He8c0-V5c7a-Be203_arm64.deb
Extract the deb package using command:

dpkg -x linux-u-boot-rock-5a-legacy_23.08.0-trunk--2017.09-Sbf47-P5cd4-He8c0-V5c7a-Be203_arm64.deb .

You can find the uboot image file at usr/lib/linux-u-boot-legacy-rock-5a_23.08.0-trunk_arm64/rkspi_loader.img
Flash that image under maskrom mode: https://wiki.radxa.com/Rock5/install/spi
Then you can boot armbian which has get dded into your nvme ssd.
Armbian images download: https://imola.armbian.com/dl/rock-5a/archive/

2 Likes

Thanks for your answer. I am a bit confused… (I told you that I am a Linux novice, didn’t I ?)

When you talk about armbian, do you intend the Debian image found here ::
https://github.com/radxa-build/rock-5a/releases/download/b16/rock-5a_debian_bullseye_kde_b16.img.xz
or maybe they are two different things ?

TNX

No, Armbian is “another distribution”. While referred to from Radxa pages, it is not maintained by Radxa. That said, Armbian has some superior features, but might not support all of the HW as good as Radxa images. Your mileage may vary.

1 Like

Thanks. So, I have to ask again, is the a way, using Debian, to boot from the SSD stick, after having copied on it, with dd, the contents of the SD card ?

Yes, as @amazingfate wrote, but it might be necessary to update the u-boot bootloader in the nor flash, see his post.

However, I don’t know if the Radxa Debian image has support for copying the file system from SD to SSD. Armbian has that (and can be a Debian too).

Thanks again. So, if I understand that correctly, I would have to reinstall the SPI flash module below the 5A board, after having flashed on it the modified u-boot loader…and remove the SD card…bear with me, I am slowly making my way through the intricacies of Linux…

Yes, but of course you must somehow copy the files from the SD-CARD to your SSD. Copy ALL partitions. Before you overwrite the Flash, it would be a wise idea to read it out and save the image somewhere … just in case.

1 Like

Hello

I’m trying to flash my Rock 5A but it cannot find the “golden button” used in Rock 5B to enter to Maskrom mode. Does Somebody knows where is it?

Note: I already try to flash it following the “Simple method” but the nothing appear when i try to show the SPI flash (ls /dev/mtdblock*)

The button is not soldered on a 5A, but the pins are still there:

Recovery and Maskrom button pins are between the Audio connector and the left HDMI, Recovery is the top, Maskrom the bottom. As you can see, on some boards (including mine) they are described, but I have seen boards without the text. Nevertheless, you can just short-circuit the pins at boot time.

1 Like

Hello all

I cannot put my Rock 5A in Maskrom however I already can booting from SSD. This is what i did

NOTE: The SSD already must have the OS installed, here is how to do it (you can do it using an USB adapter to the SSD or booting first from microSD )

  1. Booting using MicroSD (I used the oficial version ) and here you can see how to install de OS in a µSD
  2. Open the terminar (CLI) and enable SPI Flash

rsetup

  1. Select “Overlays” (is a warning appers, press enter on “yes”
  2. Then, select “Manage overlays
  3. Press the space bar in your keyboard on “Enable SPI Flash” must be near of Enable SATA0
  4. Press enter and enter again on “OK
  5. Press “esc” key up to exit of rsetup
  6. Reboot your Rock 5A
  7. Open a CLI again and type lsblk now you should see “mtdblock” in the output
  8. Download the SPI clearing file and the ROCK 5A SPI U-Boot image (bootloader)
  9. Extract/uncompress the previous downloaded SPI clearing file and check the integrity of the file (gzip should already be installed otherwise install it):

gzip -d zero.img.gz
md5sum zero.img

it should report back:

2c7ab85a893283e98c931e9511add182 zero.img

  1. Make sure the spi flash is available:

ls /dev/mtdblock*

it should report back:

/dev/mtdblock0

  1. Completely clear the spi flash: (be patient the flash can take 5mins)

sudo dd if=zero.img of=/dev/mtdblock0

  1. Check if the flash was successfully cleared

sudo md5sum /dev/mtdblock0 zero.img

the result should look exactly like this:

2c7ab85a893283e98c931e9511add182 /dev/mtdblock0 2c7ab85a893283e98c931e9511add182 zero.img

  1. Write you desired bootloader to the spi flash *(replace spi-image.img with the name of your downloaded image, should be starts like rock-5a-spi) and just to confirm that all has been written type sync

sudo dd if=spi-image.img of=/dev/mtdblock0
sync

  1. Check if the flash was successfully (replace spi-image.img with the name of your downloaded image again):

sudo md5sum /dev/mtdblock0 spi-image.img

the checksums should be the same again - if not flash the bootloader again .

  1. Shutdown your Rock 5A, remove the microSD card and start it again. Now it must boot from the SSD

Bootloader taken from here (at the end)
Steps to flash the SPI from here