Comment # 14 on bug 978593 from
(In reply to Alexander Graf from comment #10)

> 1) Btrfs naming
> ---------------

(Sigh) This is actually bothering me all the time, and I think even we need a
new bug separated from this one. 

> 
> I had a quick chat with Olaf who ran into a similar issue with Xen's pvgrub.
> 
> The basic problem boils down to difference between upstream grub2 btrfs
> handling and SUSE grub2 btrfs handling. While upstream uses full path names
> including the subvolume id:
> 
>   /@/boot/grub2

Yes, upstream use this relatively straight path scheme so that btrfs could be
treated like any other filesystems as if no subvolumes there ..

> 
> we omit the subvolume id and directly use a relative path into some default
> subvolume:
> 
>   /boot/grub2

We need to support booting into snapshots and also rollback via
btrfs-set-default so that relative path in a subvol is more straightforward as
you could switch different subvols to boot without changing the grub.cfg. But
the downside is also it's boot file could be varied by your subvol which is
ambiguous to know where it really located from the config at times (unlike the
absolute path scheme is always obvious). And also to access files outside the
subvol is an issue, currently we use btrfs-mount-subvol to get a subvol in a
path. In short it's more headache to get your config correct than absolute
path.

It's hard really hard, because upstream has settled with absolute path scheme
and wouldn't allow it to break. :( 

> 
> This leads to a number of problems. In this case, it means that
> grub2-install puts the upstream style path into the prefix template in
> grubaa64.efi while our btrfs driver code expects the downstream style path.

The path is controlled by SUSE_BTRFS_SNAPSHOT_BOOTING="true|false" (default
false) and will affect grub2-install and grub2-mkconfig.

> 
> In the pvgrub case, it means that grub2 compiled from upstream sources can't
> read our grub.cfg properly, since the paths don't match.

My only suggestion is disable btrfs snapshot booting and
SUSE_BTRFS_SNAPSHOT_BOOTING=false to use upstream path scheme. Sorry I don't
have solution to satisfy both ends.

Thanks


You are receiving this mail because: