Subject: Re: [PATCH v3] Install guix system on Raspberry Pi

From: Stefan <[email-masked]>
Date: Wed, 20 Jul 2022 08:13:46 +0200

Hi Petr!

> So now I get some weird guix error during copying files:

> initializing operating system under '/mnt'...
> copying to '/mnt'...  [####################                                                                                         ]guix system: error: readdir: Bad message
> copying to '/mnt'...

The function make-grub-efi-netboot-installer in gnu/bootloader/grub.scm first uses copy-recursively to copy the collection of bootloader files to /mnt/boot/efi and creates afterwards the symlinks to /gnu/store and /boot/grub/grub.cfg or – as in your case – creates a /mnt/boot/efi/efi/boot/grub.cfg to point GRUB to the root partition to access /boot/grub/grub.cfg and /gnu/store.

Yesterday your guix system init struggled to create these symlinks. That means it was already done with the copy-recursively call.

I’m pretty sure that this copy-recursively is using readdir internally. The functionallity afterwards is surely not.

Yesterday you also got the message ‘populating '/mnt'…’ before the symlink struggle. Therefore I assume that your current error has nothing to do with the bootloader installation. 

Maybe there are leftovers from yesterday in /mnt, which prevent guix to copy files sucessfully onto /dev/mmcblk0p2?

Reformatting the ext4 filesystem might help.

Bye

Stefan