On 2025-11-14 20:38, Ashish SHUKLA wrote:

El 2025-11-14 12:15, Ashish SHUKLA escribió: El 2025-11-13 21:46, Marius escribió:

El 13 de noviembre de 2025 14:43:48 UTC, Ashish SHUKLA <[email protected]> escribió: El 2025-11-13 00:20, Marius escribió:

El 12 de noviembre de 2025 15:38:59 UTC, Roman Riabenko <[email protected]> escribió: У ср, 2025-11-12 у 08:47 +0000, Marius пише: El 12 de noviembre de 2025 6:42:28 UTC, Roman Riabenko <[email protected]> escribió: У ср, 2025-11-12 у 08:32 +0200, Roman Riabenko пише: У ср, 2025-11-12 у 01:15 +0000, Marius via пише: The thing is that i've configured the encrypted disk as a BTRFS
filesystem with --checksum xxhash (xxhash64 as btrfs decided),
--
metadata single, -n 32k (so nodesize of 32KiB). I give you this
info
in case it helps with helping out. When booting into the initrd I get this error that says that
 it's
unable to open the filesystem because no xxhash64 hash is
available. > > > > > > From this message I understand that probably the initrd is
lacking
the xxhash64 module in order to read the btrfs filesystem. > > > > > > So how do I specify to the operative-system config the initrd-
module
so it gets built and loaded? I know there is the operative-
system
keyname/field initrd-modules that I can supply with an improper
list
with modules to load. But which is the correct name for the
xxhash64
module? From internet I got that there's a xxhash-generic
module
for
the linux kernel. Would that work ("xxhash-generic")?

The following option in the operating-system declaration allows
 me to
boot with the root partition formatted as btrfs with --checksum
xxhash,
which has csum_type xxhash64 as the result.

(initrd-modules (cons "xxhash_generic" %base-initrd-modules))

For this configuration to build, it is also necessary to add
"linux" to
"use-service-modules", which is usually in the top of the system
configuration.

(use-service-module linux ...

I guess that (use-service-module linux) is the same as (use-module
gnu services linux)? Or does it do something more fancy? Do i need to
Yes, (use-modules (gnu services linux)) and (use-service-modules linux)
provide the same result. It is a kind of a shorthand. The latter
expands to the former. Also, sorry for the typo at the end of the name
of use-service-modules in the example.

add it because of kernel-module-loader-service-type?

No, xxhash_generic appears to be loaded by the kernel automatically, so
you should only need to add it to initrd-modules. You should not need
to use a service of kernel-module-loader-service-type.

This means that I also need to declare more services in the 'service
keyname/field of the operative-system definition for xxhash to work?

Sorry for confusion. In a hurry, I misread my notes in the config file
about the reasons for inclusion of that module. You should not need
adding modules or services to utilize btrfs with xxhash. The code from
my initial reply should be sufficient.

Roman

Sadly I wasn't not able to make it work. I get this before entering into a scheme repl:

registered: /dev/mapper/ncrypt
BTRFS error (device dm-0): error allocating xxhash64 hash for checksum
BTRFS error (device dm-0): open_ctree failed -2
ice-9/boot.scm:1685:16: In procedure raise-exception:
In procedure mount: No such file or directory.

I added (initrd-modules (cons "xxhash_generic" %base-initrd-modules)) into my os configuration, no luck.

I have btrfs subvolumes for root, home and gnu/store like so: rootfs, rootfs/home and rootfs/guix-store. Since the btrfs subvolume location does not correspond to the mount point for root and guix-store, i've declared their corresponding filesystem, both of them with needed-for-boot #t. The target for encrypted devices is always /dev/mapper/ncrypt in my config with dependencies on the mapped device of ncrypt.

For the EFI partition ("/boot/efi") i have also added a filesystem entry referring to the fat uuid, i did not setup needed-for-boot #t.

At this point i don't know what could be stopping it from working. The btrfs filesystem was created with the flags xxhash, --metadata single (because it's a high end ssd) -n 32k.

Any help is appreciated. Beyond this any additional setup goes beyond what I know about guix

Thank you in advance.

Best regards,
Could you share your configuration, operating-system definition, at least the file-systems, mapped-devices, initrd-modules, ... ?

And also did you re-run 'guix system reconfigure ...' or 'guix system init' after updating 'initrd-modules' ?

HTH

I did run guix system init since i haven't been able to boot properly yet. So I'm installing the system each time I fail. My config;

(use-modules (gnu) (gnu system nss) (gnu system locale))

(use-modules (gnu packages))

(use-modules (nongnu packages linux))

(use-package-modules certs gnome linux))

(use-service-modules desktop xorg)

(operating-system

 ....
 (kernel linux)
 (initrd-modules (cons* "xxhash-generic" % base-initrd-modules))
 (firmware (cons* iwlwifi-firmware linux-firmware %base-firmware))
 (keyboard-layout (keyboard-layout "us" "altgr-intl"))
 (kernel-arguments %default-kernel-arguments)

(bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (targets '("/boot/efi")) (keyboard-layout keyboard-layout)))

(mapped-device ... (target "ncrypt) (type luks-device-mapping))

(file-systems (append (list
(file-system (type "btrfs") (mount-point "/") (device "/dev/mapper/ncrypt") (options "space_cache=v2,compress=zstd,ssd,discard,subvol=rootfs") (needed-for-boot #t) (dependencies mapped-devices))

(file-system (type "btrfs") (mount-point "/gnu/store") (device "/dev/mapper/ncrypt") (flags '(no-atime)) (options "space_cache=v2,compress=zstd,ssd,discard,subvol=rootfs/guix-store") (needed-for-boot #t) (dependencies mapped-devices))
I remember reading somewhere (and experienced) that using discard option
can cause filesystem corruption with certain SSDs (manufacturer x model
x firmware versions), and instead fstrim service to be used.

....

(file-system (type "vfat") (mount-point "/boot/efi") (device (uuid ....)) (flags '(no-atime)) (needed-for-boot #t)))

%base-file-systems))

I copied by hand so it may have some miss type or missing parenthesis. I didn't put the swap config but basically i have a btrfs swap file from the btrfs subvol=swap.

I inspected the generated initrd and it has the xxhash-generic stored in the /gnu/store that is shipped inside the initrd.img.gz that the grub.cfg points to.

If you already see the mentioned .ko files in the initrd, then something
else might be problem. Maybe the message is misleading, or one of the
dependent modules are missing. I need to look at the code.

With all that I get the error I commented on previous messages.

Do i have to put something like this in the initrd os config field? :

(initrd (lambda (file-systems . rest)
(apply base-initrd file-systems
#:linux-modules (cons* "xxhash-generic %base-initrd-modules)
rest)))

For me something like following works to include kernel modules in
initrd:

    (define %initrd-modules '("kyber-iosched" "bfq"))

    (operating-system
      ....
      (initrd-modules
        (append %initrd-modules %base-initrd-modules))
      ...)

HTH
Also, you can try `loglevel=8` (or larger number) at the kernel command-line to get more verbose output, in case xxhash is failing to load, or something else going on.

HTH

Hello everyone. I just noticed that my last message (from Friday) wasn't sent correctly.

I found out what was the problem. The module name is "xxhash_generic" with underscore! Even though the guix building process was creating a xxhash-generic.ko kernel module, that wasn't the right one. I don't know if that is a bug or there actually exist the xxhash-generic kernel driver. My operative-system definition has now this initrd-modules configuration:

(initrd-modules (cons* "xxhash_generic" "xxhash" "btrfs" %base-initrd-modules))

Anyways, thank you for your help!

Best regards,

Marius

Reply via email to