# 2023 Unmatched Rev B boot from NVME

**URL:** <https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373>\
**Category:** HiFive Unmatched\
**Created:** [January 7, 2024, 12:44am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373 "2024-01-07T00:44:06Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [January 7, 2024, 12:44am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/1 "2024-01-07T00:44:06Z")

</div>

Recently purchased an Unmatched Rev B (2023) and have been trying to get ubuntu installed on the system.

I downloaded the image from the ubuntu-based link. Will the address post below in the reply section.

Specifically under “Preinstalled server image” option

- " [RISC-V for SiFive HiFive Unmatched preinstalled server image]"

The image was downloaded to the microSD card provided with the unmatched system. I burned the image to the NVME device using the sifive instructions provided [here](https://sifive.cdn.prismic.io/sifive/f81e5848-875e-4ae1-baff-09057743d3a5_hifive-unmatched-sw-reference-manual-v1p1.pdf) (boot from NVME section).

The instructions say that you need to mount the boot partition and modify `extlinux/extlinux.conf` - I’ve mounted that drive and there is no file at the path `extlinux/extlinux.conf`. In fact, the only partition with the path is the `/root` partition. The instructions claim that u-boot checks for this file when the system starts to find out where it needs to look for a kernel.

So, I doubled back to the instructions from the ubuntu team. They claim all you need to do is modify `extlinux/extlinux.conf` on the `/root` partition and run the `u-boot-update` command and all is good. A link is provided [here](https://ubuntu.com/tutorials/how-to-install-ubuntu-on-risc-v-hifive-boards#4-installing-ubuntu-to-an-nvme-drive-only-for-unmatched).

I’m unsure of this claim and it gives me the impression that the instructions from sifive are for folks that want to boot from NVME and the instructions from ubuntu are for folks that are ok with a microSD boot that switches over to NVME.

My first question is the above impression correct? Next question, if this is correct, then is the lack of the correct path on the boot partition mean the 22.04.3 version of ubuntu broken? If that is the case, should I move up to ubuntu 23?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [January 7, 2024, 12:44am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/2 "2024-01-07T00:44:50Z")

</div>

The ubuntu image address → [Ubuntu 22.04.3 LTS (Jammy Jellyfish)](https://cdimage.ubuntu.com/releases/22.04/release/?_ga=2.265955727.1867669144.1703263811-2123105564.1702837790)

---

<div class="post-metadata">

**Author:** ![JimWilson](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@JimWilson](https://forums.sifive.com/u/JimWilson)\
**Post date:** [January 7, 2024, 3:56pm UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/3 "2024-01-07T15:56:09Z")

</div>

Different linux distros can put things in different places. So the fact that the extlinux.conf path is different doesn’t matter. The SiFive instructions are correct for the OpenEmbedded images that they produce. The Ubuntu instructions are correct for Ubuntu.

You can’t boot without the SDcard. The board will run u-boot from the SDcard, and then u-boot can optionally use either an SDcard root or a NVMe root depending on the extlinux.conf contents. In theory, the only thing you need on the SDcard is the u-boot partition if you have an NVMe root.

---

<div class="post-metadata">

**Author:** ![drmpeg](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/drmpeg/32/1301_2.png) [@drmpeg](https://forums.sifive.com/u/drmpeg)\
**Post date:** [January 8, 2024, 12:36am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/4 "2024-01-08T00:36:03Z")

</div>

Either you’re not looking in the correct partition, or you didn’t transfer the image to the nvme drive correctly. Here’s some tips.

You can mount the .img file on your x86 Linux box and see what’s on it. First, show the partitions.

```plaintext
$ fdisk -l ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img
Disk ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img: 4.51 GiB, 4831838208 bytes, 9437184 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1FFAD53A-DA06-4DAA-96B2-7D6029A8F4E0

Device Start End Sectors Size Type
ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img1 235520 9437150 9201631 4.4G Linu
ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img12 227328 235519 8192 4M Linu
ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img13 34 2081 2048 1M HiFi
ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img14 2082 10239 8158 4M HiFi
ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img15 10240 227327 217088 106M EFI 

Partition table entries are not in disk order.

```

Then mount the first partition using the correct offset.

```plaintext
$ sudo mount -t ext4 -o loop,offset=$((235520 * 512)) ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img /mnt

```

Then you can look at the contents.

```plaintext
$ cd /mnt
$ ls
bin dev home lost+found mnt proc run snap sys usr
boot etc lib media opt root sbin srv tmp var
$ cd boot
$ ls
config-5.19.0-1021-generic initrd.img.old
efi System.map-5.19.0-1021-generic
extlinux vmlinuz
initrd.img vmlinuz-5.19.0-1021-generic
initrd.img-5.19.0-1021-generic vmlinuz.old
$ cd extlinux/
$ ls
extlinux.conf

```

Hope this helps.

---

<div class="post-metadata">

**Author:** ![drmpeg](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/drmpeg/32/1301_2.png) [@drmpeg](https://forums.sifive.com/u/drmpeg)\
**Post date:** [January 8, 2024, 12:57am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/5 "2024-01-08T00:57:51Z")

</div>

Also, if you transferred the image correctly, you should have 5 partitions on your nvme drive. It should look like this (except you won’t have mtdblock0 and the mountpoints will be on mmcblk0). Then you would want to mount partition nvme0n1p1.

```plaintext
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 32M 0 disk 
mmcblk0 179:0 0 29.7G 0 disk 
├─mmcblk0p1 179:1 0 29.6G 0 part 
├─mmcblk0p12 259:0 0 4M 0 part 
├─mmcblk0p13 259:1 0 1M 0 part 
├─mmcblk0p14 259:2 0 4M 0 part 
└─mmcblk0p15 259:3 0 106M 0 part 
nvme0n1 259:4 0 465.8G 0 disk 
├─nvme0n1p1 259:5 0 465.6G 0 part /
├─nvme0n1p12 259:6 0 4M 0 part 
├─nvme0n1p13 259:7 0 1M 0 part 
├─nvme0n1p14 259:8 0 4M 0 part 
└─nvme0n1p15 259:9 0 106M 0 part /boot/efi

```

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [January 9, 2024, 4:48am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/6 "2024-01-09T04:48:17Z")

</div>

point taken, just noticed references to openembedded. thanks

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [January 9, 2024, 4:49am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/7 "2024-01-09T04:49:12Z")

</div>

thank you, I’ll be walking through this process tomorrow. will report back hopefully with a success story soon!

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [February 1, 2024, 3:33am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/8 "2024-02-01T03:33:16Z")

</div>

After some delay, I’ve noticed the following situation when booting ubuntu from the following image: `ubuntu-23.04-preinstalled-server-riscv64+unmatched.img.xz`

This is an attempt at booting from `/dev/nvme0p1`

It looks like the device tree file name is corrupted. Note the string `<NULL>-` is being placed as a subdirectory when the system expects to see `sifive/`.

Scanning nvme 0:1…  
Found /boot/extlinux/extlinux.conf  
Retrieving file: /boot/extlinux/extlinux.conf  
793 bytes read in 1 ms (774.4 KiB/s)  
U-Boot menu  
1: Ubuntu 23.04 6.2.0-19-generic  
2: Ubuntu 23.04 6.2.0-19-generic (rescue target)  
Enter choice: 1  
1: Ubuntu 23.04 6.2.0-19-generic  
Retrieving file: /boot/initrd.img-6.2.0-19-generic  
119701050 bytes read in 126 ms (906 MiB/s)  
Retrieving file: /boot/vmlinuz-6.2.0-19-generic  
42211840 bytes read in 46 ms (875.1 MiB/s)  
append: root=/dev/nvme0n1p1 ro efi=debug earlycon sysctl.kernel.watchdog\_thresh=60  
Retrieving file: /lib/firmware/6.2.0-19-generic/device-tree/`<NULL>-`hifive\_unmatched\_fu7  
Failed to load ‘/lib/firmware/6.2.0-19-generic/device-tree/`<NULL>-`hifive\_unmatched\_fu7’  
Skipping l0 for failure retrieving fdt

---

<div class="post-metadata">

**Author:** ![drmpeg](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/drmpeg/32/1301_2.png) [@drmpeg](https://forums.sifive.com/u/drmpeg)\
**Post date:** [February 1, 2024, 12:14pm UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/9 "2024-02-01T12:14:05Z")

</div>

Looks like a u-boot problem. I’m going to guess you’re still using the SD card that came with the board. I would try burning the Ubuntu 23.04 image onto another SD card and use that instead. Then you’ll have a more up to date u-boot.

The board is sensitive to SD cards. Another SanDisk 32 GB would be ideal.

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [February 1, 2024, 1:44pm UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/10 "2024-02-01T13:44:12Z")

</div>

Yep, I’m using the sifive provided microSD card and am following the nvme bring up instructions provided in the user manuals for the unmatched from the sifive site.

The sifive documentation for nvme bring up refences a version of ubuntu that isnt available on the ubuntu servers any more (~ubuntu-21). This maybe an indication the version sifive provides had some issue (maybe this one?) which resulted in that version being taken down (ubuntu 20, 22, 23 are still on their servers…so they skipped a version that has documentation?).

So the sifive card boots but cant be used to bring up other distros.

Alright, looks like I’ll have to snag another microSD card and work this process from scratch.

Thanks for the assistance and recommendations!

---

<div class="post-metadata">

**Author:** ![drmpeg](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/drmpeg/32/1301_2.png) [@drmpeg](https://forums.sifive.com/u/drmpeg)\
**Post date:** [February 1, 2024, 9:44pm UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/11 "2024-02-01T21:44:13Z")

</div>

Just FYI, the installation instructions for NVME is the same for all versions of Ubuntu except for the very latest, 23.10. With 23.10, they’ve switched from extlinux to EFI boot.

You can switch back to extlinux on 23.10 with a little trickery.

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [February 1, 2024, 9:55pm UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/12 "2024-02-01T21:55:40Z")

</div>

thanks, I decided to go with this image off the ubuntu site: ubuntu-22.04.3-preinstalled-server-riscv64+unmatched.img.xz

ended up flashing the microSD with the new image and am in the process of getting the image flashed to nvme. will have updates soonish.

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [February 2, 2024, 2:52am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/13 "2024-02-02T02:52:22Z")

</div>

good news. everything worked! flashed the microSD with that specific image, downloaded the image again, dumped the image to nvme, modified extlinux.conf as per the instructions and the system and it everything seems like it’s in order.

The device hits microSD and redirects to nvme to load the kernel.

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [February 2, 2024, 2:53am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/14 "2024-02-02T02:53:09Z")

</div>

@drmpeg Are the instructions under “Use NVME as root filesystem” at this link how you get rid of the microSD card boot dependency?

> <https://github.com/carlosedp/riscv-bringup/tree/master/unmatched>
>
> //github.com/carlosedp/riscv-bringup/tree/master/unmatched

---

<div class="post-metadata">

**Author:** ![drmpeg](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/drmpeg/32/1301_2.png) [@drmpeg](https://forums.sifive.com/u/drmpeg)\
**Post date:** [February 2, 2024, 3:25am UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/15 "2024-02-02T03:25:35Z")

</div>

No, that’s about creating your own rootfs. If you want to get rid of the SD card, you have to burn u-boot into the the SPI flash. The instructions are here:

> [@Booting from Flash](https://forums.sifive.com/t/booting-from-flash/5104/20):
>
> I think it can be done, at least with Ubuntu 22.04. First, download the latest u-boot .deb file. [http://launchpadlibrarian.net/593560393/u-boot-sifive\_2022.01+dfsg-2ubuntu2\_riscv64.deb](http://launchpadlibrarian.net/593560393/u-boot-sifive_2022.01+dfsg-2ubuntu2_riscv64.deb) Then extract the .deb with dpkg-deb. dpkg-deb -x u-boot-sifive\_2022.01+dfsg-2ubuntu2\_riscv64.deb /tmp The files will be in /tmp/usr/lib/u-boot/sifive\_unmatched/ Load the MTD block driver. sudo modprobe mtdblock And then write the flash. sudo sgdisk -g --clear -a 1 \ --new=1:40:2087 --change-name=…

---

<div class="post-metadata">

**Author:** ![ct.clmsn](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ct.clmsn](https://forums.sifive.com/u/ct.clmsn)\
**Post date:** [February 12, 2024, 10:23pm UTC](https://forums.sifive.com/t/2023-unmatched-rev-b-boot-from-nvme/6373/16 "2024-02-12T22:23:06Z")

</div>

thanks!
