All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: grubenv on md, Btrfs, LUKS, etc
Date: Tue, 18 Sep 2018 13:40:06 -0600	[thread overview]
Message-ID: <CAJCQCtQABdpB17_MG9j5B_e_T7v986aRvvfH0d0KK5JU2nNx4w@mail.gmail.com> (raw)
In-Reply-To: <CAJCQCtQwQUuL1McMoLG-SYfuB6ckD5Xxs7ZzcKVXGrV7RWU6jw@mail.gmail.com>

On Mon, Sep 17, 2018 at 10:59 PM, Chris Murphy <lists@colorremedies.com> wrote:
> Hi,
>
> GRUB code can certainly read files that are on Btrfs, md devices,
> LUKS, LVM, and so on. But GRUB code can also write to the physical
> block for grubenv - but are there safe guards that prevent it from
> doing so if grubenv is on something like Btrfs, mdadm raid5, LUKS?
>
> And also what about XFS? This used to be safe, but now with reflink
> support, grubenv could be reflink copied, meaning any overwrite is
> disallowed and must be COW'd. How is that handled?
>
> I'm pretty sure on Btrfs GRUB knows is can't write to grubenv, I'm
> just curious about the other cases.

OK so it allows me to create a grubenv on Btrfs without any complaint.
Will the bootloader actually try to write to this if grub.cfg contains
save_env?

$ sudo grub2-editenv --verbose grubenv create
[sudo] password for chris:
[chris@f29h ~]$ ll
-rw-r--r--. 1 root  root     1024 Sep 18 13:37 grubenv
[chris@f29h ~]$ stat -f grubenv
  File: "grubenv"
    ID: ac9ba8ecdce5b017 Namelen: 255     Type: btrfs
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 46661632   Free: 37479747   Available: 37422535
Inodes: Total: 0          Free: 0
[chris@f29h ~]$


-- 
Chris Murphy


  reply	other threads:[~2018-09-18 19:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  4:59 grubenv on md, Btrfs, LUKS, etc Chris Murphy
2018-09-18 19:40 ` Chris Murphy [this message]
2018-09-21 18:35   ` Daniel Kiper
2018-09-26 22:45     ` Chris Murphy
2018-09-27 16:38       ` Daniel Kiper
2018-09-27 23:00         ` Chris Murphy
2018-09-28 12:01           ` Daniel Kiper

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=CAJCQCtQABdpB17_MG9j5B_e_T7v986aRvvfH0d0KK5JU2nNx4w@mail.gmail.com \
    --to=lists@colorremedies.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.