From: "Goffredo Baroncelli <kreijack@libero.it>" <kreijack@libero.it>
To: <list@fajar.net>, "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: R: Re: Subvolumes and /proc/self/mountinfo
Date: Wed, 20 Jun 2012 14:10:28 +0200 (CEST) [thread overview]
Message-ID: <11261111.239491340194228411.JavaMail.defaultUser@defaultHost> (raw)
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
>
next reply other threads:[~2012-06-20 12:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 12:10 Goffredo Baroncelli <kreijack@libero.it> [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-06-20 12:02 R: Re: Subvolumes and /proc/self/mountinfo Goffredo Baroncelli <kreijack@libero.it>
2012-06-20 15:37 ` H. Peter Anvin
2012-06-20 16:34 ` Goffredo Baroncelli
2012-06-20 17:41 ` H. Peter Anvin
2012-06-20 18:06 ` Goffredo Baroncelli
2012-06-20 19:15 ` Helmut Hullen
2012-06-20 20:22 ` Goffredo Baroncelli
2012-06-20 21:49 ` H. Peter Anvin
2012-06-21 5:47 ` Goffredo Baroncelli
2012-06-21 11:46 ` Martin Steigerwald
2012-06-21 17:05 ` Goffredo Baroncelli
2012-06-21 13:38 ` H. Peter Anvin
2012-06-21 17:05 ` Goffredo Baroncelli
2012-06-21 17:11 ` H. Peter Anvin
2012-06-20 11:51 Goffredo Baroncelli <kreijack@libero.it>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11261111.239491340194228411.JavaMail.defaultUser@defaultHost \
--to=kreijack@libero.it \
--cc=hpa@zytor.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=list@fajar.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).