Jetson nano r32.2.1 PARTUUID not working while booting from USB

OK, I just tried the same thing with a clean/imaged sdcard and and a USB drive yes, it’s broken.

Here’s why…
Although the usb driver is built into the kernel, the firmware is not. Unfortunately, it’s also not in the initrd image so by the time the root filesystem gets mounted, the usb controller isn’t initialized so /dev/sda isn’t available. In this case, the earlier “root=” command line parameter takes effect and is used. Once that filesystem is mounted, /lib/firmware/tegra21x_xusb_firmware becomes available and the usb controller initializes and adds /dev/sda. By that time it’s too late of course.

Here’s how you fix it WITHOUT HAVING TO COMPILE YOUR OWN KERNEL (or anything else).

Boot to the sdcard then…

# cd /etc/initramfs-tools/hooks

Create a new file “usb-firmware” with the following contents:

if [ "$1" = "prereqs" ]; then exit 0; fi

. /usr/share/initramfs-tools/hook-functions

copy_file firmware /lib/firmware/tegra21x_xusb_firmware

Make the file executable

# chmod a+x usb-firmware

That causes the mkinitramfs process to include the firmware in the image.

Regenerate the initrd:

# mkinitramfs -o /boot/initrd-xusb.img

There’ll be some warnings but don’t worry about them.
Make sure it worked.

# lsinitramfs /boot/initrd-xusb.img | grep xusb
lib/firmware/tegra21x_xusb_firmware

Now edit your /boot/extlinux/extlinux.conf file and update the INITRD line to point to /boot/initrd-xusb.img

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd-xusb.img
      APPEND ${cbootargs} root=UUID=<your sda1 uuid> rootwait rootfstype=ext4

Reboot and enjoy.

Don’t forget to copy the usb-firmware script to /etc/initramfs-tools on /dev/sda1.

EDIT:
Oh yeah… The reason I didn’t notice this earlier is that I use a Fedora root filesystem :)

2 Likes