Rebuild/update initrd

I’ve tried “mkinitramfs -o /boot/initrd” and “update-initramfs -u” to rebuild the /boot/initrd that comes with the sd card image and the results are based off of /boot/initrd.img-4.9.201-tegra since that is the running kernel. Is there a way to update or rebuild the /boot/initrd that comes with the tegra image, outside of unpacking/editing/repacking?

I don’t think the usual PC style (with a BIOS) initrd setup scripts know enough about Jetsons (which don’t have a BIOS) to correctly create an initrd.

In more recent L4T releases this is provided from a package, “nvidia-l4t-initrd”. I think you’re probably stuck with the unpack/edit/repack, but should you forget to set the package manager to refuse to update nvidia-l4t-initrd, you’d lose your initrd from a package update.

1 Like

Have you looked in /etc/initramfs-tools to see if making some config changes there can help?
You can also install and use dracut to create your initramfs. I use it on both my Nanos and NXs.

Also meant to ask…are you sure you need an initramfs at all? Typically you only need an initramfs to load things that are needed to mount the root filesystem but aren’t in the kernel itself. Some examples would be a filesystem driver that was compiled as a module rather than built in, or network utilities needed to mount the root filesystem over NFS. Unfortunately, you also need it to load the USB firmware if you’re root filesystem is on a USB drive. If you don’t need those things, try commenting out the INITRD line in your extlinux.conf and see what happens.

1 Like

Yes we need early hooks via initrd in order to decrypt the rootfs on the SD card or an external USB device. This all worked properly prior to Jetpack4.5. Any idea what may have changed and how to bypass the Nvidia encryption additions in 4.5? Preference would be no involvement with the sdkmanager.