What if I put /boot and /boot/grub in different sub volumes? How do I set
variables then in order to correctly load additional modules from $prefix
and yet load correct kernels? This convoy is needed in order to load
several linuxes from the same btrfs (think installing v1 then making a
clone and upgrading one of them to v2).

Le lun. 14 oct. 2024, 20:09, Leo Sandoval <lsand...@redhat.com> a écrit :

> From: Michael Chang <mch...@suse.com>
>
> We should export btrfs_subvol and btrfs_subvolid to have both visible
> to subsidiary configuration files loaded using configfile.
>
> Signed-off-by: Michael Chang <mch...@suse.com>
> ---
>  grub-core/fs/btrfs.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
> index 8e2b1e9f7..14e38a4df 100644
> --- a/grub-core/fs/btrfs.c
> +++ b/grub-core/fs/btrfs.c
> @@ -2920,6 +2920,8 @@ GRUB_MOD_INIT (btrfs)
>                                 subvol_set_env);
>    grub_register_variable_hook ("btrfs_subvolid", subvolid_get_env,
>                                 subvolid_set_env);
> +  grub_env_export ("btrfs_subvol");
> +  grub_env_export ("btrfs_subvolid");
>  }
>
>  GRUB_MOD_FINI (btrfs)
> --
> 2.46.2
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to