How to switch from bootable device when both are bootable?

I have an old bootable Ubuntu 20 installation on my NVME SSD.
I recently installed Armbian Ubuntu 23 using an bootable SD card by first removing the SSD.
This works and I want to continue using it but as soon as I connect my SSD again it boots from that device.
I tried getting in the BIOS (is this even possible?) or Bootmenu (is this even available?) when booting up using several Fn, ESC, DEL keys but no luck. When both devices are connected I always end up in Ubuntu/SSD.
I want to reformat the SSD and eventually move my Armbian installation to the SSD.
I dont have the possibilty to hook up the SSD on another device and format it there.
Any ideas/help?

This is an arm SBC. There is no BIOS (you can install UEFI but it’s not very ready yet). No such thing as a boot menu unless you make your own.

To get rid of the SSD being preferred, zero (erase) the SPI chip (I assume you have a Rock 5B). You can find the instructions on the Radxa wiki. The SD card will be preferred after this.

I disconnected the SSD, booted from my newly etched SD Armbian installer.
Installed Armbian
Followed the erase instructions: https://wiki.radxa.com/Rock5/install/spi#Simple_method
Basically:
wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz
md5sum zero.img.gz
gzip -d zero.img.gz
md5sum zero.img
ls /dev/mtdblock*
sudo dd if=zero.img of=/dev/mtdblock0
sudo md5sum /dev/mtdblock0 zero.img
(skipped flashing with a new bootloader spi image)
shutdown
install SSD
power on
it still boots from SSD!

1 Like

I am puzzled too.

By SSD if mean m.2 nvme then your not erasing that. The device should be something like /dev/nvme0n1 .

They weren’t trying to erase the SSD but the SPI NOR (which was indeed erased with these commands).

Even if you erase the flash it won’t make a difference. If you try to boot from SD the uboot preference is nvme followed SD, so in the case it stills boot from SSD. You need to physically remove the nvme or build & patch uboot.

This is strange. So why do all the guides say that you need a specific SPI image flashed in order to boot from NVME? Are all guides wrong?

For Radxa uboot there is a PR to prioritise SD but I think you would have build it yourself as I’m not sure it has landed in a release. TBH it would have been more user friendly if Radxa had allocated some gpio pins (with dip switches) for boot options and uboot read those to determine boot media.

Good to know about this topic, because i was starting to doubt my sanity :).

In the end I re-imaged my SD card using the latest Ubuntu server version.

install Etcher https://github.com/balena-io/etcher/releases
setup your SD card using Ubuntu Server from https://github.com/Joshua-Riek/ubuntu-rockchip/releases
I used:
https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v1.32/ubuntu-22.04.3-preinstalled-server-arm64-rock-5b.img.xz

And then follow the 5 steps in this section:

After step 5 remove SD and then reboot, which will be the SSD.

Also my Radxa power supply was flaky because every now and then it rebooted(?) or at least my network connection was dropped. Because I noticed the uptime command output was resetted.
ChatGPT says: " The uptime command typically gives you the time since the last reboot of the system. It does not reset when a network interface goes down and then back up."
so I guess it did reboot!
I then used a different USB-C PD adapter (65W) which supported a higher amp at 5V: 6.6A instead of the Radxa 3A.
I measured 14.4W when stress testing my RockPi5 with SSD.

2 Likes