Skip to content

New minimal initrd is printing "Invalid ELF header magic: != ELF" errors #1934

@chewi

Description

@chewi

Description

Since flatcar/scripts#3241, this message has started appearing several times in the kernel log during boot.

Invalid ELF header magic: != ELF

Impact

None, it's harmless but a little scary.

Environment and steps to reproduce

Fire up any recent nightly and check dmesg.

Expected behavior

It doesn't print that error.

Additional information

It happens every time busybox loads a kernel module, but the module loads anyway. If you use rd.earlyshell, you can try it manually with modprobe or insmod. If you use unxz to decompress the module before loading it, the error doesn't occur. It's not clear from the busybox code why this is happening. If I'm reading it correctly, it:

  1. Tries finit_module with the compression flag.
  2. Tries finit_module without the compression flag.
  3. Tries init_module, which doesn't support compression.

I doubt it's hitting 3, but the modules are definitely compressed, so I'd be surprised if it was failing on 1 and succeeding on 2. Note that the error message itself comes from the kernel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions