booster
booster copied to clipboard
booster generator fails if multiple modules with the same name
I'm trying to generate images via booster 0.7-2 for three kernels:
- 5.17.1-arch1-1 (the archlinux default kernel)
- 5.15.32-xanmod1-1 (the xanmod-anbox kernel from chaosaur)
- 5.17.1-xanmod1-1 (the xanmod-edge kernel from chaosaur)
The regenerate_images
script fails at L13 and prints the following error:
2022/04/01 18:10:58 provided key already used in mapping hdaps->extramodules/hdaps.ko.xz
The full bash debug log:
sudo bash -x /usr/lib/booster/regenerate_images
+ kernels=($(ls -d /usr/lib/modules/*))
++ ls -d /usr/lib/modules/5.15.32-xanmod1-1 /usr/lib/modules/5.17.1-arch1-1 /usr/lib/modules/5.17.1-xanmod1-1
+ for kernel in "${kernels[@]}"
+ pacman -Qqo /usr/lib/modules/5.15.32-xanmod1-1/pkgbase
+ read -r pkgbase
+ install -Dm644 /usr/lib/modules/5.15.32-xanmod1-1/vmlinuz /boot/vmlinuz-linux-xanmod-anbox
+ booster -force -output /boot/booster-linux-xanmod-anbox.img -kernelVersion 5.15.32-xanmod1-1
+ for kernel in "${kernels[@]}"
+ pacman -Qqo /usr/lib/modules/5.17.1-arch1-1/pkgbase
+ read -r pkgbase
+ install -Dm644 /usr/lib/modules/5.17.1-arch1-1/vmlinuz /boot/vmlinuz-linux
+ booster -force -output /boot/booster-linux.img -kernelVersion 5.17.1-arch1-1
+ for kernel in "${kernels[@]}"
+ pacman -Qqo /usr/lib/modules/5.17.1-xanmod1-1/pkgbase
+ read -r pkgbase
+ install -Dm644 /usr/lib/modules/5.17.1-xanmod1-1/vmlinuz /boot/vmlinuz-linux-xanmod-edge
+ booster -force -output /boot/booster-linux-xanmod-edge.img -kernelVersion 5.17.1-xanmod1-1
+ wait
2022/04/01 18:10:58 provided key already used in mapping hdaps->extramodules/hdaps.ko.xz
2022/04/01 18:10:58 provided key already used in mapping hdaps->extramodules/hdaps.ko.xz
This error message says that the kernel has 2 modules with the same name (hdaps
). And booster does not really know which one it should use.
The master
branch makes this error message a bit cleaner.
@RubenKelevra, I hope my answer resolved your question. I am closing the issue now.
@RubenKelevra, I hope my answer resolved your question. I am closing the issue now.
Oops overlooked your message. Thanks for the fast reply.
I really don't know how this happened. I'll have a look at this.
Thanks for the message improvement!
@anatol well, yeah there are two files:
# find / -iname "hdaps*" 2>/dev/null
/etc/modules-load.d/hdaps.conf
/usr/lib/modules/5.17.1-xanmod1-1/kernel/drivers/platform/x86/hdaps.ko
/usr/lib/modules/5.17.1-arch1-1/extramodules/hdaps.ko.xz
/usr/lib/modules/5.17.1-arch1-1/kernel/drivers/platform/x86/hdaps.ko.zst
/usr/lib/modules/5.15.32-xanmod1-1/kernel/drivers/platform/x86/hdaps.ko
The ".../extramodules/..." is provided by community/tp_smapi which offers some acceleration sensor support for ThinkPads. While I installed this more as an accident (since it's a dependency) I feel like it would make sense to have booster recognize that and replace the "build-in" module with the extramodule. Wouldn't this make more sense? :)
Booster can support multiple modules with the same name if it is something that can be considered a typical use case.
So if there are "extramodules/hdaps.ko.xz" and "kernel/drivers/platform/x86/hdaps.ko.zst" what module booster should prefer? How does modprobe handle this situation?
Not sure I'm the right person to decide that default behaviour. But I mean if there's a kernel and an extra module it's kinda make sense that the user wants to "overwrite" the kernel module, rather than ignore it.
I don't know what modprobe would do in this situation.
I do not disagree that it makes sense. But I need to know where exactly in the linux stack this logic is currently defined. I looked at modprobe and I do not see any special treatment of extramodules
directory.