# Boots from ssd kernel does not mount ssd root

**URL:** https://forums.sifive.com/t/boots-from-ssd-kernel-does-not-mount-ssd-root/6439
**Category:** HiFive Unmatched
**Created:** [March 18, 2024, 9:25pm UTC](https://forums.sifive.com/t/boots-from-ssd-kernel-does-not-mount-ssd-root/6439 "2024-03-18T21:25:29Z")
**Posts on this page:** 5
**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: [March 18, 2024, 9:25pm UTC](https://forums.sifive.com/t/boots-from-ssd-kernel-does-not-mount-ssd-root/6439/1 "2024-03-18T21:25:29Z")

</div>

Background:

I’ve an Unmatched Rev B board running ubuntu off SSD.

Issue:

Last Friday the Unmatched Rev B board started up and everything was great. Today, I started the machine and found that it was mounting microSD instead of SSD as the root partition. I connected to the machine using the console cable to diagnose the problem.

The SSD drive is correctly recognized by the system, data on the SSD’s partitions is accessible and mountable. The kernel installed on the SSD drive is correctly boot loaded over UEFI, _but_ the root path ‘/’ is pointing to the microSD and not the SSD drive partition.

I’ve no explanation for what’s going on other than I errored in using the “cloud” distribution offered by Ubuntu. Maybe Ubuntu updated something and broke my environment?

In any event, does anyone have advice on how to move forward in fixing this one? Thanks in advance!

---

<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: [March 21, 2024, 5:55pm UTC](https://forums.sifive.com/t/boots-from-ssd-kernel-does-not-mount-ssd-root/6439/2 "2024-03-21T17:55:56Z")

</div>

I’m not very familiar with the Ubuntu support, but you could try creating another microsd card that has the boot partition but not the root partition. Then booting would have to use the SSD root partition if it works at all. This might be some kind of race condition where it sometimes accidentally sees the microsd root partition before it sees the SSD root partition, and taking the microsd root partition away would prevent this from happening.

---

<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: [March 24, 2024, 9:08pm UTC](https://forums.sifive.com/t/boots-from-ssd-kernel-does-not-mount-ssd-root/6439/3 "2024-03-24T21:08:01Z")

</div>

Probably something with EFI boot. You can switch back to extlinux boot which explicitly defines the root. Here’s how.

1. `sudo apt-get install u-boot-menu`

2. `sudo apt-get purge flash-kernel grub-common`

3. Edit /etc/default/u-boot and change the line:

#U\_BOOT\_ROOT=“”

to:

U\_BOOT\_ROOT=“root=/dev/nvme0n1p1”

1. `sudo u-boot-update`

2. reboot with `sudo shutdown -r`

---

<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: [April 3, 2024, 3:07pm UTC](https://forums.sifive.com/t/boots-from-ssd-kernel-does-not-mount-ssd-root/6439/4 "2024-04-03T15:07:38Z")

</div>

> [@drmpeg](#):
>
> root=/dev/nvme0n1p1

Thanks for the response! Turns out `flash-kernel` and `grub-common` are not installed by default. Looks like ubuntu decided to nuke the contents of `/etc/default/u-boot` and set them back to what can best be described as a “factory default”.

After updating `/etc/default/u-boot` config, `sudo u-boot-update` yields this on the terminal…

```auto
ubuntu@ubuntu:~$ sudo u-boot-update
P: Checking for EXTLINUX directory... found.
P: Writing config for vmlinuz-5.15.0-1018-generic...
P: Updating /boot/extlinux/extlinux.conf...

```

The kernel that mounts microSD isn’t informing `u-boot-update` which kernel to point to, because nvme isn’t mounted by default. So it looks like `u-boot-update` is pointing to the wrong kernel version…the kernel installed on microSD.

```auto
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 5.19.0-1021-generic #23~22.04.1-Ubuntu SMP Thu Jun 22 12:49:35 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux

```

The nvme drive has the following kernels in `/boot`

```auto
vmlinuz-5.19.0-1021-generic
vmlinuz-6.5.0-25-generic

```

The microSD has the following kernel in `/boot`

```auto
vmlinuz-5.15.0-1018-generic

```

Tried doing a `u-boot-update` after `chroot` into nvme got this error.

```auto
ubuntu@ubuntu:~$ sudo chroot /mnt/nvme

root@ubuntu:/# sudo u-boot-update
sudo: unable to resolve host ubuntu: Temporary failure in name resolution
sudo: unable to allocate pty: No such device

```

---

<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: [April 3, 2024, 3:10pm UTC](https://forums.sifive.com/t/boots-from-ssd-kernel-does-not-mount-ssd-root/6439/5 "2024-04-03T15:10:12Z")

</div>

Which distribution are you running and are there good step-by-step instructions out there I could follow? This experience has provided enough incentive to start investigating other options. Thanks in advance!
