Qengineering/Jetson-Nano-image

insmod: ERROR: could not insert module overlay.ko: Invalid module format

Closed this issue · 5 comments

Hi!
I installed current image on SD catd.
I tried to run docker:

sudo systemctl start docker.service
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

But trouble not in Docker, trouble in kernel:

root@nano:~# cd /lib/modules/4.9.253-tegra/kernel/fs
root@nano:/lib/modules/4.9.253-tegra/kernel/fs# ls -a
.  ..  binfmt_misc.ko  btrfs  cifs  fuse  nfs_common  nfsd  overlayfs
root@nano:/lib/modules/4.9.253-tegra/kernel/fs# cd overlayfs/
root@nano:/lib/modules/4.9.253-tegra/kernel/fs/overlayfs# ls -al
total 100
drwxr-xr-x 2 root root  4096 aug  2  2021 .
drwxr-xr-x 8 root root  4096 aug  2  2021 ..
-rw-r--r-- 1 root root 92760 jul 26  2021 overlay.ko
root@nano:/lib/modules/4.9.253-tegra/kernel/fs/overlayfs# insmod ./overlay.ko 
insmod: ERROR: could not insert module ./overlay.ko: Invalid module format
root@nano:/lib/modules/4.9.253-tegra/kernel/fs/overlayfs# insmod overlay.ko 
insmod: ERROR: could not insert module overlay.ko: Invalid module format
root@nano:/lib/modules/4.9.253-tegra/kernel/fs/overlayfs# 


 uname -a
Linux nano 4.9.337-tegra #1 SMP PREEMPT Thu Jun 8 21:19:14 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux

So, question: where I can get overlay.ko files and to fix trouble with Kernel?

As you undoubtedly have noticed, you're having two OS systems running on your Nano running.
That is a permanent source of conflicts.

Your uname -a stated 4.9.337, while folders are 4.9.253. You have to choose which one you want to keep.

I don't know the location where you can download the overlay.ko separately. I can imagine you have to copy it from a fresh 4.9.253 OS running on a Nano.
However, fat chance you get another hick up once the new overlay.ko is accepted. Simply because another driver is incompatible with 4.9.253

This is very strange, because we can go to file sudo cat /boot/extlinux/extlinux.conf and set there from which memory card we want to boot our system.
APPEND ${cbootargs} quiet root=/dev/mmclk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0

root=/dev/mmclk0p1 - this is a memory from board with his own linux.
root=/dev/sda1 - this is my SD card. So this is very strange, when I set to boot from SD card and I have conflict of 2 kernels version, as I wrote in this Issue above.

However, fat chance you get another hick up once the new overlay.ko is accepted. Simply because another driver is incompatible with 4.9.253

So, how to solve that at all?

Not all the boot file are located in root
I had no problem when I tried insmod ./overlay.ko on you system with the original flashed SD.
When I saw the two version numbers (337 and 253), it looks to me the cause of the problem.

As you wrote in messages above, I had another errors, so I rewrote fresh image on SD card and I started to build my project and installed all needful libraries from zero. Such strategy saved a lot of my time.