[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booting a Raspberry Pi

From: Wicki Gabriel (wicg)
Subject: Re: Booting a Raspberry Pi
Date: Mon, 30 Oct 2023 15:09:39 +0000

Hi Stefan

and thanks for that fast and competent answer!

The problem stems from the fact that my configuration places the grub.cfg into 
/boot/grub/grub.cfg on the second partition (which hosts the system files) 
while $root is set to (hd0,msdos1) - the first partition on the SD card. I've 
tried a couple of combinations (an ugly hack would suffice) to make it work, 
but unfortunately i don't know how to tell GRUB to use the correct grub.cfg​ on 
the second partition, nor am i able to create a fake redirect grub.cfg​ at the 
currently configured location (hd0,msdos1)/efi/boot/grub/:

In procedure mkdir: Permission denied: "./tmp-root/efi/boot/grub"
From: Stefan <>
Sent: Saturday, October 28, 2023 12:01 PM
To: Wicki Gabriel (wicg) <>; <>
Subject: Booting a Raspberry Pi

Hi Gabriel!

I boot my Raspberry from NFS, but it isn’t in use since some time. I 
experienced a problem ending in the GRUB rescue shell a year ago¹.

At that point my system switched from u-boot 2020.10 to 2022.4. Although I was 
net-booting, I still used a microSD card with only a bootcode.bin on it to work 
around known ROM code issues.

Using u-boot 2020.10, GRUB was working. Switching to u-boot 2022.4, GRUB had a 
similar problem:

Error: variable `root' isn't set.
Entering rescue mode...
grub rescue>

By just removing the microSD card, GRUB had no issues any more being loaded by 
u-boot 2022.4. I never figured out the root cause of this problem. Anyway, your 
problem seems to be different. There is no error message and no rescue shell. 
It seems that GRUB boots into its shell by intention.

Inspect the environment variables in GRUB with the ‘set’ command, to figure out 
why GRUB doesn’t seem to load a grub.cfg file. The variables ‘root’ and 
'prefix' are of special interest.

There should be a file efi/boot/grub.cfg on your microSD card. Check its 
content. It should contain two lines. Either

search --file --set /gnu/store/…-grub.cfg
configfile /gnu/store/…-grub.cfg

or (actually expected)

search --fs-uuid --set …
configfile /gnu/store/…-grub.cfg

In the latter case, the UUID has to match the one of the Guix file-system on 
your microSD card. If this is not the case, then correct the UUID. Or change 
the first line containing ‘search --fs-uuid …’ with the other one containing 
‘search --file …’.

The installation function uses ‘grub-probe --target=fs_uuid 
/gnu/store/…-grub.cfg’ to query this UUID. I could imagine that the installer 
gets the path to a grub configuration in the host’s store, rather than the 
store inside the image, leading to the wrong UUID of the host’s file-system.

Also check the presence and the content of that /gnu/store/…-grub.cfg file.

The installation function has only been tested by me with ‘guix system init’ 
and ‘guix system reconfigure’. I didn’t check an image creation, I think it 
wasn’t even possible at that time.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]