All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
Subject: Re: Environment block and LVM
Date: Mon, 14 Jul 2014 13:03:53 +0100	[thread overview]
Message-ID: <20140714120353.GA32372@riva.ucam.org> (raw)
In-Reply-To: <616962202.117314.1405325936382.JavaMail.zimbra@opinsys.fi>

On Mon, Jul 14, 2014 at 08:18:56AM +0000, Tuomas Räsänen wrote:
> The GRUB manual says:
> > For safety reasons, this storage is only available when installed on a
> > plain disk (no LVM or RAID), using a non-checksumming filesystem (no
> > ZFS), and using BIOS or EFI functions (no ATA, USB or IEEE1275).
> 
> However, in our systems, load_env seems to load the environment block
> from LVM without any problems. On the other hand, save_env fails.
> 
> Is load_env + LVM now supported or is there something weird going on and
> it works by accident?

This section of the manual is referring to the whole feature, including
saving.  It's true that load_env will work as long as GRUB is able to
understand the device and filesystem; but save_env has the constraints
above.

At least on checksumming filesystems and on RAID, the main reason for
not supporting this is that we have to be rather conservative about what
writes we do to avoid breaking things.  save_env is a very useful
feature, but it's not actually required to boot the system and so we
should only support it where it's safe.

In some other environments, the main reason we don't support this is
simply that it's a non-trivial amount of code that we haven't written
yet and that isn't needed for anything else.

I suspect that LVM falls into the second category rather than the first,
but Vladimir might overrule me.  If we did implement this, we would need
to be careful to ensure that the code is structured to make it very
difficult to make the mistake of writing to the wrong part of the disk
and to put suitable automatic tests in place, since we can't expect the
writing paths in GRUB to be exercised as frequently as the reading
paths.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]


  reply	other threads:[~2014-07-14 12:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1144594563.117221.1405322508517.JavaMail.zimbra@opinsys.fi>
2014-07-14  8:18 ` Environment block and LVM Tuomas Räsänen
2014-07-14 12:03   ` Colin Watson [this message]
2014-07-15 20:01     ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-07-20  5:09       ` Andrey Borzenkov

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=20140714120353.GA32372@riva.ucam.org \
    --to=cjwatson@ubuntu.com \
    --cc=grub-devel@gnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.