Bug #3520
Bug #3539: [linux-libre]: 6.3.3 fails to load modules with kmod 31
[linux-libre]: mkinitcpio fails to build /boot/vmlinuz file on ARM systems
0%
Description
# pacman -S linux-libre-pck Packages (1) linux-libre-pck-5.18.14.pck1-1 Total Download Size: 49.54 MiB Total Installed Size: 89.41 MiB :: Proceed with installation? [Y/n] y :: Retrieving packages... linux-libre-pck-5.18.14.pck1-1-armv7h 49.5 MiB 1900 KiB/s 00:27 [####################################################################] 100% (1/1) checking keys in keyring [####################################################################] 100% (1/1) checking package integrity [####################################################################] 100% (1/1) loading package files [####################################################################] 100% (1/1) checking for file conflicts [####################################################################] 100% (1/1) checking available disk space [####################################################################] 100% :: Processing package changes... (1/1) installing linux-libre-pck [####################################################################] 100% Optional dependencies for linux-libre-pck wireless-regdb: to set the correct wireless channels of your country linux-libre-firmware: firmware images needed for some devices :: Running post-transaction hooks... (1/3) Arming ConditionNeedsUpdate... (2/3) Updating module dependencies... (3/3) Updating linux initcpios... ==> Building image from preset: /etc/mkinitcpio.d/linux-libre-pck.preset: 'default' ==> Using configuration file: '/etc/mkinitcpio.conf' -> -k 5.18.14-gnu-pck1-1-pck -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-libre-pck.img ==> Starting build: '5.18.14-gnu-pck1-1-pck' -> Running build hook: [base] -> Running build hook: [udev] -> Running build hook: [autodetect] -> Running build hook: [modconf] -> Running build hook: [kms] -> Running build hook: [keyboard] -> Running build hook: [keymap] -> Running build hook: [consolefont] ==> WARNING: consolefont: no font found in configuration -> Running build hook: [block] -> Running build hook: [filesystems] -> Running build hook: [fsck] ==> Generating module dependencies ==> Creating gzip-compressed initcpio image: '/boot/initramfs-linux-libre-pck.img' ==> Image generation successful
History
Updated by bill-auger 8 months ago
- Description updated (diff)
- Subject changed from mkinitcpio fails to build /boot/vmlinuz file to [linux-libre]: mkinitcpio fails to build /boot/vmlinuz file on ARM systems
this is apparently related to the mkinitcpio install hook in the kernel package - there is already a related work-around in the PKGBUILDs; but it seems to need adapting for the latest mkinitcpio - i am trying a fix with linux-libre-vanilla now - if it works, all kernel packages may need to be adapted
Updated by bill-auger 8 months ago
the build server is still having trouble - i was not able to rebuild the kernel yet; but the fix i contrived is simple - it could be applied to the existing kernels packages
if anyone wants to try the quick-fix, install the kernel package (eg: linux-libre-lts), then edit the preset file under /etc/mkinitcpio.d/, for example /etc/mkinitcpio.d/linux-libre-lts.preset
change the 'ALL_kver=' variable name to 'default_kver=' and redefine 'ALL_kver=' as the absolute path to the kernel's normal location under /boot
before:
ALL_kver="5.15.88-gnu-1-lts"
after:
default_kver="5.15.88-gnu-1-lts" ALL_kver="/boot/vmlinuz-linux-libre-lts"
lastly, re-install the same kernel package - you should then see the kernel under /boot
note that the existing kernel packages probably left an orphan kernel file in your / directory - you can safely delete it - probably, you could simply move that file to /boot without the steps above; but i did not try that
Updated by bill-auger 7 months ago
- Assignee set to bill-auger
- Status changed from confirmed to fixed
the previous solution required something of a hack in mkinitcpio - without hacking mkinitcpio, i can make it install the kernel, or the initrd, but not both - mkinitcpio will not generate the initrd if ALL_kver is a path, as it is for x86_64
ive decided to handle this in the .install file - archarm already uses the .install file to delete the orphaned initramfs file; so that seems like a cleaner, more obvious place to kludge this - this may need to be added to all other kernels though, or become a global hook, perhaps in mkinitcpio
# armv7h mkinitcpio and install hooks do not manage the /boot dir properly (BR #3520) _pkgbase=linux-libre-vanilla _variant=${_pkgbase#linux-libre} _kernel_dest=boot/vmlinuz-${_pkgbase} _install() { local pkgver=${1%-*} local kver=${pkgver}-gnu-[0-9]${_variant} [[ ! -f "${_kernel_dest}" ]] || ! echo "nothing to do" || return 0 mv ${kver} 2> /dev/null ${_kernel_dest} || cp usr/lib/modules/${kver}/vmlinuz ${_kernel_dest} } post_install() { _install $1 ; } post_post_upgrade() { _install $1 ; } post_remove() { [[ -f boot/initramfs-${_pkgbase}.img ]] || [[ -f boot/vmlinuz-${_pkgbase} ]] || ! echo "nothing to do" || return 0 rm -f boot/initramfs-${_pkgbase}.img rm -f boot/vmlinuz-${_pkgbase} }
Updated by bill-auger 2 months ago
- Parent task set to #3539
- Status changed from fixed to in progress