Hi All,
>----Messaggio originale----
>Da: list@fajar.net
>Data: 20/06/2012 8.31
>A: "H. Peter Anvin"<hpa@zytor.com>
>Cc: <linux-btrfs@vger.kernel.org>
>Ogg: Re: Subvolumes and /proc/self/mountinfo
>
>On Wed, Jun 20, 2012 at 10:22 AM, H. Peter Anvin <hpa@zytor.com>
wrote:
>> a. Make a snapshot of the current root;
>> b. Mount said snapshot;
>> c. Install the new distro on the snapshot;
>> d. Change the bootloader configuration *inside* the snapshot to point
>> to the snapshot as the root;
Or (as I wrote in an another replay), let the bootloader to start a subvolume
identified by a path, and swapping the subvolume via a simple rename.
>> e. Install the bootloader on the snapshot, thereby making the boot
>> block point to it and making it "live".
>
>
>IMHO a more elegant solution would be similar to what
>(open)solaris/indiana does: make the boot parts (bootloader,
>configuration) as a separate area, separate from root snapshots. In
>solaris case IIRC this is will br /rpool/grub.
>
>A similar approach should be implementable in linux, at least on
>certain configurations, since if you put /boot as part of "/"
(thus,
>also on btrfs), AND you don''t change the default subvolume, AND the
>roots are on their own subvolume, the paths to vmlinuz and initrd on
>grub.cfg will have subvols name in it. So it''s possible to have a
>single grub.cfg having several entries that points to different
>subvols. So you don''t need to install a new bootloader to make a
>particular subvol live, you only need to select it from the boot menu.
>
>I''m doing this currently with ubuntu precise, but with
>manually-created grub.cfg though. Still haven''t found a way to
manage
>this automatically.
My /boot directory is an ext4 filesystem. During a "grup-update", I
added an
hook in the scripts which generates some entries for grub.cfg on the basis of
the subvolumes which exist. Every entry is equal to the
default one but the options rootflags=subvol=<subvol>. So at the boot I
can
select different root (typicalli the default one and the one before an
aptitude update/upgrade)
Br
G.Baroncelli>
>--
>Fajar
>--
>To unsubscribe from this list: send the line "unsubscribe
linux-btrfs" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html