X86/64 NUC boot using sdcard

Hi

Tried to use an old intel NUC (small pc , j5005 cpu) and install OpenWrt.

The device has a sdcard reader , after quick boot it hangs on "waiting for root partition partuuid=....."

Tried few version including old ones , same behavior on all versions.

I almost gave up and tried the same sdcard in a usb card reader and it works just fine.

Using the usb card reader the boot device is /dev/sda , I guess when booting directly from internal sdcard reader it boots from mmcblk0 (not sure how to verify this) and can't find the root partition ?

While i can keep using the usb card reader , it seems less "elegant" and i am looking for some pointers how to fix/investigate this issue more thoroughly.

Thanks in advance.

replace root=UUID=... in grub, with root=/dev/mmcblk0p2, or whatever the rootfs partition dev is called.

1 Like

Thanks , i'll look into it.

What will happen on sysupgrade ? grub is getting changed/reset on that case ?

Did a quick remote check

grub.cfg content is :

serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 --rtscts=off
terminal_input console serial; terminal_output console serial

set default="0"
set timeout="5"
search -l kernel -s root

menuentry "OpenWrt" {
        linux /boot/vmlinuz root=PARTUUID=5d0e4210-2a8e-57e4-7219-5a1fb3c50602 rootwait  console=tty1 console=ttyS0,115200n8 noinitrd
}
menuentry "OpenWrt (failsafe)" {
        linux /boot/vmlinuz failsafe=true root=PARTUUID=5d0e4210-2a8e-57e4-7219-5a1fb3c50602 rootwait  console=tty1 console=ttyS0,115200n8 noinitrd
}

blkid output

/dev/sda2: LABEL="rootfs" UUID="ff313567-e9f1-5a5d-9895-3ba130b4a864" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="5d0e4210-2a8e-57e4-7219-5a1fb3c50602"
/dev/sda128: PARTUUID="5d0e4210-2a8e-57e4-7219-5a1fb3c50680"
/dev/sda1: SEC_TYPE="msdos" LABEL_FATBOOT="kernel" LABEL="kernel" UUID="1234-ABCD" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="5d0e4210-2a8e-57e4-7219-5a1fb3c50601"

lsblk output

NAME     MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda        8:0    1 29.8G  0 disk
├─sda1     8:1    1   16M  0 part /boot
│                                 /boot
├─sda2     8:2    1  104M  0 part /
└─sda128 259:0    1  239K  0 part

Not sure what i should change in grub.cfg ...

What you were told ?

I meant i don't see /dev/sdX or something like that in the cfg file so i am not sure why partuuid does not work in this fashion (since it is the same partition).

I'll try to change the partuuid to hardcoded device path and see if it works at all.

Thanks for your help.

Added new entry to grub.cfg

menuentry "OpenWrt - SDCARD" {
        linux /boot/vmlinuz failsafe=true root=/dev/mmcblk0p2 rootwait  console=tty1 console=ttyS0,115200n8 noinitrd
}

On boot selected that entry and it hangs on waiting for root=/dev/mmcblk0p2

Keyboard not working on this stage , so i don't know whether it possible to gain console access and list devices name or to debug this issue with more info.

have you verified this name is correct ?

try a diff port, USB2 based preferably.