You are not logged in.

#1 2026-01-05 05:00:50

componentscience
Member
Registered: 2024-01-05
Posts: 20

[Solved] Pacstrap error: failed to detect root filesystem

When running pacstrap the following error is thrown during the mkinitcpio build: Error: failed to detect root filesystem. It appears to occur during the 'autodetect' hook.

# mkdir PacstrapTest
# pacstrap -K -c PacstrapTest base linux
# uname -a
Linux in000 6.18.2-arch2-1

Stdout & stderr
https://0x0.st/PoLC.txt

Last edited by componentscience (2026-01-05 15:47:33)

Offline

#2 2026-01-05 07:30:13

5hridhyan
Member
From: Asia
Registered: 2025-12-25
Posts: 640

Re: [Solved] Pacstrap error: failed to detect root filesystem

If this is a real install, have you mounted the target filesystem?
If it’s a directory-based build, either remove the autodetect hook or ignore the warning and if you want you can regenerate the initramfs later.

Last edited by 5hridhyan (2026-01-05 18:02:54)


"Nothing matters" -a Nihilist
"Why bother thinking what matters?" -me

Online

#3 2026-01-05 15:46:43

componentscience
Member
Registered: 2024-01-05
Posts: 20

Re: [Solved] Pacstrap error: failed to detect root filesystem

Yes it's a directory-based build. I will remove the hook and regenerate the initramfs in the local directory. Thank you.

Offline

#4 2026-01-05 15:59:28

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,723

Re: [Solved] Pacstrap error: failed to detect root filesystem

Wait, if this is just a directory that you're not going to boot, why are you installing a kernel and generating an initramfs at all?

Offline

#5 2026-01-05 16:20:08

cryptearth
Member
Registered: 2024-02-03
Posts: 2,090

Re: [Solved] Pacstrap error: failed to detect root filesystem

@Scimmia
when building kernel modules in a chroot, as an example
the current archzfs project uses clean-chroot-manager to build packages as upstream zfs only builds deb and rpm packages
for instance since some update I too get some error during the initrd build because its done whenever the chroot updates the kernel - but it doesn't affect the kmod build or packaging as this environment doesn't get bootet

Offline

#6 2026-01-05 16:32:48

componentscience
Member
Registered: 2024-01-05
Posts: 20

Re: [Solved] Pacstrap error: failed to detect root filesystem

@Scimmia wrote:

Wait, if this is just a directory that you're not going to boot, why are you installing a kernel and generating an initramfs at all?

Correct this will not be booted from directly and doesn't require a kernel. It will be used for testing, among other purposes, for another disk image building project. I do not recall seeing this error before which is why I created the post. I may have just overlooked it in the past.

Regards

Last edited by componentscience (2026-01-05 16:57:21)

Offline

#7 2026-01-05 16:33:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,723

Re: [Solved] Pacstrap error: failed to detect root filesystem

cryptearth wrote:

@Scimmia
when building kernel modules in a chroot, as an example

That would be using mkarchroot, not pacstrap, and you would use base-devel instead of base. If that's what's going on here, things aren't going to go well.

componentscience, so why do you need a kernel for that?

Last edited by Scimmia (2026-01-05 16:34:47)

Offline

#8 2026-01-05 17:46:49

componentscience
Member
Registered: 2024-01-05
Posts: 20

Re: [Solved] Pacstrap error: failed to detect root filesystem

Scimmia wrote:

componentscience, so why do you need a kernel for that?

The kernel is not required. The intention was to examine very closely what pacstrap installs, and in the process stumbled into the error. I probably posted this prematurely. Thanks for the response.

Offline

#9 2026-01-06 02:13:25

cryptearth
Member
Registered: 2024-02-03
Posts: 2,090

Re: [Solved] Pacstrap error: failed to detect root filesystem

Scimmia wrote:
cryptearth wrote:

@Scimmia
when building kernel modules in a chroot, as an example

That would be using mkarchroot, not pacstrap, and you would use base-devel instead of base.

feel free to give your input: https://github.com/archzfs/archzfs
there actually are ambitions to get rid of clean-chroot-manager
maybe you can help

Offline

#10 2026-01-06 02:39:27

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,723

Re: [Solved] Pacstrap error: failed to detect root filesystem

zfs isn't something I have any interest in. clean-chroot-manager already uses mkarchroot anyway.

Offline

Board footer

Powered by FluxBB