Copy kernel from nvme to eemc

I have a jetson Xavier NX which boots from the attached nvme. (Using JP 4.4.1, but have the same problem in JP 4.6.4)

Question: In the jetson I have upgraded/installed many packages which resulted in changing the linux kernel in the nvme, and thus I ended up having problems after reboot. I understand this is stemming from a mismatch of the kernel in the emmc and that in the nvme.

Is there a way for me to copy the system of the nvme into the emmc to synchronize the changes ? If so what directories specifically should I copy to from the nvme to the emmc ?

I’ve read that copying the /boot and /lib directories is enough, but this didn’t work for me, nor did copying other directories.

Hi visuale,

Are you using the devkit or custom board for Xavier NX?

Normally, the user would not use eMMC more if they install all their custom packages and changes in NVMe because the space should be enough for their use case.

May I know what’s your use case to copy kernel from NVMe to eMMC?

Hi Kevin,
I am using JP 4.4.1 in a board that is identical to that used in the dev kit (leeptop A206), except does not have SD card.

Because I used JP 4.4.1 the way I had to setup the boot from nvme was to install a service which runs at startup to point the rootfs to the SSD installed on /dev/nvme0. I did this basically by setting
sudo systemctl enable setssdroot.service and SOME other commands from rootOnNVMe/ at master · jetsonhacks/rootOnNVMe · GitHub. This worked flawlessly for years.

Then, after upgrading and installing several packages, I have the problem that when I try to login in the GUI, it logs in for a fraction of a second before logging me out (this happens to other users in the system too). I understand this is because a kernel difference, as the text in
GitHub - jetsonhacks/rootOnNVMe: Switch the rootfs to a NVMe SSD on the Jetson Xavier NX and Jetson AGX Xavier explains :

"Once this service is installed, the rootfs will be on the SSD. If you upgrade to a newer version of L4T using OTA updates (using the NVIDIA .deb repository), you will need to also apply those changes to the SD card that you are booting from.

Typically this involves copying the /boot directory and /lib/modules// from the SSD to the SD card. If they are different, then modules load will be ‘tainted’, that is, the modules version will not match the kernel version.*"

So I tried to copy from the nvme to the emmc (board does not have card) without luck. Hence my original question.

They seem both custom carrier board rather than our official dev kit board.

I’m not clear about this since it is 3rd-party tool.
If the bootloader mismatch the rootfs then it might cause boot issue.

What’s your expected result in the final case?
(i.e. do you want to boot from eMMC or NVMe SSD? which release?)

Of course I want to boot from nvme. You say

If the bootloader mismatch the rootfs then it might cause boot issue.

I think that is exactly the problem. How can I extract the bootloader from the rootfs in the nvme so I can copy that to the emmc ?

bootloader is from partition rather than rootfs so that you can’t copy it.

Please share the target use case you want.

Ok, thanks for the clarification. I guess it can’t be done then,.