Mailinglist Archive: opensuse (1620 mails)

< Previous Next >
Re: [opensuse] Re: boot with root as subvolume ** SOLVED **
В Mon, 24 Nov 2014 15:28:35 +0300
Andrei Borzenkov <arvidjaar@xxxxxxxxx> пишет:

On Mon, Nov 24, 2014 at 2:54 PM, Gour <gour@xxxxxxxxxxxx> wrote:
On Mon, 24 Nov 2014 13:14:59 +0300
Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote:

Weird. I'll need to reproduce it, but I'm on business trip this week
without access to my system so I'll be able to do it on weekend.
Sorry.

The crucial thing to solve was to do:

btrfs subvolume set-default id-of-@ /


It should not be necessary. Actually, grub was explicitly changed to
not require set-default. Good that you have workaround, but I will
look at it.

Then there was no more resuce mode in Grub and I found out that eve
Yast/Boot_Loader generates correct linux/initrd lines - not using '@' in
path, but it, somehow, works. :-)


I'm afraid it has something to do with suse-specific patches ...

Yes, it is SUSE specific patch to facilitate snapshot-booting.

If SUSE_BTRFS_SNAPSHOT_BOOTING is set to true in /etc/default/grub (I
think, it is default during new installation), grub2-mkconfig will
generate paths relative to SUBVOLUME, not full absolute paths as
upstream does. So e.g. for /some/subvol/path/to/file it will produce
just /path/to/file.

The intended usage is

- you have root in top level subvolume. For this case subvolume is
empty and paths are correct
- you have snapshots in some subvolume(s). To boot from snapshot, you
set grub variable btrfs_subvol to the subvolume path. This is
supposed to be done automatically by grub scripts.

So paths in snapshot remain the same (/boot/vmlinuz) but now point to
files in different subvolume.

Where it fails, is the case of primary root on subvolume - it never
generates those magic variables to point to to it. I remember speaking
with mchang and he mentioned that case of having root on separate
subvolume was never intended to be supported.

Unsetting SUSE_BTRFS_SNAPSHOT_BOOTING (or setting it to false) will
revert to upstream behavior.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >