Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
	Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: GRUB writing to grubenv outside of kernel fs code
Date: Wed, 19 Sep 2018 08:10:02 +0300	[thread overview]
Message-ID: <01eb4643-4bf6-1064-56be-4e6d84bc7b17@gmail.com> (raw)
In-Reply-To: <26da8df8-45c9-f8e1-897c-8940898a4efd@gmail.com>

18.09.2018 22:11, Austin S. Hemmelgarn пишет:
> On 2018-09-18 14:38, Andrei Borzenkov wrote:
>> 18.09.2018 21:25, Austin S. Hemmelgarn пишет:
>>> On 2018-09-18 14:16, Andrei Borzenkov wrote:
>>>> 18.09.2018 08:37, Chris Murphy пишет:
>>>>> On Mon, Sep 17, 2018 at 11:24 PM, Andrei Borzenkov
>>>>> <arvidjaar@gmail.com> wrote:
>>>>>> 18.09.2018 07:21, Chris Murphy пишет:
>>>>>>> On Mon, Sep 17, 2018 at 9:44 PM, Chris Murphy
>>>>>>> <lists@colorremedies.com> wrote:
>> ...
>>>>>>>
>>>>>>> There are a couple of reserve locations in Btrfs at the start and I
>>>>>>> think after the first superblock, for bootloader embedding. Possibly
>>>>>>> one or both of those areas could be used for this so it's outside
>>>>>>> the
>>>>>>> file system. But other implementations are going to run into this
>>>>>>> problem too.
>>>>>>>
>>>>>>
>>>>>> That's what SUSE grub2 version does - it includes patches to redirect
>>>>>> writes on btrfs to reserved area. I am not sure how it behaves in
>>>>>> case
>>>>>> of multi-device btrfs though.
>>>>>
>>>>> The patches aren't upstream yet? Will they be?
>>>>>
>>>>
>>>> I do not know. Personally I think much easier is to make grub location
>>>> independent of /boot, allowing grub be installed in separate partition.
>>>> This automatically covers all other cases (like MD, LVM etc).
>>> It actually is independent of /boot already.  I've got it running just
>>> fine on my laptop off of the EFI system partition (which is independent
>>> of my /boot partition), and thus have no issues with handling of the
>>> grubenv file.  The problem is that all the big distros assume you want
>>> it in /boot, so they have no option for putting it anywhere else.
>>>
>>
>> This requires more than just explicit --boot-directory. With current
>> monolithic configuration file listing all available kernels this file
>> cannot be in the same location, it must be together with kernels (think
>> about rollback to snapshot with completely different content). Or some
>> different, more flexible configuration is needed.
> Uh, no, it doesn't need to be with the kernels.

It does not need to be *with* kernels but it must match content of /boot
if you want to allow booting from multiple subvolumes (or even
partitions) using the same grub instance. The most obvious case is
snapper rollback used by SUSE. You still have single instance of
bootloader, but multiple subvolumes with different kernels. So somehow
bootloader must know which kernels to offer depending on which subvolume
you select.

  reply	other threads:[~2018-09-19 10:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  3:44 GRUB writing to grubenv outside of kernel fs code Chris Murphy
2018-09-18  4:21 ` Chris Murphy
2018-09-18  5:24   ` Andrei Borzenkov
2018-09-18  5:37     ` Chris Murphy
2018-09-18 18:16       ` Andrei Borzenkov
2018-09-18 18:25         ` Austin S. Hemmelgarn
2018-09-18 18:38           ` Andrei Borzenkov
2018-09-18 19:11             ` Austin S. Hemmelgarn
2018-09-19  5:10               ` Andrei Borzenkov [this message]
2018-09-18 19:00           ` Chris Murphy
2018-09-18 19:14             ` Austin S. Hemmelgarn
2018-09-18 18:57         ` Chris Murphy
2018-09-18 19:01           ` Andrei Borzenkov
2018-09-18 19:22             ` Chris Murphy
2018-09-18 19:13           ` Austin S. Hemmelgarn
2018-09-18 17:15   ` Goffredo Baroncelli
2018-09-18 18:52     ` Chris Murphy
2018-09-18 19:11       ` Goffredo Baroncelli
2018-09-18 19:34         ` Chris Murphy
2018-09-19  5:03           ` Duncan
2018-09-19 19:08     ` Goffredo Baroncelli
2018-09-19 19:34       ` Austin S. Hemmelgarn
2018-09-18 19:45 ` Chris Murphy

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=01eb4643-4bf6-1064-56be-4e6d84bc7b17@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    /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