[SOLVED] mkinitcpio fails during Generating module dependenc

This forum is for discussion about general software issues.

[SOLVED] mkinitcpio fails during Generating module dependenc

Postby alexela » Sun Mar 17, 2024 3:47 pm

Hi,

[The following is solved]
When upgrading, building the initiramfs fails du to locale it seems :
==> Creating gzip-compressed initcpio image: '/boot/initramfs-linux.img'
bsdtar: Failed to set default locale
bsdtar: Failed to set default locale
==> WARNING: errors were encountered during the build. The image may not be complete.

later, it is a bit more talkative :
/usr/lib/initcpio/functions: ligne 858: avertissement :setlocale : LC_ALL : impossible de changer le paramètre de langue (C.UTF-8) : Aucun fichier ou dossier de ce type

It's weird cause running the locale-gen script works fine. I try to uncomment the en_US.UTF-8 UTF-8 line too (it usually is fr_FR.UTF-8 UTF-8 line only…)

[adding the C.UTF-8 solved this issue, i also remove the microcode hook, and add some font into the /etc/vconsole file so mkinitcpio -v does not complain anymore, but there is still an issue.]

mkinitcipio -v -g Image fails after starting «Generating module dependencies». It adds the modules.builtin. and modules.buitlin.modinfo and modules.order, but then it stops. In my /lib/modules/my_kernel directory, i can see a modules.builtin.bin created but nothing related to a module.order.bin for instance…

In fact, during the generation module dependencies, add_checked_modules_from_symbol drm_privacy_screen_register would lead to an error (it's an old 5.17 linux kernel). Removing the kms hook solves this issue (i hope kms in not needed on my pinebookpro…)


I'm pretty afraid, cause it has overwritten the /boot/initramfs-linux.img file with this broken one and i guess i wont be able to reboot : am i right ?
Last edited by alexela on Mon Mar 18, 2024 7:10 pm, edited 3 times in total.
alexela
 
Posts: 13
Joined: Thu Aug 27, 2020 8:42 am

Re: mkinitcpio fails to built initramfs du to locale

Postby karog » Sun Mar 17, 2024 4:31 pm

You see where you wrote:

impossible de changer le paramètre de langue (C.UTF-8) :

That is the clue. Also, had you searched you might have found the following thread on this issue:

-https://archlinuxarm.org/forum/viewtopic.php?f=65&t=16784&p=72238#p72238
karog
 
Posts: 301
Joined: Thu Jan 05, 2012 7:55 pm

Re: mkinitcpio fails to built initramfs du to locale

Postby alexela » Sun Mar 17, 2024 4:41 pm

So i've just found thismake_clickable_callback(MAGIC_URL_LOCAL, ' ', 'https://archlinuxarm.org/forum', 'viewtopic.php?f=57&t=16757', ' class="postlink-local"') and try to do the same.

I added a C.UTF-8 line in my /etc/locale.gen file and run locale.gen : all right.

Then i run mkinitcpio with the -v flag and as i got some warning with microcode and vconsolefont hook, i erased both in my /etc/mkinitcpio.conf file and run again the mkinitcpio -v command : all right. But the mkinitcpio -v -g IMAGE still fail…
alexela
 
Posts: 13
Joined: Thu Aug 27, 2020 8:42 am

Re: mkinitcpio fails to built initramfs du to locale

Postby alexela » Sun Mar 17, 2024 5:00 pm

as it fails in creating a compressed image, i try the COMPRESSION="cat" line in my mkinitcpio.conf but it still fails to build any image. The latest file added is modules.order, dont know if it can help…
alexela
 
Posts: 13
Joined: Thu Aug 27, 2020 8:42 am

Re: mkinitcpio fails to built initramfs du to locale

Postby alexela » Sun Mar 17, 2024 5:23 pm

I downgraded the mkinitcpio package to 37.1-2 (it requiers to downgrade cryptsetup (i did to 2.6.1-1)and systemd (i did to 255.2-3) and try to rebuild my kernel with the old mkinitcpio.conf file. It still fails… and mkinitcpio -v just complains with the microcode and consolfont hook but ends with «Dry run complete, use -g IMAGE to generate a real image» ; which fail too
alexela
 
Posts: 13
Joined: Thu Aug 27, 2020 8:42 am

Re: mkinitcpio fails to build initramfs

Postby alexela » Sun Mar 17, 2024 8:56 pm

if i look in /lib/modules/mykernel, the timestamps are often modified with the latest build attempt except for modules.order, which is the last added file in the mkinitcpio process…
alexela
 
Posts: 13
Joined: Thu Aug 27, 2020 8:42 am

Re: mkinitcpio fails during Generating module dependencies

Postby alexela » Mon Mar 18, 2024 8:00 am

using bash -x /usr/bin/mkinitcpio -v -g IMAGE, i can provide the following when addind the files during the «Generation module dependencies» process (when trying to install the linux-aarch64 it fails in the same way with pacman, i use this old MANJARO kernel cause it makes the usb-C DP-alt-mode working…) :

printf ' adding file: %s\n' /lib/modules/5.17.9-2-MANJARO-ARM/modules.builtin.modinfo
adding file: /lib/modules/5.17.9-2-MANJARO-ARM/modules.builtin.modinfo
+ [[ -z '' ]]
+ command cp --remove-destination --preserve=mode,ownership /lib/modules/5.17.9-2-MANJARO-ARM/modules.builtin.modinfo /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.builtin.modinfo
+ for _ in "${@:2}"
+ add_file /lib/modules/5.17.9-2-MANJARO-ARM/modules.order
+ local src=/lib/modules/5.17.9-2-MANJARO-ARM/modules.order dest=/lib/modules/5.17.9-2-MANJARO-ARM/modules.order mode= srcrealpath destrealpath
+ [[ ! -f /lib/modules/5.17.9-2-MANJARO-ARM/modules.order ]]
+ [[ -z '' ]]
+ [[ /lib/modules/5.17.9-2-MANJARO-ARM/modules.order == \/\l\i\b\/\m\o\d\u\l\e\s\/\5\.\1\7\.\9\-\2\-\M\A\N\J\A\R\O\-\A\R\M\/\m\o\d\u\l\e\s\.\o\r\d\e\r ]]
+ [[ -L /lib/modules/5.17.9-2-MANJARO-ARM ]]
+ [[ -L /lib/modules/5.17.9-2-MANJARO-ARM/modules.order ]]
+ [[ -z '' ]]
+ [[ ! -e /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM ]]
+ [[ -e /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.order ]]
+ quiet 'adding file: %s' /lib/modules/5.17.9-2-MANJARO-ARM/modules.order
+ (( _optquiet ))
+ plain 'adding file: %s' /lib/modules/5.17.9-2-MANJARO-ARM/modules.order
+ local 'mesg=adding file: %s'
+ shift
+ printf ' adding file: %s\n' /lib/modules/5.17.9-2-MANJARO-ARM/modules.order
adding file: /lib/modules/5.17.9-2-MANJARO-ARM/modules.order
+ [[ -z '' ]]
+ command cp --remove-destination --preserve=mode,ownership /lib/modules/5.17.9-2-MANJARO-ARM/modules.order /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.order
+ return 0
+ depmod -b /tmp/mkinitcpio.oaZ3eB/root 5.17.9-2-MANJARO-ARM
+ rm /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.alias /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.builtin /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.builtin.modinfo /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.dep /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.order /tmp/mkinitcpio.oaZ3eB/root/lib/modules/5.17.9-2-MANJARO-ARM/modules.symbols
+ set +o functrace
+ set +o errtrace
+ trap -- ERR
+ ldconfig -r /tmp/mkinitcpio.oaZ3eB/root
+ rm -f -- /tmp/mkinitcpio.oaZ3eB/root/var/cache/ldconfig/aux-cache
+ umask 077
+ [[ -n /home/alex/IMAGE ]]
+ build_image /home/alex/IMAGE gzip

Then it ends with :

+ (( _builderrors == 0 ))
+ (( _builderrors ))
+ warning 'errors were encountered during the build. The image may not be complete.'
+ local 'mesg=errors were encountered during the build. The image may not be complete.'
+ shift
+ printf '==> WARNING: errors were encountered during the build. The image may not be complete.\n'
==> WARNING: errors were encountered during the build. The image may not be complete.

but i guess the error is the «+trap -- ERR» above…
alexela
 
Posts: 13
Joined: Thu Aug 27, 2020 8:42 am


Return to General

Who is online

Users browsing this forum: No registered users and 6 guests