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

From: Stefan <[email-masked]>
Date: Sun, 30 Oct 2022 18:31:43 +0100

Hi Petr!

It must be that your initrd is missing in the store.

The /boot/grub/grub.cfg is the only file referring to the initrd and GRUB is the only program reading it. So an error message referring to the initrd must be from GRUB and then GRUB was able to access your root-file-system, which should contain /boot and /gnu/store.

Bye

Stefan

> Am 30.10.2022 um 18:08 schrieb Stefan <[email-masked]>:
> 
> Hi Petr!
> 
>> Shoudn't the initrd be placed in the EFI partition?
> 
> No. As on a PC, the /boot/grub/grub.cfg lists the location of the initrd in the store, as it does for the kernel as well. Grub is able to read from most file-systems and load the initrd.
> 
>> Should I copy it and modify the Grub entry?
> 
> No.
> 
>> Unfortunately I get error about missing file:
>> 
>> ```
>> error: file /gnu/store/xxx-raw-initrd/initrd.cpio.gz not found
>> Press any key to continue ...
>> ```
> 
> Is this error from GRUB? Is that file actually existing?
> 
>> I formatted it with fat32 and ext4. Ran `guix system init config.scm /init`.
>> 
>> I selected `(initrd-modules (list "xhci_pci" "pcie_brcmstb"))` in the config and rebooted.
> 
> Was there maybe some error message about missing kernel-modules?
> 
> Was the GRUB screen as usual with a background graphic? Because that is loaded from the store as well.
> 
> If not, then GRUB is not able to access the store. Check the content of /boot/efi/efi/boot/grub.cfg. It contains two lines: one to search for the right file-system containing the /boot/grub/grub.cfg, and another to load it.
> 
> The search line is usually referring to an fs-uuid determined during the bootloader installation with the help of the grub-probe command. However, there is the risk grub-probe does not find an fs-uuid. In that case as a fallback the search command will look for a /boot/grub/grub.cfg on any readable file-system. Maybe it found one on a wrong file-system?
> 
>> The goal here is to run completly from USB then there won't be any need for SD card.
> 
> 
> From what you wrote, U-Boot is able to boot from USB and load GRUB. I’m just not absolutely sure, if GRUB is able to boot from USB on the RPi 4, but I would think so.
> 
> 
> Bye
> 
> Stefan