All of lore.kernel.org
 help / color / mirror / Atom feed
* grubenv vs. diskfilter
@ 2013-06-03  4:48 Andrey Borzenkov
  2013-06-18 18:57 ` Phillip Susi
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2013-06-03  4:48 UTC (permalink / raw)
  To: grub-devel

While grub itself can be installed on diskfilter devices (LVM, Linux
MD, ...), diskfilter devices are read-only. As grubenv is automatically
assumed to be in /boot/grub, this makes it impossible to set variables
from within grub. So grub cannot reset boot once indicator, cannot save
currently selected menu entry etc.

Just looking for ideas here. Thank you.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grubenv vs. diskfilter
  2013-06-03  4:48 grubenv vs. diskfilter Andrey Borzenkov
@ 2013-06-18 18:57 ` Phillip Susi
  2013-06-19  6:31   ` Andrey Borzenkov
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Susi @ 2013-06-18 18:57 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/3/2013 12:48 AM, Andrey Borzenkov wrote:
> While grub itself can be installed on diskfilter devices (LVM,
> Linux MD, ...), diskfilter devices are read-only. As grubenv is
> automatically assumed to be in /boot/grub, this makes it impossible
> to set variables from within grub. So grub cannot reset boot once
> indicator, cannot save currently selected menu entry etc.

I've been kicking around the thought that grub-pc should just put
grubenv in the embed area attached to the core img, and grub-efi
should put it in the ESP.  That would solve grubenv not working on
btrfs too.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRwK2AAAoJEJrBOlT6nu758j8H/iQGytxyoqnlaMmesaDSc40Y
yRcG4jDIpbkRuo0jM+Hh+hQKYXU2P3yvQOM38BAzaPsdL5we6oqjQsJcjGchsdhu
7JhOrM7uxFsInJ03FS1obOeOjR89iXoGXuR8bEcq2RMq4aLF5Enh6XK7Sm7Hq/od
Zm4/k0H+notE2R3GBaFO7eyrQiHUKR5trJBkuBjOshCv2mXFO6nP9/bKooq8y1de
xVJNrXaZDNs9quICLVWkRZfI259lrzQFXI3dZtSVpE2sBISGu132nzIB56m6nMVL
efE6sMl2YZTs+X3G62caYboeTlN9QH4py/NaleDQgwMdJqqNoo9D3GDs5uJ4kCE=
=eRAC
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grubenv vs. diskfilter
  2013-06-18 18:57 ` Phillip Susi
@ 2013-06-19  6:31   ` Andrey Borzenkov
  2013-06-19 15:34     ` Phillip Susi
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2013-06-19  6:31 UTC (permalink / raw)
  To: The development of GNU GRUB

On Tue, Jun 18, 2013 at 10:57 PM, Phillip Susi <psusi@ubuntu.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 6/3/2013 12:48 AM, Andrey Borzenkov wrote:
>> While grub itself can be installed on diskfilter devices (LVM,
>> Linux MD, ...), diskfilter devices are read-only. As grubenv is
>> automatically assumed to be in /boot/grub, this makes it impossible
>> to set variables from within grub. So grub cannot reset boot once
>> indicator, cannot save currently selected menu entry etc.
>
> I've been kicking around the thought that grub-pc should just put
> grubenv in the embed area attached to the core img, and grub-efi
> should put it in the ESP.

This still leaves the case when core.img cannot be embedded (and
adding extra space obviously increases chances of that) or delilberate
blocklist installs (openSUSE defaults to booting from partition). And
we still have PPC, SPARC and hopefully ARM to handle.

And we need some way for user space to auto-detect where environment
block is located ...

>                                         That would solve grubenv not working on
> btrfs too.
>

Does btrfs guarantee that bootloader area is always located on a
single physical device?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grubenv vs. diskfilter
  2013-06-19  6:31   ` Andrey Borzenkov
@ 2013-06-19 15:34     ` Phillip Susi
  0 siblings, 0 replies; 4+ messages in thread
From: Phillip Susi @ 2013-06-19 15:34 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Andrey Borzenkov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/19/2013 2:31 AM, Andrey Borzenkov wrote:
>> I've been kicking around the thought that grub-pc should just
>> put grubenv in the embed area attached to the core img, and
>> grub-efi should put it in the ESP.
> 
> This still leaves the case when core.img cannot be embedded (and 
> adding extra space obviously increases chances of that) or
> delilberate blocklist installs (openSUSE defaults to booting from
> partition). And we still have PPC, SPARC and hopefully ARM to
> handle.

Blocklist installs already are unsupported and have plenty of
problems, including not working with diskfilter.  They should still be
able to work with grubenv in a regular file on a plain ext4 regular
disk partition.

As for embed size, there are really only two classes in practice: 2048
sector, which has plenty of room, and 63 sector, which already doesn't
fit for non trivial configurations including diskfilter.

> And we need some way for user space to auto-detect where
> environment block is located ...

Stick a pointer to the location in the grubenv file?

>> That would solve grubenv not working on btrfs too.
>> 
> 
> Does btrfs guarantee that bootloader area is always located on a 
> single physical device?

Not sure what you mean.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRwc9pAAoJEJrBOlT6nu75Zp0H/3Ef/f23D0tWNdPj9vzW+CkP
l79g0bfbZddPKaunpcOjccSKdjko9sFenRN8HnAegKuu0s+6ro/ir7PaR7wHkA11
+9rO+pZWEluqwcdvlR2C72ErfJ7DHvmVP+togmhzV6aeP2xvw00xr05GKZeryrND
FHG1uftp8RTxHGH28py4ta95MRzcVnGzBbkzaDz27bWuTcrijZO6rP5nc3038+8b
QMXJJnAXx49Fb7jlC0GxwgFXbdYhzqQy4tZMvQsV2WTiK38yrVnI8sJqeG7seglH
1nV9uUkxGIKGJo0TRNl6vSFkCTXiPfXM7GHny6bwzu9fpBMQZiwXVhuqhCUaqQk=
=Fk2C
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-19 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03  4:48 grubenv vs. diskfilter Andrey Borzenkov
2013-06-18 18:57 ` Phillip Susi
2013-06-19  6:31   ` Andrey Borzenkov
2013-06-19 15:34     ` Phillip Susi

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.