You are not logged in.
Hello,
I'm building a custom Arch Linux ISO using mkarchiso, but the process always fails during the mksquashfs stage.
Here’s the output I get:
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on /home/sma/Desktop/Helwan-Linux-Dev-Cinnamon/work/iso/arch/x86_64/airootfs.sfs, block size 1048576.
[=========/ ] 61614/385709 15%
/usr/bin/mkarchiso: line 184: 33780 Segmentation fault (core dumped) mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}" "${mksquashfs_options[@]}"
to troubleshoot, I modified the image tool options in my profiledef.sh to limit compression threads:
sudo pacman -Syu squashfs-tools archiso
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M' '-processors' '1')
But the segmentation fault still happens at the same stage.
I already tried:
Cleaning work/ and out/ directories before each build
Updating archiso and squashfs-tools (sudo pacman -Syu)
Running with sufficient disk space (~30GB free)
My system:
Arch Linux x86_64
Kernel: 6.17.7.arch1-1
RAM: 8GB
squashfs-tools version: 4.7.3-1
archiso version: 64-1
Note: I reinstalled the system from scratch before trying this build.
Thanks in advance!
Last edited by saeedbadrelden2021 (2025-11-09 07:29:26)
Offline
Hello!
I got the same error that caused the program to crash, but I also got an error before that:
-> Running build hook: [memdisk]
-> Running build hook: [archiso]
==> ERROR: file not found: '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
/usr/lib/initcpio/functions: line 1068: /usr/lib/initcpio/udev/11-dm-initramfs.rules: No such file or directory
-> Running build hook: [archiso_loop_mnt]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'xhci_pci_renesas'
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
==> Generating module dependencies
==> Creating xz-compressed initcpio image: '/boot/initramfs-linux.img'
==> WARNING: errors were encountered during the build. The image may not be complete.
error: command failed to execute correctly
It seems to be related to the initcpio program:
ERROR: file not found: '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
/usr/lib/initcpio/functions: line 1068: /usr/lib/initcpio/udev/11-dm-initramfs.rules: No such file or directory
I don't know what the solution might be, maybe an update will fix it.
Offline
Can you check whether compression libraries used by mksquashfs are up to date?
$ pacman -Q zlib lzo lz4 xz zstd gcc-libsCan you check whether recent core dump stored in journal?
$ coredumpctl list -n 10 mksquashfs
$ coredumpctl info mksquashfsOffline
All programs are up to date.
coredumpctl info mksquashfs last output:
PID: 248740 (mksquashfs)
UID: 0 (root)
GID: 0 (root)
Signal: 11 (SEGV)
Timestamp: Sun 2025-11-09 13:19:16 CET (42min ago)
Command Line: mksquashfs /home/tibi/archlive/archiso/work/x86_64/airootfs /home/tibi/archlive/archiso/work/iso/answeros/x86_64/airootfs.sfs -noappend -comp xz -Xbcj x86 -b 1M -Xdict-size 1M
Executable: /usr/bin/mksquashfs
Control Group: /user.slice/user-1000.slice/session-2.scope
Unit: session-2.scope
Slice: user-1000.slice
Session: 2
Owner UID: 1000 (tibi)
Boot ID: 11a2595b6015445da526332b9860a9fe
Machine ID: 07ad17a6874348289fa13141e12be34a
Hostname: arch
Storage: none
Message: Process 248740 (mksquashfs) of user 0 terminated abnormally without generating a coredump.
Offline
coredumpctl info mksquashfs last output:
PID: 248740 (mksquashfs)
UID: 0 (root)
GID: 0 (root)
Signal: 11 (SEGV)
...
Message: Process 248740 (mksquashfs) of user 0 terminated abnormally without generating a coredump.
Is the issue reproducible when you run just mksquashfs with the same parameters from command line as non-root user? If it is, let it dump core and run
$ coredumpctl debug mksquashfsThis should start gdb. In gdb prompt run "backtrace" and show output.
Last edited by dimich (2025-11-09 14:26:51)
Offline
Message: Process 248740 (mksquashfs) of user 0 terminated abnormally without generating a coredump.
Did you disable coredumps?
If you don't want to enable them and can reproduce this interactively you could try to run "gdb mksquashfs"
@cybertibi
/usr/lib/initcpio/functions: line 1068: /usr/lib/initcpio/udev/11-dm-initramfs.rules: No such file or directory
https://gitlab.archlinux.org/archlinux/ … 0c473418f8
What looks for that?
Offline
After running archiso hook:
-> Running build hook: [archiso]
==> ERROR: file not found: '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
/usr/lib/initcpio/functions: line 1068: /usr/lib/initcpio/udev/11-dm-initramfs.rules: No such file or directory
Offline
What looks for that?
At least I think nothing should, this was merged 10 months ago
Offline
pacman -Qikk mkinitcpio
cat /etc/mkinitcpio.confOffline
Sorry everyone, but there is a bug in the latest Mksquashfs 4.7.3 (released 5th Nov). I have made a new 4.7.4 release and it should be picked up soon.
Offline
Offline
This error is still present:
-> Running build hook: [archiso]
==> ERROR: file not found: '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
/usr/lib/initcpio/functions: line 1068: /usr/lib/initcpio/udev/11-dm-initramfs.rules: No such file or directory
The contents of this file: /usr/lib/initcpio/install/archiso
#!/usr/bin/env bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
build() {
add_module "cdrom"
add_module "loop"
add_module "dm-snapshot"
add_module "overlay"
add_runscript
add_binary blockdev
add_binary dmsetup
add_binary losetup
add_binary openssl
add_binary lsblk
if command -v pv >/dev/null 2>&1; then
add_binary pv
else
warning 'pv not found; falling back to cp for copy to RAM'
fi
add_udev_rule 60-cdrom_id.rules
add_udev_rule 10-dm.rules
add_udev_rule 95-dm-notify.rules
add_udev_rule /usr/lib/initcpio/udev/11-dm-initramfs.rules
if [[ -v ARCHISO_GNUPG_FD ]]; then
add_binary gpg
add_dir '/gpg' 0700
gpg --homedir "$BUILDROOT/gpg" --import <&"$ARCHISO_GNUPG_FD"
fi
if [[ -v ARCHISO_TLS_FD ]]; then
cat <&"$ARCHISO_TLS_FD" | add_file - '/codesign.crt' 644
fi
if [[ -v ARCHISO_TLSCA_FD ]]; then
cat <&"$ARCHISO_TLSCA_FD" | add_file - '/codesign_CA.crt' 644
fi
}
This line, which causes an error, is still there:
add_udev_rule /usr/lib/initcpio/udev/11-dm-initramfs.rules
Offline
Offline
This line, which causes an error, is still there:
add_udev_rule /usr/lib/initcpio/udev/11-dm-initramfs.rules
That file is owned by the package mkinitcpio-archiso.
I created an issue for it: https://gitlab.archlinux.org/archlinux/ … /issues/20
Offline
Sorry everyone, but there is a bug in the latest Mksquashfs 4.7.3 (released 5th Nov). I have made a new 4.7.4 release and it should be picked up soon.
Thanks a lot — you’re the only one who really cared about my issue.
I’ve already installed squashfs-tools 4.7.4-1 yesterday, but unfortunately I’m still getting this error:
Creating 4.0 filesystem on /home/sma/Desktop/Helwan-Linux-Dev-Cinnamon/work/iso/arch/x86_64/airootfs.sfs, block size 1048576.
[================================================| ] 302599/385596 78%
FATAL ERROR: xz uncompress failed with error code 9
Offline
That's a completely different error now - xz cannot decompress a file.
EBADF 9 Bad file descriptorRun "mkarchiso -v" and in doubt trace mkarchiso (set -x) to see what command fails if the verbose mode isn't verbose enough.
Offline
cybertibi wrote:This line, which causes an error, is still there:
add_udev_rule /usr/lib/initcpio/udev/11-dm-initramfs.rulesThat file is owned by the package mkinitcpio-archiso.
I created an issue for it: https://gitlab.archlinux.org/archlinux/ … /issues/20
I replaced the old archiso file with the new fixed version, but the error persists:
-> Running build hook: [memdisk]
-> Running build hook: [archiso]
==> ERROR: file not found: '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
/usr/lib/initcpio/functions: line 1068: /usr/lib/initcpio/udev/11-dm-initramfs.rules: No such file or directory
-> Running build hook: [archiso_loop_mnt]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'xhci_pci_renesas'
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
==> Generating module dependencies
==> Creating xz-compressed initcpio image: '/boot/initramfs-linux.img'
==> WARNING: errors were encountered during the build. The image may not be complete.
error: command failed to execute correctly
Offline
https://archlinux.org/packages/extra/an … o-archiso/ and not been updated since january?
What exactly did you do?
Offline
https://archlinux.org/packages/extra/an … o-archiso/ and not been updated since january?
What exactly did you do?
I deleted the contents of the old file /usr/lib/initcpio/install/archiso, and copied the contents of the new, corrected file into its place!
The error still appears when I run the mkarchiso command.
Update:
I realized that when mkarchiso runs, it uses the mkinitcpio-archiso package included in the packages.x86_64 file, so fixing the file contents in the local system was pointless!
Last edited by cybertibi (2025-11-13 10:56:13)
Offline
The gitlab repo is already updated
Install mkinitcpio-archiso-git from AUR to install 'mkinitcpio-archiso' without '11-dm-initramfs.rules'
Offline
The gitlab repo is already updated
Install mkinitcpio-archiso-git from AUR to install 'mkinitcpio-archiso' without '11-dm-initramfs.rules'
Thanks for your help, everyone! It seems that installing the mkinitcpio-archiso-git package has fixed the other error as well!
Offline
Hi All, I've just come across this thread while trying to follow Busybox based initramfs (built with mkinitcpio) .
When I regenerate the initramfs with
# mkinitcpio -p linuxI get the same error:
==> ERROR: file not found: '/usr/lib/initcpio/udev/11-dm-initramfs.rules'The issue seems to be related to changing the "encrypt" hook to "encryptssh" - reverting that removes the error.
In my case installing mkinitcpio-archiso-git didn't seem to do anything. Is there something I'm missing?
Last edited by cakeslice (2025-11-14 22:05:43)
Offline
That's correct you're probably using 'mkinitcpio-utils 0.0.5-1' which wasn't updated yet
There is a ticket but the package must still be updated
https://github.com/grazzolini/mkinitcpi … /issues/24
https://github.com/grazzolini/mkinitcpi … yptssh#L26
Offline
Yeah that's right I am - thanks for the info, sounds like I got confused between the hooks and I don't actually need `mkinitcpio-archiso-git`.
I'll wait for the package to be updated.
Offline
Sure you can wait or use this opportunity to build your own package
I'll give you the patch and PKGBUILD for free
remove-11-dm-initramfs.patch
diff -ura src.orig/mkinitcpio-utils-0.0.5/initcpio/install/encryptssh src.new/mkinitcpio-utils-0.0.5/initcpio/install/encryptssh
--- src.orig/mkinitcpio-utils-0.0.5/initcpio/install/encryptssh 2025-11-15 16:12:02.769898214 +0100
+++ src.new/mkinitcpio-utils-0.0.5/initcpio/install/encryptssh 2025-11-15 16:13:36.708101433 +0100
@@ -23,7 +23,6 @@
add_file "/usr/lib/udev/rules.d/10-dm.rules"
add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
- add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
add_binary "/usr/share/mkinitcpio-utils/utils/shells/cryptsetup_shell" "/bin/cryptsetup_shell"# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
pkgname=mkinitcpio-utils
pkgver=0.0.5
pkgrel=2
pkgdesc="Collection of Archlinux mkinitcpio utilities performing various tasks"
arch=('any')
url="https://github.com/grazzolini/mkinitcpio-utils"
license=('BSD')
depends=('cryptsetup')
optdepends=('mkinitcpio-dropbear: Allow the encryptssh hook to unlock a root container remotely using dropbear'
'mkinitcpio-tinyssh: Allow the encryptssh hook to unlock a root container remotely using tinyssh')
changelog='ChangeLog'
source=("${pkgname}-${pkgver}.tar.gz::$url/archive/v$pkgver.tar.gz"
'remove-11-dm-initramfs.patch')
sha512sums=('987fa4e2a944d415a5cc336010c33fdbb04e8a49793309a36762b5d5f9ba421eac8f7d403c856ca24f42e3a091726298dadad624c25fcb53d041d24020152bd1'
'SKIP')
prepare() {
cd "$srcdir"
patch --forward --strip=1 --input="$srcdir/remove-11-dm-initramfs.patch"
}
package() {
install -Dm755 "$srcdir/$pkgname-$pkgver/utils/shells/cryptsetup_shell" "$pkgdir/usr/share/$pkgname/utils/shells/cryptsetup_shell"
install -Dm644 "$srcdir/$pkgname-$pkgver/README.md" "$pkgdir/usr/share/$pkgname/README.md"
install -Dm644 "$srcdir/$pkgname-$pkgver/initcpio/hooks/encryptssh" "$pkgdir/usr/lib/initcpio/hooks/encryptssh"
install -Dm644 "$srcdir/$pkgname-$pkgver/initcpio/install/encryptssh" "$pkgdir/usr/lib/initcpio/install/encryptssh"
install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}Offline