Cannot load moodules when booted with initrd.img

32 views
Skip to first unread message

Sergey Manucharian

unread,
Aug 23, 2018, 11:57:25 AM8/23/18
to BeagleBoard
Most likely this is not a BeagleBone specific thing, just happened to me, and I'm really confused, probably missing something obvious.

There are no problems with 4.14.51 kernel booted without any initramfs (initrd.img).
However, in certain setups I have to boot in rootfs in a raw image on a FAT partition, thus I prepared an initrd.img using the standard Debian tools.
The overall boot process is fine, everything works except loading modules. I get:

"modprobe: ERROR: could not insert <module>: Exec format error"

I tried including modules in the initrd.img, but they are not loaded either.

Thanks for advises and directions!

--
Sergey

Sergey Manucharian

unread,
Aug 23, 2018, 3:04:21 PM8/23/18
to BeagleBoard
Okay, I found that only xz compressed modules won't be loaded. Will try to find the root cause.

Robert Nelson

unread,
Aug 23, 2018, 3:26:59 PM8/23/18
to Beagle Board, Sergey Manucharian
On Thu, Aug 23, 2018 at 2:04 PM Sergey Manucharian <s...@ara-ler.com> wrote:
>
> Okay, I found that only xz compressed modules won't be loaded. Will try to find the root cause.

Either you need to upgrad kmod, run "sudo depmod -a" or just disable
the config option (v4.14.x+ only kernels from my repo have it
enabled..)

-CONFIG_MODULE_COMPRESS=y
-# CONFIG_MODULE_COMPRESS_GZIP is not set
-CONFIG_MODULE_COMPRESS_XZ=y
+# CONFIG_MODULE_COMPRESS is not set

Regards,

--
Robert Nelson
https://rcn-ee.com/

Sergey Manucharian

unread,
Aug 23, 2018, 4:04:33 PM8/23/18
to Robert Nelson, Beagle Board
Excerpts from Robert Nelson's message from Thu 23-Aug-18 14:26:
Thanks, Robert!

My kernel is from your repository, and I like the compression of
modules, I use the same kernel in all my setups.

Most likely, the rootfs I use has an older kmod, will try to upgrade it.

Sergey

Sergey Manucharian

unread,
Aug 23, 2018, 4:45:19 PM8/23/18
to Robert Nelson, Beagle Board
Excerpts from Sergey Manucharian's message from Thu 23-Aug-18 14:04:
The problem is solved by upgrading the rootfs (Debian Stretch) to the latest version.
The latest kmod handles xz compressed modules.

Thanks,
Sergey

Reply all
Reply to author
Forward
0 new messages