You are not logged in.

#1 2023-12-20 16:22:22

Wolfyxon
Member
From: Poland
Registered: 2022-11-21
Posts: 73
Website

[Solved] command failed to execute correctly, errors in mkinitcpio

I updated my system and saw this at the end:

==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
==> Image generation successful
error: command failed to execute correctly
(13/15) Reloading system bus configuration...
(14/15) Updating icon theme caches...
(15/15) Updating the desktop file MIME type cache...
[wolfyxon@WolfArch ~]$ 

I checked

mkinitcpio --verbose -P
==> Building image from preset: /etc/mkinitcpio.d/linux-lts-515-git.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -v -k /boot/vmlinuz-linux-lts-515-git -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts-515-git.img --microcode /boot/intel-ucode.img
==> ERROR: Unable to write to '/boot/initramfs-linux-lts-515-git.img'
==> Building image from preset: /etc/mkinitcpio.d/linux-lts-515-git.preset: 'fallback'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -v -k /boot/vmlinuz-linux-lts-515-git -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts-515-git-fallback.img -S autodetect --microcode /boot/intel-ucode.img
==> ERROR: Unable to write to '/boot/initramfs-linux-lts-515-git-fallback.img'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -v -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/intel-ucode.img
==> ERROR: Unable to write to '/boot/initramfs-linux.img'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -v -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/intel-ucode.img
==> ERROR: Unable to write to '/boot/initramfs-linux-fallback.img'

I'm scared to reboot now, what should I do?
Update log: http://0x0.st/HgbX.txt
("WARNING: errors were encountered during the build." The image may not be complete. has been appearing for a while now and my system is working properly. I haven't noticed "error: command failed to execute correctly" before)

Last edited by Wolfyxon (2023-12-20 18:27:02)

Offline

#2 2023-12-20 17:02:44

xerxes_
Member
Registered: 2018-04-29
Posts: 948

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

Do you have /boot directory mounted? Where and what permissions? Check /etc/fstab, output of 'mount' command and output of 'lsblk'.

And what are dkp-libs and dkp-linux repos?

Last edited by xerxes_ (2023-12-20 17:04:59)

Offline

#3 2023-12-20 17:06:23

Wolfyxon
Member
From: Poland
Registered: 2022-11-21
Posts: 73
Website

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

Yes it's mounted and I see the kernels there, however the img files don't have icons in thunar.

These additional repos are from DevkitPRO

Offline

#4 2023-12-20 17:12:09

nichts
Member
Registered: 2020-11-14
Posts: 34

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

Yes it's mounted

No space left? Check with ›df‹. Also remove broken files manually before trying again.


english is not my first language. If you find a mistake in this post, please mention it in your reply – this way I can learn.  TIA

Offline

#5 2023-12-20 17:26:31

Wolfyxon
Member
From: Poland
Registered: 2022-11-21
Posts: 73
Website

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

I have a lot of free space.

Offline

#6 2023-12-20 17:33:26

Wolfyxon
Member
From: Poland
Registered: 2022-11-21
Posts: 73
Website

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

Wait, I forgot that mkinitcpio isn't for showing the kernel build log history, it's for building it only. The errors were thrown because I didn't run is at root.
Also I checked a backup drive with some old kernels and they have no icons as well so the files aren't corrupted, it's a thunar issue.
I'm gonna try manually rebuilding the kernels with verbose.

Last edited by Wolfyxon (2023-12-20 17:35:49)

Offline

#7 2023-12-20 17:38:43

Wolfyxon
Member
From: Poland
Registered: 2022-11-21
Posts: 73
Website

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

No errors, so what's the "error: command failed to execute correctly" in pacman?

Last edited by Wolfyxon (2023-12-20 17:39:54)

Offline

#8 2023-12-20 17:43:42

xerxes_
Member
Registered: 2018-04-29
Posts: 948

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

If you run it now with root rights and before you were not, that was insufficient permissions to write to /boot directory.

Last edited by xerxes_ (2023-12-20 17:44:53)

Offline

#9 2023-12-20 17:46:02

Wolfyxon
Member
From: Poland
Registered: 2022-11-21
Posts: 73
Website

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

I know, but "error: command failed to execute correctly" was shown in pacman

Offline

#10 2023-12-20 18:00:05

xerxes_
Member
Registered: 2018-04-29
Posts: 948

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

That may be return of non zero value form failed hook - an error(s) when linux images were generated:
"WARNING: errors were encountered during the build. The image may not be complete."
0 value is returned when operation ends with success.

But as you rebuild them manually as root without an error then it should be ok.

Last edited by xerxes_ (2023-12-20 18:08:10)

Offline

#11 2023-12-20 18:26:43

Wolfyxon
Member
From: Poland
Registered: 2022-11-21
Posts: 73
Website

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

Got it, thanks.

Offline

#12 2025-10-11 13:54:11

justdanyul
Member
Registered: 2011-09-29
Posts: 137

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

Just want to add a tidbit, just in case it could be helpful and this is the first google result when searching for this error.

I had the exact same behaviour, and in my case it was the lack of a fsck program for btrfs. Installing btrfs-progs resolved the issue

Offline

#13 2025-10-12 07:46:54

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,417
Website

Re: [Solved] command failed to execute correctly, errors in mkinitcpio

Mod note: Please do not necro-bump. Closing this old thread.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

Board footer

Powered by FluxBB