grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: booting btrfs


From: Chris Murphy
Subject: Re: booting btrfs
Date: Tue, 7 Jan 2014 10:55:26 -0700

On Jan 1, 2014, at 10:17 PM, Michael Chang <address@hidden> wrote:
> 
> We snapshot /boot for kernel and initrd, otherwise the rollback would
> encounter problem of incompatible userland and kernel/kernel modules.
> And we need the ability to rollback them in terms of usefulness.

Of course, understood.

core.img is only going to point to one /boot, which may not be the /boot 
snapshot needed for the kernel and initrd. This will be really confusing for 
mortal users. They'd be unlikely to figure it out and understand it, without 
documentation.

If core.img points to the "current" /boot, which it should, that boot has the 
accumulated knowledge of all snapshots, and any recently updated grub modules. 
Choosing to boot a snapshot means using a different /boot for kernel/initramfs 
than what grub is using for its root. I don't off hand see a problem with this 
because it's literally just two files that grub loads from a different boot 
subvolume, found with an absolute path to that snapshot. And it also uses 
rootflags=subvol= to use the matching root snapshot.

A separate issue that's not grub's problem is how to deal with the (now wrong) 
fstab entries. systemd looks at fstab and generates mount jobs from that; if 
taught to understand it's booting a snapshot it could second guess parts of the 
fstab. Based on the name of the currently booting root snapshot, which systemd 
definitely knows, it could mount that subvol= instead of what's in fstab. It 
can use name substitution to do the same thing with the other 
subvolume-snapshots that match the root one. Meaning all of the snapshots for a 
system have the same base (re)naming convention.


Chris Murphy


reply via email to

[Prev in Thread] Current Thread [Next in Thread]