OpenWrt 19.07 hangs on Ryzen 3100 with "Waiting for root device PARTUUD=eb3ae1bb-02"

Hello! I finally got my PC to use OpenWRT, but after install it's hanging.

It's a Ryzen 3 3100 on a Asus B550m-plus Tuf Gaming with a NVMe Husky Gaming 256GB + Intel I350-t4.

I followed https://openwrt.org/docs/guide-user/installation/openwrt_x86 using openwrt-19.07.7-x86-64-combined-ext4.img

I did it on Parted Magic, on it network worked and I used it to grab the image from NAS. sha256 passed.

I didn't resize partition or made any change after dd. When I boot it with mouse connected it hangs on a msg about mouse, so I removed it. Now it hangs on this msg "random: crng init done".

Keyboard numlock works, hitting Enter does nothing.

I connected a laptop on all 5 RJ45 ports, set it to static 192.168.1.2 and 192.168.1.1 is unreachable on all ports. This way I'm unable to ssh it.

Edit: I plugged mouse back and tried again. Maybe the issue isn't the crng itself. Without mouse, it hands a few secs on the waiting root device message and passes. With mouse this msg doesn't hang, after it I get a msg about low-speed USB device, then a msg about optical mouse, then hid-generic. All of them should be about the mouse. Then the crng msg back and hang.

Ctrl-Alt-Del reboots, Caps Lock led works. It's not crashed, it recognizes keyboard inputs. The issue is that it doesn't finish startup and no terminal is offered, and I also can't get any IP.

Setting laptop network to DHCP results on 169.254.22.188. So it doesn't have any network available.

The image includes a partition table. Write the entire image to the disk using a raw write such as dd.

If you partition the disk first you will probably have a uuid mismatch as shown as the second to the last line. OpenWrt is not fully booted and usable because root did not mount. This might be fixed by editing the grub2 config to match the actual root uuid.

2 Likes

Tnx for the help. I removed the existing partition before using dd according to tutorial.

I'm gonna reboot and use fdisk to remove all partitions, reboot and then dd it again.

What should I look on grub2 config to fix? I had never edited one.

Edit. I verified /media/nvmen1p1/boot/grub/grub.cfg. It tells to boot root on PARTUUID=eb3ae1bb-02.

Using blkid it shows /dev/nvme0n1p2 with that same PARTUUID.

Anyway I'm gonna use fdisk to remove partitions then rewrite it.

Reinstalled it after deleting with fdisk, still same issue.

I plugged USB HD with it on and new messages popped reporting the HD was recognized, so indeed it's not crashed and working, but no network or terminal.

I think it was waiting for root device but passed it. I'm also curious that it says "crng init done", so it finished, right?

Might it be some other issue? Maybe whatever happens after crng inits?

Update. It's the root device msg, not crng. I tried booting with no mouse and keyboard and the crng msg didn't pop.

I created new entries on grub.cfg to make some attempts. I replaced PARTUUID to /dev/nvme***** and same hang happened.

I removed the waitroot flag and it reboots. I recorded a video of it to see what msg was there. It says

UFS: cannot open root device "PARTUUD=eb3ae1bb-02" or <unreadable>
Please append a correct "root=" boot option: here are the available partitions: <empty>
Kernel panic - not syncing: VFS: unable to mount root fs on unknown <unreadable>
Kernel offset: disabled
Rebootting

Might it be it's missing a driver?

Custom x86 firmware image stuck during boot - #13 by toolchains had the same hang issue with root device msg, he solved it adding some USB driver on a custom build. I'll try it tomorrow.

Yes I see new high speed USB device, presumably that is the drive. (High speed means USB2). That message should be followed though by usb-storage detecting the partitions on the drive, and ext4 mounting it.

Is this a major brand drive or something odd? Because usb-storage should definitely already be in the build.

2 Likes

19.07 doesn't seem to support NVMe out of the box. I've clarified your topic title to reflect that.

E.g. on master and on 21.02:

~/code/lede/git/target/linux/x86/64$ grep -i blk_dev_nvme config-5.*
config-5.10:CONFIG_BLK_DEV_NVME=y
config-5.4:CONFIG_BLK_DEV_NVME=y

On 19.07 tree:

~/code/lede/git/target/linux/x86/64$ grep -i blk_dev_nvme config-4.*
$

Try an early 21.02 image please. 19.07 will be EOL'ed rather quickly once 21.02 goes stable (about 6 months after, according to current planning).

2 Likes

Hello!

I'm trying to get OpenWRT to work on a PC I just built to be my new router, but it seems it's unable to load root because I'm using NVMe SSD.

I followed https://openwrt.org/docs/guide-developer/quickstart-build-images to make a custom build, it's currently compiling and haven't got any error. But it's only for learning, I looked around on makeconfig and couldn't find where to enable NVMe driver.

I'd like to not use a custom build on production, I'd rather use stable 19.07.7. If it's indeed the NVMe driver I'm lacking, it's the only thing I need changed from it.

Where do I enable the driver so I can test if it's the issue?

And, if it is, what's the safest way to add it? Would I be able in example to change only the kernel and leave the rest intact?

Where are u seeing it? It's probably the USB HD with Parted Magic. And good point, when I plug it with OpenWRT on it prints messages reporting the HD was detected, so it does have USB drivers.

So, 19 still doesn't have drivers and 21 will? I'm gonna install it and see how it goes.

Snapshot only has tar file, I'm failing to find tutorial teaching how to install tar on PC. How is it done?

you copy the vmlinuz to the /boot directory on the 1st partition, and
dd the rootfs img file onto the 2nd partition, or unpack the tar one to a premade 2nd partition.

2 Likes

And it's easiest to boot some sort of live Linux from a USB drive to do this, since the programs to handle tar files and ext4 filesystems are native.

1 Like

What are you talking about?

1 Like

Tnx a lot!

Ok, I found \openwrt-imagebuilder-21.02-SNAPSHOT-x86-64.Linux-x86_64\build_dir\target-x86_64_musl\linux-x86_64\ vmlinux

Is it this file, or the vmlinux.elf?

So I increase first partition (FAT32) size, delete its vmlinux and copy this vmlinux to it, right?

I can't find any rootfs file, where is it? And what should I put on dd of? /dev/nvme0n1p2?

I can also copy tar content to 2nd partition (ext4), but what tar is it?

Oh sorry. I looked on the bottom table yesterday and didn't look on the top one. My bad.

some people end up here by mistake (even though URL says archive)

https://archive.openwrt.org/snapshots/trunk/x86/64/

2 Likes

The bottom one is for development. The upper one is the list of actual images.

Can you give a bit of background? Are you attempting multiboot? Are there other operating systems on your NVMe drive? Why are you partitioning manually? Since you used the img file before, I'm assuming you have just OpenWrt on the NVMe drive for now but you probably resized the rootfs after installation? If you did so, it might just be that your rootfs has a differend UUID now (do check that!). If so, you need to modify your /boot/grub/grub.cfg to use the new UUID.

I'm not sure if resizing a partition changes the UUID but it doesn't hurt to double check you're still using the right one.

1 Like

probably don't have to touch the part, just rename the old vmlinuz, and put the new one in.

dd the openwrt-21.02-snapshot-r15986-cc51d97200-x86-64-generic-ext4-rootfs.img to /dev/nvme0n1p2.

what Borromini said about the UUID, or try root=/dev/nvme0n1p2

note the rootfs image will probably not match the actual part side, you might have to extend/resize it afterwards.

1 Like

Sorry I was confusing on my last (today) posts, you can ignore them.

I may multiboot on the future, but not now. It's a brand new PC and its SSD is empty. It has 256GB and of course OpenWRT doesn't need it all for it.

I'm not partitioning manually. I thought I should use openwrt-imagebuilder-21.02-SNAPSHOT-x86-64.Linux-x86_64.tar.xz so I'd have to use existing partitions, I was mistaken.

I was verifying UUID / PARTUUID yesterday and it was correct. I even changed grub.cfg to use /dev/nvme0n1p2 to see if it was PARTUUID error and it wasn't.

19.07.7's 1st partition has 16MB while openwrt-imagebuilder-21.02-SNAPSHOT-x86-64.Linux-x86_64.tar.xz vmlinux has 17MB, that's why I believed I had to increase partition size to copy it there.

Thanks guys for patience on explaining it to me :slight_smile:

I will only be able to do it this afternoon because I don't have access to the PC right now.

Could I use generic-ext4-combined.img.gz and follow https://openwrt.org/docs/guide-user/installation/openwrt_x86 as I did with 19.07.7?

A full-image install of 21.02 using dd to overwrite the whole drive should work. The original problem as @Borromini pointed out seems to be lack of NVM driver in the 19.07 release.

2 Likes