On Tue, Jul 21, 2015 at 10:35 AM, Michael Chang
Default bootloader in fixed subvolume, e.g. /mboot. "Local bootloader" in root subvolume, e.g in $subvol/boot Master bootloader multiboots local bootloader from $subvol/boot/xxx/core.img, passing it subvolume as parameter. Default subvolume to boot from either as subvolume property (preferable if btrfs developers agree) or as environment block in fixed location, e.g. /mboot/bootconfig.
In this scheme /mboot is installed just once and can be left alone. It has static grub.cfg that looks for available subvolumes and presents them in menu. Switching root environment means just setting variable in /mboot/bootconfig.
I did try the approach similar to yours, but ended up in failure. If my memory serves me well, the problem of multiboots local bootloader",
for eg.
multiboot $subvol/boot/grub/core.img
is that we cannot change it's $prefix and also all varaible gets reset. That means we cannot pass variable to it, while it's possible through source a config file. That means prefix can make it reference to an deleted snapshot from which it got snapshotted.
Another shortcoming is, you may not be able to go back to upper menu after booting core.img.
As master bootloader is at fixed location it is always possible to chain back to it from any other core.img.
Required changes on grub side are
- make grub-mkconfig scripts generate btrfs paths relative to run-time subvolumes (current SUSE patches effectively do this already).
- make grub accept parameters passed via multiboot/EFI (everyone agrees it is needed, the question is mostly semantic). On EFI it may not even be needed because grub already knows where it was booted from, so likely can extract subvolume (with some help from btrfs).
That sounds like an attempt to fix the problem I have as described above.
Yes. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org