Starting with Ubuntu 22.04 a server install image is made available. This topic describes how to use the image for an installation on the NVMe drive of an SiFive HiFive Unmatched board.
The release image will be available at https://cdimage.ubuntu.com/releases/22.04/release/.
Daily build images are provided at https://cdimage.ubuntu.com/ubuntu-server/daily-live/current/.
A general overview of the installation process is available at https://ubuntu.com/tutorials/install-ubuntu-server.
Download the image either using your web browser or with
Extract the image.
gzip -d jammy-live-server-riscv64.img.gz
Copy the image to an SD card with
sudo dd if=jammy-live-server-riscv64.img of=/dev/sdX bs=1M conv=fsync
/dev/sdX with the device-name of your SD card reader. Keep extra care not to overwrite your host system installation.
As of Ubuntu 22.04 the server install image already contains a U-Boot installation for the Unmatched board on the SD card. It may be removed in later releases. The U-Boot binaries for the Unmatched board are available in package u-boot-sifive.
Establish a serial console connection to the Unmatched board. You can use picocom for this.
sudo apt-get install picocom sudo picocom -b 115200 /dev/ttyUSB1
Insert the SD card and power up the system.
If no prior operating system installation exists, U-Boot will start up GRUB on the SD card.
Otherwise press the enter key when seeing the
Hit any key to stop autoboot: message and execute:
load mmc 0:1 $fdt_addr_r dtb/sifive/hifive-unmatched-a00.dtb load mmc 0:1 $kernel_addr_r EFI/boot/bootriscv64.efi bootefi $kernel_addr_r $fdt_addr_r
Reading from the SD card is very slow. Loading the installer takes several minutes. Once it is loaded follow the installation steps in https://ubuntu.com/tutorials/install-ubuntu-server.
When the installation is finished reboot the board without removing the SD card.
U-Boot does not allow the operating system to write UEFI variables. We have to do this manually. While rebooting press the enter key when seeing the
Hit any key to stop autoboot: message. The following commands set up the installation on the NVMe drive as UEFI boot option 0001.
pci enum nvme scan efidebug boot add -b 0001 'Ubuntu Jammy' nvme 0:1 /EFI/ubuntu/grubriscv64.efi efidebug boot order 0001
To boot into your fresh installation you can use:
On the next boot U-Boot will automatically start into GRUB.