Skip to content

minimal-init: Use kmod's modprobe also for simple module loading#113

Merged
pothos merged 1 commit intoflatcar-masterfrom
kai/no-busyboxmodprobe
Oct 29, 2025
Merged

minimal-init: Use kmod's modprobe also for simple module loading#113
pothos merged 1 commit intoflatcar-masterfrom
kai/no-busyboxmodprobe

Conversation

@pothos
Copy link
Copy Markdown
Member

@pothos pothos commented Oct 28, 2025

We already use kmod's modprobe for loading drivers from alias entries but still used busybox's modprobe for the three explicit calls. This caused a "Invalid ELF header magic: != ELF" warning being printed while it tries to load the compressed module before uncompressing. While harmless this does not look good and is confusing. Always use kmod's modprobe for module loading. Whether busybox prefers builtins or not is a configuration option and we shouldn't assume it always is configured in a particular way, so an explicit call is best.

Fixes flatcar/Flatcar#1934

How to use

Backport to Alpha

Testing done

The messages are gone with the image built from the CI.

We already use kmod's modprobe for loading drivers from alias entries
but still used busybox's modprobe for the three explicit calls. This
caused a "Invalid ELF header magic: != ELF" warning being printed while
it tries to load the compressed module before uncompressing. While
harmless this does not look good and is confusing.
Always use kmod's modprobe for module loading. Whether busybox prefers
builtins or not is a configuration option and we shouldn't assume it
always is configured in a particular way, so an explicit call is best.

Fixes flatcar/Flatcar#1934

Signed-off-by: Kai Lueke <kailuke@microsoft.com>
@pothos pothos requested a review from a team as a code owner October 28, 2025 11:30
pothos added a commit to flatcar/scripts that referenced this pull request Oct 28, 2025
This pulls flatcar/bootengine#113 to fix a
kernel boot warning being printed for three modules that are loaded
explicitly.

Signed-off-by: Kai Lueke <kailuke@microsoft.com>
Copy link
Copy Markdown
Contributor

@chewi chewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy, assuming it works. I saw more than 3 instances of the error, but the btrfs dependencies probably triggered several.

@pothos
Copy link
Copy Markdown
Member Author

pothos commented Oct 29, 2025

Looks good now

[    1.474253] Run /init as init process
[    1.573425] SCSI subsystem initialized
[    1.640865] ACPI: \_SB_.GSIA: Enabled at IRQ 16
[    1.642535] ahci 0000:00:1f.2: AHCI vers 0001.0000, 32 command slots, 1.5 Gbps, SATA mode
[    1.643694] ahci 0000:00:1f.2: 6/6 ports implemented (port mask 0x3f)
[    1.644630] ahci 0000:00:1f.2: flags: 64bit ncq only 
[    1.646831] scsi host0: ahci
[    1.647578] scsi host1: ahci
[    1.648327] scsi host2: ahci
[    1.649027] scsi host3: ahci
[    1.666204] scsi host4: ahci
[    1.667012] scsi host5: ahci
[    1.667587] ata1: SATA max UDMA/133 abar m4096@0xfebd5000 port 0xfebd5100 irq 26 lpm-pol 1
[    1.668829] ata2: SATA max UDMA/133 abar m4096@0xfebd5000 port 0xfebd5180 irq 26 lpm-pol 1
[    1.670159] ata3: SATA max UDMA/133 abar m4096@0xfebd5000 port 0xfebd5200 irq 26 lpm-pol 1
[    1.671386] ata4: SATA max UDMA/133 abar m4096@0xfebd5000 port 0xfebd5280 irq 26 lpm-pol 1
[    1.693728] ata5: SATA max UDMA/133 abar m4096@0xfebd5000 port 0xfebd5300 irq 26 lpm-pol 1
[    1.694926] ata6: SATA max UDMA/133 abar m4096@0xfebd5000 port 0xfebd5380 irq 26 lpm-pol 1
[    2.003849] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    2.040400] ata2: SATA link down (SStatus 0 SControl 300)
[    2.042614] ata5: SATA link down (SStatus 0 SControl 300)
[    2.044544] ata4: SATA link down (SStatus 0 SControl 300)
[    2.046517] ata1: SATA link down (SStatus 0 SControl 300)
[    2.069193] ata6: SATA link down (SStatus 0 SControl 300)
[    2.070143] ata3.00: LPM support broken, forcing max_power
[    2.070796] ata3.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[    2.071572] ata3.00: applying bridge limits
[    2.072405] ata3.00: LPM support broken, forcing max_power
[    2.073244] ata3.00: configured for UDMA/100
[    2.074629] scsi 2:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.5+ PQ: 0 ANSI: 5
[    2.105088] virtio_blk virtio2: 8/0/0 default/read/poll queues
[    2.109691] virtio_blk virtio2: [vda] 16515072 512-byte logical blocks (8.46 GB/7.88 GiB)
[    2.133860]  vda: vda1 vda2 vda3 vda4 vda6 vda7 vda9
[    2.167779] sr 2:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[    2.168799] cdrom: Uniform CD-ROM driver Revision: 3.20
[    2.234581] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
[    2.252149] device-mapper: uevent: version 1.0.3
[    2.253031] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@lists.linux.dev
[    2.267729] device-mapper: verity: sha256 using shash "sha256-generic"
Mounting /usr from /dev/mapper/usr
[    2.341035] raid6: avx2x4   gen() 19409 MB/s
[    2.371043] raid6: avx2x2   gen() 23005 MB/s
[    2.405037] raid6: avx2x1   gen() 19523 MB/s
[    2.420873] raid6: using algorithm avx2x2 gen() 23005 MB/s
[    2.438036] raid6: .... xor() 19289 MB/s, rmw enabled
[    2.451928] raid6: using avx2x2 recovery algorithm
[    2.474413] xor: automatically using best checksumming function   avx       
[    2.634024] Btrfs loaded, zoned=no, fsverity=no
[    2.652922] BTRFS: device fsid 3f8b2a46-0270-48ae-93e9-4659c450ee5c devid 1 transid 43 /dev/mapper/usr (253:0) scanned by mount (210)
[    2.655216] BTRFS info (device dm-0): first mount of filesystem 3f8b2a46-0270-48ae-93e9-4659c450ee5c
[    2.656482] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[    2.683367] BTRFS info (device dm-0): disabling log replay at mount time
[    2.684417] BTRFS info (device dm-0): enabling free space tree
[    2.690973] loop: module loaded
[    2.693399] loop0: detected capacity change from 0 to 100144
[    2.706628] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.924125] systemd[1]: Successfully made /usr/ read-only.
[    2.941370] systemd[1]: systemd 257.7 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +IPE +SMACK +SECCOMP -GCRYPT -GNUTLS +OPENSSL -ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -BTF -XKBCOMMON +UTMP -SYSVINIT +LIBARCHIVE)

@pothos pothos merged commit 66edf6f into flatcar-master Oct 29, 2025
1 check passed
@pothos pothos deleted the kai/no-busyboxmodprobe branch October 29, 2025 08:12
pothos added a commit to flatcar/scripts that referenced this pull request Oct 29, 2025
This pulls flatcar/bootengine#113 to fix a
kernel boot warning being printed for three modules that are loaded
explicitly.

Signed-off-by: Kai Lueke <kailuke@microsoft.com>
pothos added a commit to flatcar/scripts that referenced this pull request Oct 29, 2025
This pulls flatcar/bootengine#113 to fix a
kernel boot warning being printed for three modules that are loaded
explicitly.

Signed-off-by: Kai Lueke <kailuke@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants