I have had four hard days with trying to install OpenZFS 2.0.0 on a vanilla debian buster and to boot from it. To make a long story short, OpenZFS 2.0.0 runs, and buster boots from it, but only with a little bit of manual help:
After each reboot, grub goes to the command line. Obviously, it does not execute grub.cfg. If I manually execute grub.cfg, the system boots.
Please note that I have read a zillion of other threads and Q & A which all were dealing with grub being at the command line after reboot. However, I have not found a question similar to mine - I believe I have tracked down the problem so far that my question is very specific:
When I issue
set at grub's command prompt, there is (among others, of course) the following line:
I am not a Linux expert, let alone a grub expert. So I might be wrong, but I believe that this is the culprit, because the bootloaders (
shimx64.efi, respectively) along with the configuration file (
grub.cfg) actually are in
(hd0,gpt2)/EFI/debian-hdd1 (please note the trailing
-hdd1, which the value of
prefix lacks), not in
Consequently, when I issue
normal at the command line, nothing happens (well, the screen seems to refresh, but nothing else). But when I first type
and then type
normal, the normal grub boot menu appears.
This makes me assume that the
prefix variable is wrong in this special situation. Obviously, when reaching the command prompt, grub has not executed any script yet. Therefore, value of
prefix must be a default value.
Where does grub get this default value from? Is it a compile-time option, or can I set it somewhere? That is, how can I set the default value of grub variables, notably
prefix (i.e. the value these variables have when no script has been run yet)?
Off-topic side note:
I am aware that I probably could solve the problem by installing
.../debian instead of
.../debian-hdd1. I haven't tried that for two reasons yet:
I really would like to learn how to change grub's default value of
prefix(call it curiosity or pedantry).
I am installing grub by
grub-install, which obviously uses the UEFI boot entry name (set by giving the option
--bootloader-id=debian-hdd1) as the directory name it creates.
I need a boot entry name of that form because the rpool the system starts from consists of a mirror of two disks, and if one of them fails, I'd like to be able to boot from the other one. Therefore, I need to be able to distinguish the two disks in the UEFI BIOS setup.