public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] grub:2 keywords
@ 2012-06-25  4:15 Mike Gilbert
  2012-06-25  5:35 ` Richard Yao
                   ` (4 more replies)
  0 siblings, 5 replies; 38+ messages in thread
From: Mike Gilbert @ 2012-06-25  4:15 UTC (permalink / raw
  To: Gentoo Dev

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

An official release of grub-2.00 should be coming pretty soon. I would
like to keyword this for ~amd64 and ~x86 shortly after it hits the tree.
I don't do much work on base system packages, so I would like some
advice on how to make this as smooth as possible.

My main concern is that many people probably have sys-boot/grub in
@world. If grub:2 is made visible, portage will install it, and will
remove grub-0.97 on the next depclean. This could be a little confusing,
but should not cause any immediate damage since the copy of grub-0.97
installed in the MBR and /boot would remain intact.

Is this worthy of a news item? Or I just blog about it?

Anything else I need to think about here?

Note: The Gentoo Documentation Project has indicated that they do not
want to add anything to the handbook until we are somewhat close to
stabilizing grub:2. That's at least a couple months away.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-25  4:15 [gentoo-dev] grub:2 keywords Mike Gilbert
@ 2012-06-25  5:35 ` Richard Yao
  2012-06-25  9:15   ` Michał Górny
  2012-06-25  9:10 ` heroxbd
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 38+ messages in thread
From: Richard Yao @ 2012-06-25  5:35 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

On 06/25/2012 12:15 AM, Mike Gilbert wrote:
> An official release of grub-2.00 should be coming pretty soon. I would
> like to keyword this for ~amd64 and ~x86 shortly after it hits the tree.
> I don't do much work on base system packages, so I would like some
> advice on how to make this as smooth as possible.
> 
> My main concern is that many people probably have sys-boot/grub in
> @world. If grub:2 is made visible, portage will install it, and will
> remove grub-0.97 on the next depclean. This could be a little confusing,
> but should not cause any immediate damage since the copy of grub-0.97
> installed in the MBR and /boot would remain intact.
> 
> Is this worthy of a news item? Or I just blog about it?
> 
> Anything else I need to think about here?
> 
> Note: The Gentoo Documentation Project has indicated that they do not
> want to add anything to the handbook until we are somewhat close to
> stabilizing grub:2. That's at least a couple months away.
> 

I think it would be best to move sys-boot/grub:2 to sys-boot/grub2. That
should avoid confusion.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-25  4:15 [gentoo-dev] grub:2 keywords Mike Gilbert
  2012-06-25  5:35 ` Richard Yao
@ 2012-06-25  9:10 ` heroxbd
  2012-06-25 15:19 ` Doug Goldstein
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 38+ messages in thread
From: heroxbd @ 2012-06-25  9:10 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

Mike Gilbert <floppym@gentoo.org> writes:

> My main concern is that many people probably have sys-boot/grub in
> @world. 

How about a news item advising people to put sys-boot/grub:0 in their
world file to retain grub:0?

> If grub:2 is made visible, portage will install it, and will remove
> grub-0.97 on the next depclean. This could be a little confusing, but
> should not cause any immediate damage since the copy of grub-0.97
> installed in the MBR and /boot would remain intact.
>
> Is this worthy of a news item? Or I just blog about it?

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-25  5:35 ` Richard Yao
@ 2012-06-25  9:15   ` Michał Górny
  0 siblings, 0 replies; 38+ messages in thread
From: Michał Górny @ 2012-06-25  9:15 UTC (permalink / raw
  To: gentoo-dev; +Cc: ryao

[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]

On Mon, 25 Jun 2012 01:35:19 -0400
Richard Yao <ryao@gentoo.org> wrote:

> On 06/25/2012 12:15 AM, Mike Gilbert wrote:
> > An official release of grub-2.00 should be coming pretty soon. I
> > would like to keyword this for ~amd64 and ~x86 shortly after it
> > hits the tree. I don't do much work on base system packages, so I
> > would like some advice on how to make this as smooth as possible.
> > 
> > My main concern is that many people probably have sys-boot/grub in
> > @world. If grub:2 is made visible, portage will install it, and will
> > remove grub-0.97 on the next depclean. This could be a little
> > confusing, but should not cause any immediate damage since the copy
> > of grub-0.97 installed in the MBR and /boot would remain intact.
> > 
> > Is this worthy of a news item? Or I just blog about it?
> > 
> > Anything else I need to think about here?
> > 
> > Note: The Gentoo Documentation Project has indicated that they do
> > not want to add anything to the handbook until we are somewhat
> > close to stabilizing grub:2. That's at least a couple months away.
> 
> I think it would be best to move sys-boot/grub:2 to sys-boot/grub2.
> That should avoid confusion.

If our plan is to replace grub1 with grub2 at some point, that seems
incorrect. In other words, if grub2 is 'natural progress' from grub1.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-25  4:15 [gentoo-dev] grub:2 keywords Mike Gilbert
  2012-06-25  5:35 ` Richard Yao
  2012-06-25  9:10 ` heroxbd
@ 2012-06-25 15:19 ` Doug Goldstein
  2012-06-25 16:56   ` Mike Gilbert
  2012-06-25 17:02 ` [gentoo-dev] " Michał Górny
  2012-06-29  5:13 ` Mike Frysinger
  4 siblings, 1 reply; 38+ messages in thread
From: Doug Goldstein @ 2012-06-25 15:19 UTC (permalink / raw
  To: gentoo-dev

On Sun, Jun 24, 2012 at 11:15 PM, Mike Gilbert <floppym@gentoo.org> wrote:
> An official release of grub-2.00 should be coming pretty soon. I would
> like to keyword this for ~amd64 and ~x86 shortly after it hits the tree.
> I don't do much work on base system packages, so I would like some
> advice on how to make this as smooth as possible.
>
> My main concern is that many people probably have sys-boot/grub in
> @world. If grub:2 is made visible, portage will install it, and will
> remove grub-0.97 on the next depclean. This could be a little confusing,
> but should not cause any immediate damage since the copy of grub-0.97
> installed in the MBR and /boot would remain intact.
>
> Is this worthy of a news item? Or I just blog about it?
>
> Anything else I need to think about here?
>
> Note: The Gentoo Documentation Project has indicated that they do not
> want to add anything to the handbook until we are somewhat close to
> stabilizing grub:2. That's at least a couple months away.
>

Mike,

Since Grub Legacy and Grub 2 are slotted, Portage won't remove the
older version. Even if it removes the older one, everything necessary
is installed into /boot and the MBR already.

The best route forward would be to instruct people to use
grub2-install (but whatever the flag is to prevent MBR installation).
Have people generate their grub.cfg with grub2-mkconfig and then put a
chain loader into the Grub Legacy configs so that they can test Grub 2
and then once they test it tell them to install Grub 2 into the MBR
and remove Grub Legacy.

I'll gladly work with you on this. IMHO, it might be a good plan to
unmask and ~arch one of the release candidates with an aim to get Grub
2.0.0 fully released with docs.

-- 
Doug Goldstein



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-25 15:19 ` Doug Goldstein
@ 2012-06-25 16:56   ` Mike Gilbert
  2012-06-26  2:43     ` [gentoo-dev] " Duncan
  0 siblings, 1 reply; 38+ messages in thread
From: Mike Gilbert @ 2012-06-25 16:56 UTC (permalink / raw
  To: gentoo-dev

On Mon, Jun 25, 2012 at 11:19 AM, Doug Goldstein <cardoe@gentoo.org> wrote:
> Since Grub Legacy and Grub 2 are slotted, Portage won't remove the
> older version. Even if it removes the older one, everything necessary
> is installed into /boot and the MBR already.

Portage will remove the older slot the next time the user runs emerge
--depclean unless sys-boot/grub:0 is added to the world file. I'm
looking for a good way to communicate this to the user.

How about this: For ~arch, we do an ewarn in pkg_postinst if grub:0 is
installed. For stable, we do a news item.

>
> The best route forward would be to instruct people to use
> grub2-install (but whatever the flag is to prevent MBR installation).
> Have people generate their grub.cfg with grub2-mkconfig and then put a
> chain loader into the Grub Legacy configs so that they can test Grub 2
> and then once they test it tell them to install Grub 2 into the MBR
> and remove Grub Legacy.

Yeah, I vaguely remember trying this when I first installed grub:2.
You can prevent the MBR installation by stubbing out the grub-setup
call. For example:

grub2-install --grub-setup=/bin/true /dev/sda

You would then load /boot/grub2/i386-pc/core.img just like a Linux
kernel from menu.lst.

If you (or anyone) wants to test and verify that this actually works,
that would be great.

>
> I'll gladly work with you on this. IMHO, it might be a good plan to
> unmask and ~arch one of the release candidates with an aim to get Grub
> 2.0.0 fully released with docs.

That sounds like a good idea.



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-25  4:15 [gentoo-dev] grub:2 keywords Mike Gilbert
                   ` (2 preceding siblings ...)
  2012-06-25 15:19 ` Doug Goldstein
@ 2012-06-25 17:02 ` Michał Górny
  2012-06-25 17:26   ` Mike Gilbert
  2012-06-29  5:13 ` Mike Frysinger
  4 siblings, 1 reply; 38+ messages in thread
From: Michał Górny @ 2012-06-25 17:02 UTC (permalink / raw
  To: gentoo-dev; +Cc: floppym

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

On Mon, 25 Jun 2012 00:15:59 -0400
Mike Gilbert <floppym@gentoo.org> wrote:

> An official release of grub-2.00 should be coming pretty soon. I would
> like to keyword this for ~amd64 and ~x86 shortly after it hits the
> tree. I don't do much work on base system packages, so I would like
> some advice on how to make this as smooth as possible.
> 
> My main concern is that many people probably have sys-boot/grub in
> @world. If grub:2 is made visible, portage will install it, and will
> remove grub-0.97 on the next depclean. This could be a little
> confusing, but should not cause any immediate damage since the copy
> of grub-0.97 installed in the MBR and /boot would remain intact.
> 
> Is this worthy of a news item? Or I just blog about it?
> 
> Anything else I need to think about here?
> 
> Note: The Gentoo Documentation Project has indicated that they do not
> want to add anything to the handbook until we are somewhat close to
> stabilizing grub:2. That's at least a couple months away.

I guess you could prepare some docs already, and put them e.g.
on the Wiki. Then it would be a really good idea to release a news item
and point users to those information and inform them about possible
choices.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-25 17:02 ` [gentoo-dev] " Michał Górny
@ 2012-06-25 17:26   ` Mike Gilbert
  0 siblings, 0 replies; 38+ messages in thread
From: Mike Gilbert @ 2012-06-25 17:26 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev

On Mon, Jun 25, 2012 at 1:02 PM, Michał Górny <mgorny@gentoo.org> wrote:
> On Mon, 25 Jun 2012 00:15:59 -0400
> Mike Gilbert <floppym@gentoo.org> wrote:
>
>> An official release of grub-2.00 should be coming pretty soon. I would
>> like to keyword this for ~amd64 and ~x86 shortly after it hits the
>> tree. I don't do much work on base system packages, so I would like
>> some advice on how to make this as smooth as possible.
>>
>> My main concern is that many people probably have sys-boot/grub in
>> @world. If grub:2 is made visible, portage will install it, and will
>> remove grub-0.97 on the next depclean. This could be a little
>> confusing, but should not cause any immediate damage since the copy
>> of grub-0.97 installed in the MBR and /boot would remain intact.
>>
>> Is this worthy of a news item? Or I just blog about it?
>>
>> Anything else I need to think about here?
>>
>> Note: The Gentoo Documentation Project has indicated that they do not
>> want to add anything to the handbook until we are somewhat close to
>> stabilizing grub:2. That's at least a couple months away.
>
> I guess you could prepare some docs already, and put them e.g.
> on the Wiki. Then it would be a really good idea to release a news item
> and point users to those information and inform them about possible
> choices.
>

There is already an elog message referring users to the wiki:

http://wiki.gentoo.org/wiki/GRUB2_Quick_Start



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

* [gentoo-dev] Re: grub:2 keywords
  2012-06-25 16:56   ` Mike Gilbert
@ 2012-06-26  2:43     ` Duncan
  2012-06-26  3:13       ` Mike Gilbert
  2012-06-26  3:53       ` Michał Górny
  0 siblings, 2 replies; 38+ messages in thread
From: Duncan @ 2012-06-26  2:43 UTC (permalink / raw
  To: gentoo-dev

Mike Gilbert posted on Mon, 25 Jun 2012 12:56:25 -0400 as excerpted:

> On Mon, Jun 25, 2012 at 11:19 AM, Doug Goldstein <cardoe@gentoo.org>
> wrote:
>> Since Grub Legacy and Grub 2 are slotted, Portage won't remove the
>> older version. Even if it removes the older one, everything necessary
>> is installed into /boot and the MBR already.
> 
> Portage will remove the older slot the next time the user runs emerge
> --depclean unless sys-boot/grub:0 is added to the world file. I'm
> looking for a good way to communicate this to the user.
> 
> How about this: For ~arch, we do an ewarn in pkg_postinst if grub:0 is
> installed. For stable, we do a news item.

Here's a bit of a different idea:

Changing the bootloader is really a profile level change.  If appropriate 
grub2-defaulted new profiles are created, and the old ones set to specify 
grub:0 as their default bootloader and then deprecated, this will 
automatically both provide the appropriate upgrade preparation required 
hint, and allow users to upgrade on their own schedule during the usual 
profile deprecation period.

Additionally, if there are continued issues with gcc building the old 
grub, etc (as was complicating the gcc-4.6 upgrade), the old profile can 
be set to mask new gcc, as well, thus providing additional encouragement 
to upgrade for the new gcc, and allowing people to deal with that upgrade 
at the same time, with their profile switch.  As such, supporting the old 
profiles during the deprecation period shouldn't be too bad, since slots, 
version-ranges, etc, can be nailed down as necessary, and people will 
automatically be prepared to deal with a bit of churn as they do their 
profile upgrade.

Thinking back, that probably would have been the best way to handle the 
baselayout-2/openrc upgrade as well, but that's rather behind us, now.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




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

* Re: [gentoo-dev] Re: grub:2 keywords
  2012-06-26  2:43     ` [gentoo-dev] " Duncan
@ 2012-06-26  3:13       ` Mike Gilbert
  2012-06-26  4:04         ` Duncan
  2012-06-26  3:53       ` Michał Górny
  1 sibling, 1 reply; 38+ messages in thread
From: Mike Gilbert @ 2012-06-26  3:13 UTC (permalink / raw
  To: gentoo-dev

On Mon, Jun 25, 2012 at 10:43 PM, Duncan <1i5t5.duncan@cox.net> wrote:
> Mike Gilbert posted on Mon, 25 Jun 2012 12:56:25 -0400 as excerpted:
>
>> On Mon, Jun 25, 2012 at 11:19 AM, Doug Goldstein <cardoe@gentoo.org>
>> wrote:
>>> Since Grub Legacy and Grub 2 are slotted, Portage won't remove the
>>> older version. Even if it removes the older one, everything necessary
>>> is installed into /boot and the MBR already.
>>
>> Portage will remove the older slot the next time the user runs emerge
>> --depclean unless sys-boot/grub:0 is added to the world file. I'm
>> looking for a good way to communicate this to the user.
>>
>> How about this: For ~arch, we do an ewarn in pkg_postinst if grub:0 is
>> installed. For stable, we do a news item.
>
> Here's a bit of a different idea:
>
> Changing the bootloader is really a profile level change.  If appropriate
> grub2-defaulted new profiles are created, and the old ones set to specify
> grub:0 as their default bootloader and then deprecated, this will
> automatically both provide the appropriate upgrade preparation required
> hint, and allow users to upgrade on their own schedule during the usual
> profile deprecation period.
>

Profiles do not set a "default bootloader" so I have no idea what you
are talking about.

Installing grub:2 does not replace grub:0 until the user actually runs
grub2-install, so you can already upgrade on your own schedule.



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

* Re: [gentoo-dev] Re: grub:2 keywords
  2012-06-26  2:43     ` [gentoo-dev] " Duncan
  2012-06-26  3:13       ` Mike Gilbert
@ 2012-06-26  3:53       ` Michał Górny
  1 sibling, 0 replies; 38+ messages in thread
From: Michał Górny @ 2012-06-26  3:53 UTC (permalink / raw
  To: gentoo-dev; +Cc: 1i5t5.duncan

[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]

On Tue, 26 Jun 2012 02:43:47 +0000 (UTC)
Duncan <1i5t5.duncan@cox.net> wrote:

> Mike Gilbert posted on Mon, 25 Jun 2012 12:56:25 -0400 as excerpted:
> 
> > On Mon, Jun 25, 2012 at 11:19 AM, Doug Goldstein <cardoe@gentoo.org>
> > wrote:
> >> Since Grub Legacy and Grub 2 are slotted, Portage won't remove the
> >> older version. Even if it removes the older one, everything
> >> necessary is installed into /boot and the MBR already.
> > 
> > Portage will remove the older slot the next time the user runs
> > emerge --depclean unless sys-boot/grub:0 is added to the world
> > file. I'm looking for a good way to communicate this to the user.
> > 
> > How about this: For ~arch, we do an ewarn in pkg_postinst if grub:0
> > is installed. For stable, we do a news item.
> 
> Here's a bit of a different idea:
> 
> Changing the bootloader is really a profile level change.  If
> appropriate grub2-defaulted new profiles are created, and the old
> ones set to specify grub:0 as their default bootloader and then
> deprecated, this will automatically both provide the appropriate
> upgrade preparation required hint, and allow users to upgrade on
> their own schedule during the usual profile deprecation period.

No-no-no. I don't want profiles suddenly installing grub on my system.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

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

* [gentoo-dev] Re: grub:2 keywords
  2012-06-26  3:13       ` Mike Gilbert
@ 2012-06-26  4:04         ` Duncan
  2012-06-29  5:12           ` Mike Frysinger
  0 siblings, 1 reply; 38+ messages in thread
From: Duncan @ 2012-06-26  4:04 UTC (permalink / raw
  To: gentoo-dev

Mike Gilbert posted on Mon, 25 Jun 2012 23:13:09 -0400 as excerpted:

> Profiles do not set a "default bootloader" so I have no idea what you
> are talking about.

I could have sworn there was a virtual/bootloader or some such, that was 
a part of @system and that thus would have likely had a default in the 
profiles packages file, but either there was but it's long gone, or I'm 
mis-remembering entirely.

So, ummm... interesting idea, but never mind!

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




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

* Re: [gentoo-dev] Re: grub:2 keywords
  2012-06-26  4:04         ` Duncan
@ 2012-06-29  5:12           ` Mike Frysinger
  2012-06-29  5:35             ` Duncan
  0 siblings, 1 reply; 38+ messages in thread
From: Mike Frysinger @ 2012-06-29  5:12 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 534 bytes --]

On Tuesday 26 June 2012 00:04:35 Duncan wrote:
> Mike Gilbert posted on Mon, 25 Jun 2012 23:13:09 -0400 as excerpted:
> > Profiles do not set a "default bootloader" so I have no idea what you
> > are talking about.
> 
> I could have sworn there was a virtual/bootloader or some such, that was
> a part of @system and that thus would have likely had a default in the
> profiles packages file, but either there was but it's long gone, or I'm
> mis-remembering entirely.

long gone when we threw out old style virtuals
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-25  4:15 [gentoo-dev] grub:2 keywords Mike Gilbert
                   ` (3 preceding siblings ...)
  2012-06-25 17:02 ` [gentoo-dev] " Michał Górny
@ 2012-06-29  5:13 ` Mike Frysinger
  2012-06-29  5:59   ` Mike Gilbert
  4 siblings, 1 reply; 38+ messages in thread
From: Mike Frysinger @ 2012-06-29  5:13 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 964 bytes --]

On Monday 25 June 2012 00:15:59 Mike Gilbert wrote:
> An official release of grub-2.00 should be coming pretty soon. I would
> like to keyword this for ~amd64 and ~x86 shortly after it hits the tree.
> I don't do much work on base system packages, so I would like some
> advice on how to make this as smooth as possible.
> 
> My main concern is that many people probably have sys-boot/grub in
> @world. If grub:2 is made visible, portage will install it, and will
> remove grub-0.97 on the next depclean. This could be a little confusing,
> but should not cause any immediate damage since the copy of grub-0.97
> installed in the MBR and /boot would remain intact.
> 
> Is this worthy of a news item? Or I just blog about it?
> 
> Anything else I need to think about here?

do we have automatic migration/updating in place like with grub1 ?  that was 
the biggest reason i didn't unleash it for automatic installing on people's 
systems.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* [gentoo-dev] Re: grub:2 keywords
  2012-06-29  5:12           ` Mike Frysinger
@ 2012-06-29  5:35             ` Duncan
  0 siblings, 0 replies; 38+ messages in thread
From: Duncan @ 2012-06-29  5:35 UTC (permalink / raw
  To: gentoo-dev

Mike Frysinger posted on Fri, 29 Jun 2012 01:12:38 -0400 as excerpted:

> On Tuesday 26 June 2012 00:04:35 Duncan wrote:

>> I could have sworn there was a virtual/bootloader or some such, that
>> was a part of @system and that thus would have likely had a default in
>> the profiles packages file, but either there was but it's long gone, or
>> I'm mis-remembering entirely.
> 
> long gone when we threw out old style virtuals -mike

Thanks.  I'm /not/ going senile and "remembering" things that were never 
there, then!   Relief!  =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29  5:13 ` Mike Frysinger
@ 2012-06-29  5:59   ` Mike Gilbert
  2012-06-29 10:28     ` Rich Freeman
  2012-06-29 15:32     ` Mike Frysinger
  0 siblings, 2 replies; 38+ messages in thread
From: Mike Gilbert @ 2012-06-29  5:59 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 1:13 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Monday 25 June 2012 00:15:59 Mike Gilbert wrote:
>> An official release of grub-2.00 should be coming pretty soon. I would
>> like to keyword this for ~amd64 and ~x86 shortly after it hits the tree.
>> I don't do much work on base system packages, so I would like some
>> advice on how to make this as smooth as possible.
>>
>> My main concern is that many people probably have sys-boot/grub in
>> @world. If grub:2 is made visible, portage will install it, and will
>> remove grub-0.97 on the next depclean. This could be a little confusing,
>> but should not cause any immediate damage since the copy of grub-0.97
>> installed in the MBR and /boot would remain intact.
>>
>> Is this worthy of a news item? Or I just blog about it?
>>
>> Anything else I need to think about here?
>
> do we have automatic migration/updating in place like with grub1 ?  that was
> the biggest reason i didn't unleash it for automatic installing on people's
> systems.
> -mike

No, the grub2 ebuild does not automatically install the files in /boot.

grub2-install performs this step, and must be run by the user. It also
installs the MBR and embeds the core image in unused disk sectors.
This way the MBR/core image is always kept in sync with the files in
/boot/grub2.

I don't really see a way to reliably call grub2-install from the
ebuild, and I think this would be a bit unfriendly to the user anyway.



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29  5:59   ` Mike Gilbert
@ 2012-06-29 10:28     ` Rich Freeman
  2012-06-29 15:32     ` Mike Frysinger
  1 sibling, 0 replies; 38+ messages in thread
From: Rich Freeman @ 2012-06-29 10:28 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 1:59 AM, Mike Gilbert <floppym@gentoo.org> wrote:
>
> I don't really see a way to reliably call grub2-install from the
> ebuild, and I think this would be a bit unfriendly to the user anyway.
>

Please don't.  We don't auto-install grub during the initial install,
so we have NO idea how users have set up grub1.  I'd rather not try to
automate the grub2 migration.  For all we know they aren't even using
it to boot.

Interesting - it looks like I don't even have grub "installed" - the
hardware on my current box has probably changed twice since I
installed Gentoo on it so an install-once thing like grub that is
safely tucked away in an unmounted /boot probably got out of sync.

I'd think that a typical Gentoo user would want some control over
their grub installation.  A good guide and a news announcement  of the
upcoming change probably would be sufficient.

Rich



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29  5:59   ` Mike Gilbert
  2012-06-29 10:28     ` Rich Freeman
@ 2012-06-29 15:32     ` Mike Frysinger
  2012-06-29 16:11       ` Mike Gilbert
  1 sibling, 1 reply; 38+ messages in thread
From: Mike Frysinger @ 2012-06-29 15:32 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 1710 bytes --]

On Friday 29 June 2012 01:59:37 Mike Gilbert wrote:
> On Fri, Jun 29, 2012 at 1:13 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Monday 25 June 2012 00:15:59 Mike Gilbert wrote:
> >> An official release of grub-2.00 should be coming pretty soon. I would
> >> like to keyword this for ~amd64 and ~x86 shortly after it hits the tree.
> >> I don't do much work on base system packages, so I would like some
> >> advice on how to make this as smooth as possible.
> >> 
> >> My main concern is that many people probably have sys-boot/grub in
> >> @world. If grub:2 is made visible, portage will install it, and will
> >> remove grub-0.97 on the next depclean. This could be a little confusing,
> >> but should not cause any immediate damage since the copy of grub-0.97
> >> installed in the MBR and /boot would remain intact.
> >> 
> >> Is this worthy of a news item? Or I just blog about it?
> >> 
> >> Anything else I need to think about here?
> > 
> > do we have automatic migration/updating in place like with grub1 ?  that
> > was the biggest reason i didn't unleash it for automatic installing on
> > people's systems.
> 
> No, the grub2 ebuild does not automatically install the files in /boot.
> 
> grub2-install performs this step, and must be run by the user. It also
> installs the MBR and embeds the core image in unused disk sectors.
> This way the MBR/core image is always kept in sync with the files in
> /boot/grub2.
> 
> I don't really see a way to reliably call grub2-install from the
> ebuild, and I think this would be a bit unfriendly to the user anyway.

grub1 doesn't seem to have a problem auto-updating itself.  why is grub2 any 
different ?
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 15:32     ` Mike Frysinger
@ 2012-06-29 16:11       ` Mike Gilbert
  2012-06-29 18:08         ` Rich Freeman
  0 siblings, 1 reply; 38+ messages in thread
From: Mike Gilbert @ 2012-06-29 16:11 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 11:32 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Friday 29 June 2012 01:59:37 Mike Gilbert wrote:
>> On Fri, Jun 29, 2012 at 1:13 AM, Mike Frysinger <vapier@gentoo.org> wrote:
>> > On Monday 25 June 2012 00:15:59 Mike Gilbert wrote:
>> >> An official release of grub-2.00 should be coming pretty soon. I would
>> >> like to keyword this for ~amd64 and ~x86 shortly after it hits the tree.
>> >> I don't do much work on base system packages, so I would like some
>> >> advice on how to make this as smooth as possible.
>> >>
>> >> My main concern is that many people probably have sys-boot/grub in
>> >> @world. If grub:2 is made visible, portage will install it, and will
>> >> remove grub-0.97 on the next depclean. This could be a little confusing,
>> >> but should not cause any immediate damage since the copy of grub-0.97
>> >> installed in the MBR and /boot would remain intact.
>> >>
>> >> Is this worthy of a news item? Or I just blog about it?
>> >>
>> >> Anything else I need to think about here?
>> >
>> > do we have automatic migration/updating in place like with grub1 ?  that
>> > was the biggest reason i didn't unleash it for automatic installing on
>> > people's systems.
>>
>> No, the grub2 ebuild does not automatically install the files in /boot.
>>
>> grub2-install performs this step, and must be run by the user. It also
>> installs the MBR and embeds the core image in unused disk sectors.
>> This way the MBR/core image is always kept in sync with the files in
>> /boot/grub2.
>>
>> I don't really see a way to reliably call grub2-install from the
>> ebuild, and I think this would be a bit unfriendly to the user anyway.
>
> grub1 doesn't seem to have a problem auto-updating itself.  why is grub2 any
> different ?
> -mike

As far as I can tell, grub:0 only half-way updates itself; there is a
large ewarn telling the user that they must take action to install the
new version in the MBR. This seems a bit broken to me.



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 16:11       ` Mike Gilbert
@ 2012-06-29 18:08         ` Rich Freeman
  2012-06-29 18:29           ` Mike Gilbert
  0 siblings, 1 reply; 38+ messages in thread
From: Rich Freeman @ 2012-06-29 18:08 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 12:11 PM, Mike Gilbert <floppym@gentoo.org> wrote:
> As far as I can tell, grub:0 only half-way updates itself; there is a
> large ewarn telling the user that they must take action to install the
> new version in the MBR. This seems a bit broken to me.

In what way.  As far as I can tell I haven't gotten a grub upgrade in
the last 5-7 years.  Since it is built static on amd64 (or at least it
was when I last installed it) nothing ever breaks.  Maybe if I changed
my boot partition to a different filesystem it might have issues, but
grub just strikes me as one of those aint-broke-don't-fix things.

By all means push out the new version, make docs, ewarn the user and
all that.  I just don't see the point in having something messing with
the MBR unless it is more likely to break if we don't.

Rich



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 18:08         ` Rich Freeman
@ 2012-06-29 18:29           ` Mike Gilbert
  2012-06-29 18:38             ` Rich Freeman
  0 siblings, 1 reply; 38+ messages in thread
From: Mike Gilbert @ 2012-06-29 18:29 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 2:08 PM, Rich Freeman <rich0@gentoo.org> wrote:
> On Fri, Jun 29, 2012 at 12:11 PM, Mike Gilbert <floppym@gentoo.org> wrote:
>> As far as I can tell, grub:0 only half-way updates itself; there is a
>> large ewarn telling the user that they must take action to install the
>> new version in the MBR. This seems a bit broken to me.
>
> In what way.  As far as I can tell I haven't gotten a grub upgrade in
> the last 5-7 years.  Since it is built static on amd64 (or at least it
> was when I last installed it) nothing ever breaks.  Maybe if I changed
> my boot partition to a different filesystem it might have issues, but
> grub just strikes me as one of those aint-broke-don't-fix things.
>

Right. I was contradicting vapier's statement that grub:0
automatically updates itself. It doesn't.

It does copy all of the images to /boot so that the grub shell can be
used to install an MBR image. grub:2 no longer has an interactive
shell and grub2-install must be used. Therefore, copying files to
/boot in the ebuild is completely pointless.



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 18:29           ` Mike Gilbert
@ 2012-06-29 18:38             ` Rich Freeman
  2012-06-29 18:51               ` Richard Yao
  2012-06-29 19:01               ` [gentoo-dev] " Mike Gilbert
  0 siblings, 2 replies; 38+ messages in thread
From: Rich Freeman @ 2012-06-29 18:38 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 2:29 PM, Mike Gilbert <floppym@gentoo.org> wrote:
> It does copy all of the images to /boot so that the grub shell can be
> used to install an MBR image. grub:2 no longer has an interactive
> shell and grub2-install must be used. Therefore, copying files to
> /boot in the ebuild is completely pointless.

Does grub2-install place any stage files where they need to be, or are
they no longer needed?  I haven't experimented with it yet.

Normally grub1 needs to be able to find the stage2 file, and that has
to be on a partition the stage1.5 can read (I believe stage1.5 is in
the diagnostic cylinder - it only uses the files in /boot during
installation).

I'm not sure if grub2 completely eliminates the need to have a
"normal" partition somewhere, in a situation where raid+lvm+etc are
used.

Rich



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 18:38             ` Rich Freeman
@ 2012-06-29 18:51               ` Richard Yao
  2012-06-29 19:00                 ` Rich Freeman
  2012-06-29 19:01               ` [gentoo-dev] " Mike Gilbert
  1 sibling, 1 reply; 38+ messages in thread
From: Richard Yao @ 2012-06-29 18:51 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]

On 06/29/2012 02:38 PM, Rich Freeman wrote:
> On Fri, Jun 29, 2012 at 2:29 PM, Mike Gilbert <floppym@gentoo.org> wrote:
>> It does copy all of the images to /boot so that the grub shell can be
>> used to install an MBR image. grub:2 no longer has an interactive
>> shell and grub2-install must be used. Therefore, copying files to
>> /boot in the ebuild is completely pointless.
> 
> Does grub2-install place any stage files where they need to be, or are
> they no longer needed?  I haven't experimented with it yet.
> 
> Normally grub1 needs to be able to find the stage2 file, and that has
> to be on a partition the stage1.5 can read (I believe stage1.5 is in
> the diagnostic cylinder - it only uses the files in /boot during
> installation).
> 
> I'm not sure if grub2 completely eliminates the need to have a
> "normal" partition somewhere, in a situation where raid+lvm+etc are
> used.
> 
> Rich
> 

GRUB2 does away with the conventional stage files. It also wants a
special BIOS Boot Partition in order to function. That is where it
stores the equivalent of the stage2 bootcode. That is similar to
FreeBSD's bootloader.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 18:51               ` Richard Yao
@ 2012-06-29 19:00                 ` Rich Freeman
  2012-06-29 19:04                   ` Mike Gilbert
  0 siblings, 1 reply; 38+ messages in thread
From: Rich Freeman @ 2012-06-29 19:00 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 2:51 PM, Richard Yao <ryao@gentoo.org> wrote:
> GRUB2 does away with the conventional stage files. It also wants a
> special BIOS Boot Partition in order to function. That is where it
> stores the equivalent of the stage2 bootcode. That is similar to
> FreeBSD's bootloader.

Now, that should make for a fun migration!  Fortunately I do have a
separate boot already, and I guess I can be daring and overwrite it in
place and trust in grub2 to still find the kernel elsewhere.

Those without a separate boot and without any free space are likely to
find this to be painful.  Resizing partitions isn't exactly
risk-free...

Rich



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 18:38             ` Rich Freeman
  2012-06-29 18:51               ` Richard Yao
@ 2012-06-29 19:01               ` Mike Gilbert
  2012-06-29 19:15                 ` Rich Freeman
  1 sibling, 1 reply; 38+ messages in thread
From: Mike Gilbert @ 2012-06-29 19:01 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 2:38 PM, Rich Freeman <rich0@gentoo.org> wrote:
> On Fri, Jun 29, 2012 at 2:29 PM, Mike Gilbert <floppym@gentoo.org> wrote:
>> It does copy all of the images to /boot so that the grub shell can be
>> used to install an MBR image. grub:2 no longer has an interactive
>> shell and grub2-install must be used. Therefore, copying files to
>> /boot in the ebuild is completely pointless.
>
> Does grub2-install place any stage files where they need to be, or are
> they no longer needed?  I haven't experimented with it yet.
>
> Normally grub1 needs to be able to find the stage2 file, and that has
> to be on a partition the stage1.5 can read (I believe stage1.5 is in
> the diagnostic cylinder - it only uses the files in /boot during
> installation).

grub2 eliminates the stage_1_5 files. Instead, a "core" image is built
by grub2-install.

Here's how it works.

1. grub2-install copies all grub modules to /boot/grub2. This can be
any file system readable by GRUB.
2. grub2-install calls grub2-mkimage which combines any modules
necessary to access /boot into core.img.
3. grub2-install calls grub2-bios-setup which installs boot.img into
the MBR and embeds core.img into the sectors immediately after the
MBR.

>
> I'm not sure if grub2 completely eliminates the need to have a
> "normal" partition somewhere, in a situation where raid+lvm+etc are
> used.

You do need a filesystem that grub2 can access through some
combination of modules, and an area in which to embed core.img.

The grub2 manual has a pretty good explanation.

http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html
http://www.gnu.org/software/grub/manual/html_node/BIOS-installation.html
http://www.gnu.org/software/grub/manual/html_node/Images.html



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 19:00                 ` Rich Freeman
@ 2012-06-29 19:04                   ` Mike Gilbert
  2012-06-29 20:56                     ` Richard Yao
  0 siblings, 1 reply; 38+ messages in thread
From: Mike Gilbert @ 2012-06-29 19:04 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 3:00 PM, Rich Freeman <rich0@gentoo.org> wrote:
> On Fri, Jun 29, 2012 at 2:51 PM, Richard Yao <ryao@gentoo.org> wrote:
>> GRUB2 does away with the conventional stage files. It also wants a
>> special BIOS Boot Partition in order to function. That is where it
>> stores the equivalent of the stage2 bootcode. That is similar to
>> FreeBSD's bootloader.
>
> Now, that should make for a fun migration!  Fortunately I do have a
> separate boot already, and I guess I can be daring and overwrite it in
> place and trust in grub2 to still find the kernel elsewhere.
>
> Those without a separate boot and without any free space are likely to
> find this to be painful.  Resizing partitions isn't exactly
> risk-free...
>
> Rich
>

I think Richard is incorrect here; grub2 can live on any filesystem,
so long as some combination of modules can access it.



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 19:01               ` [gentoo-dev] " Mike Gilbert
@ 2012-06-29 19:15                 ` Rich Freeman
  2012-06-29 19:26                   ` Mike Gilbert
  2012-07-02 18:57                   ` Jeroen Roovers
  0 siblings, 2 replies; 38+ messages in thread
From: Rich Freeman @ 2012-06-29 19:15 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 3:01 PM, Mike Gilbert <floppym@gentoo.org> wrote:
> 3. grub2-install calls grub2-bios-setup which installs boot.img into
> the MBR and embeds core.img into the sectors immediately after the
> MBR.

Ok, that isn't all that unlike grub1 - that is what stage1.5 is.  It
just sounds like these aren't static files that are copied out of
/boot/grub, but rather they're built on-demand from other files there.
 Grub1 figures out which static stage1.5 you need based on where /boot
is.  They probably went to a more dynamic model so that they can
support stuff like LVM+MD+LUKS+etc without having every permutation of
static code.  I'm not sure how smart the bootloader code ends up being
- it wouldn't surprise me if at time of install the installer does all
the work and just loads a simple bootloader on the diagnostic cylinder
with just enough smarts to find /boot if it hasn't changed.

Rich



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 19:15                 ` Rich Freeman
@ 2012-06-29 19:26                   ` Mike Gilbert
  2012-07-02 18:57                   ` Jeroen Roovers
  1 sibling, 0 replies; 38+ messages in thread
From: Mike Gilbert @ 2012-06-29 19:26 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 29, 2012 at 3:15 PM, Rich Freeman <rich0@gentoo.org> wrote:
> On Fri, Jun 29, 2012 at 3:01 PM, Mike Gilbert <floppym@gentoo.org> wrote:
>> 3. grub2-install calls grub2-bios-setup which installs boot.img into
>> the MBR and embeds core.img into the sectors immediately after the
>> MBR.
>
> Ok, that isn't all that unlike grub1 - that is what stage1.5 is.  It
> just sounds like these aren't static files that are copied out of
> /boot/grub, but rather they're built on-demand from other files there.
>  Grub1 figures out which static stage1.5 you need based on where /boot
> is.  They probably went to a more dynamic model so that they can
> support stuff like LVM+MD+LUKS+etc without having every permutation of
> static code.  I'm not sure how smart the bootloader code ends up being
> - it wouldn't surprise me if at time of install the installer does all
> the work and just loads a simple bootloader on the diagnostic cylinder
> with just enough smarts to find /boot if it hasn't changed.

Spot on. :-)



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 19:04                   ` Mike Gilbert
@ 2012-06-29 20:56                     ` Richard Yao
  2012-06-29 21:04                       ` Mike Gilbert
  0 siblings, 1 reply; 38+ messages in thread
From: Richard Yao @ 2012-06-29 20:56 UTC (permalink / raw
  To: gentoo-dev; +Cc: Mike Gilbert

[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]

On 06/29/2012 03:04 PM, Mike Gilbert wrote:
> On Fri, Jun 29, 2012 at 3:00 PM, Rich Freeman <rich0@gentoo.org> wrote:
>> On Fri, Jun 29, 2012 at 2:51 PM, Richard Yao <ryao@gentoo.org> wrote:
>>> GRUB2 does away with the conventional stage files. It also wants a
>>> special BIOS Boot Partition in order to function. That is where it
>>> stores the equivalent of the stage2 bootcode. That is similar to
>>> FreeBSD's bootloader.
>>
>> Now, that should make for a fun migration!  Fortunately I do have a
>> separate boot already, and I guess I can be daring and overwrite it in
>> place and trust in grub2 to still find the kernel elsewhere.
>>
>> Those without a separate boot and without any free space are likely to
>> find this to be painful.  Resizing partitions isn't exactly
>> risk-free...
>>
>> Rich
>>
> 
> I think Richard is incorrect here; grub2 can live on any filesystem,
> so long as some combination of modules can access it.
> 

Do you know what function the BIOS Boot Partion serves? It is necessary
when using GRUB2's ZFS support. I was under the impression that it
stored boot code.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]

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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 20:56                     ` Richard Yao
@ 2012-06-29 21:04                       ` Mike Gilbert
  2012-06-29 21:10                         ` Richard Yao
  0 siblings, 1 reply; 38+ messages in thread
From: Mike Gilbert @ 2012-06-29 21:04 UTC (permalink / raw
  To: Richard Yao; +Cc: gentoo-dev

On Fri, Jun 29, 2012 at 4:56 PM, Richard Yao <ryao@gentoo.org> wrote:
> On 06/29/2012 03:04 PM, Mike Gilbert wrote:
>> On Fri, Jun 29, 2012 at 3:00 PM, Rich Freeman <rich0@gentoo.org> wrote:
>>> On Fri, Jun 29, 2012 at 2:51 PM, Richard Yao <ryao@gentoo.org> wrote:
>>>> GRUB2 does away with the conventional stage files. It also wants a
>>>> special BIOS Boot Partition in order to function. That is where it
>>>> stores the equivalent of the stage2 bootcode. That is similar to
>>>> FreeBSD's bootloader.
>>>
>>> Now, that should make for a fun migration!  Fortunately I do have a
>>> separate boot already, and I guess I can be daring and overwrite it in
>>> place and trust in grub2 to still find the kernel elsewhere.
>>>
>>> Those without a separate boot and without any free space are likely to
>>> find this to be painful.  Resizing partitions isn't exactly
>>> risk-free...
>>>
>>> Rich
>>>
>>
>> I think Richard is incorrect here; grub2 can live on any filesystem,
>> so long as some combination of modules can access it.
>>
>
> Do you know what function the BIOS Boot Partion serves? It is necessary
> when using GRUB2's ZFS support. I was under the impression that it
> stored boot code.
>

Based on a Google search I think "BIOS Boot Partition" is a GPT thing.
Not relevent if you have an MBR partition table.



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 21:04                       ` Mike Gilbert
@ 2012-06-29 21:10                         ` Richard Yao
  2012-06-30  5:55                           ` [gentoo-dev] " Duncan
  0 siblings, 1 reply; 38+ messages in thread
From: Richard Yao @ 2012-06-29 21:10 UTC (permalink / raw
  To: gentoo-dev; +Cc: Mike Gilbert

[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]

On 06/29/2012 05:04 PM, Mike Gilbert wrote:
> On Fri, Jun 29, 2012 at 4:56 PM, Richard Yao <ryao@gentoo.org> wrote:
>> On 06/29/2012 03:04 PM, Mike Gilbert wrote:
>>> On Fri, Jun 29, 2012 at 3:00 PM, Rich Freeman <rich0@gentoo.org> wrote:
>>>> On Fri, Jun 29, 2012 at 2:51 PM, Richard Yao <ryao@gentoo.org> wrote:
>>>>> GRUB2 does away with the conventional stage files. It also wants a
>>>>> special BIOS Boot Partition in order to function. That is where it
>>>>> stores the equivalent of the stage2 bootcode. That is similar to
>>>>> FreeBSD's bootloader.
>>>>
>>>> Now, that should make for a fun migration!  Fortunately I do have a
>>>> separate boot already, and I guess I can be daring and overwrite it in
>>>> place and trust in grub2 to still find the kernel elsewhere.
>>>>
>>>> Those without a separate boot and without any free space are likely to
>>>> find this to be painful.  Resizing partitions isn't exactly
>>>> risk-free...
>>>>
>>>> Rich
>>>>
>>>
>>> I think Richard is incorrect here; grub2 can live on any filesystem,
>>> so long as some combination of modules can access it.
>>>
>>
>> Do you know what function the BIOS Boot Partion serves? It is necessary
>> when using GRUB2's ZFS support. I was under the impression that it
>> stored boot code.
>>
> 
> Based on a Google search I think "BIOS Boot Partition" is a GPT thing.
> Not relevent if you have an MBR partition table.
> 

This is correct. I had forgotten that I switched to GPT on my systems
because ZFS partitions drives using GPT by default. Allowing people to
specify the partitioning without requiring them to do it manually is on
my to do list.

However, those who wish to use GPT on their systems will need a BIOS
Boot Partition to store the boot code. That will not apply to older
systems that are switching to GRUB2 unless they also change their
partition tables.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]

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

* [gentoo-dev] Re: grub:2 keywords
  2012-06-29 21:10                         ` Richard Yao
@ 2012-06-30  5:55                           ` Duncan
  2012-06-30 15:18                             ` Maxim Kammerer
  0 siblings, 1 reply; 38+ messages in thread
From: Duncan @ 2012-06-30  5:55 UTC (permalink / raw
  To: gentoo-dev

Richard Yao posted on Fri, 29 Jun 2012 17:10:31 -0400 as excerpted:

> On 06/29/2012 05:04 PM, Mike Gilbert wrote:
>> On Fri, Jun 29, 2012 at 4:56 PM, Richard Yao <ryao@gentoo.org> wrote:
>>> On 06/29/2012 03:04 PM, Mike Gilbert wrote:
>>>> On Fri, Jun 29, 2012 at 3:00 PM, Rich Freeman <rich0@gentoo.org>
>>>> wrote:
>>>>> On Fri, Jun 29, 2012 at 2:51 PM, Richard Yao <ryao@gentoo.org>
>>>>> wrote:
>>>>>> GRUB2 does away with the conventional stage files. It also wants a
>>>>>> special BIOS Boot Partition in order to function. That is where it
>>>>>> stores the equivalent of the stage2 bootcode.

>>>>> Now, that should make for a fun migration!  Fortunately I do have a
>>>>> separate boot already, and I guess I can be daring and overwrite it
>>>>> in place and trust in grub2 to still find the kernel elsewhere.
>>>>>
>>>>> Those without a separate boot and without any free space are likely
>>>>> to find this to be painful.  Resizing partitions isn't exactly
>>>>> risk-free...

>>>> I think Richard is incorrect here; grub2 can live on any filesystem,
>>>> so long as some combination of modules can access it.

>>> Do you know what function the BIOS Boot Partion serves? It is
>>> necessary when using GRUB2's ZFS support. I was under the impression
>>> that it stored boot code.

>> Based on a Google search I think "BIOS Boot Partition" is a GPT thing.
>> Not relevent if you have an MBR partition table.

> This is correct. I had forgotten that I switched to GPT

Some brief detail to de-fuzz things slightly...

1) Existing MBR installations function much like grub1 in terms of where 
the core, which replaces stage-1.5, goes.  Like grub1, one of two 
requirements must be met:

1a) Preferable: Some slack-space between the MBR and the first 
partition.  If this exists, grub2's core gets placed here, with the MBR 
using an absolute address to it, much like grub1 did with its stage-1.5s 
except that grub2's core is assembled from individual modules at install 
time and is thus able to handle anything it has modules for (as long as 
there's slack-space enough for the stack of necessary modules), including 
mdraid, lvm2, etc.

1b) Fallback: If no slack-space exists between the MBR and the first 
partition or if it's not enough, grub2 can install its core, much as 
grub1 could install its stage-1.5s, into /boot.  The disadvantage in both 
cases is that again it's accessed via absolute-address from the mbr, and 
if the filesystem moves it around, as journaling and COW-based 
filesystems sometimes do, the data can move out from under that absolute 
address, breaking the boot before even grub's rescue shell is available.  
Thus, this is STRONGLY DISCOURAGED, but it's an option for those on old 
systems, and it generally works as long as you're using an older /boot 
filesystem like fat or ext2 that's not going to move the data around.

(1c: As with grub1 it's also possible to install grub to a partition 
instead of to the entire disk.  However, this is much more strongly 
discouraged with grub2 than it was with grub1, I believe for much the 
same reasons as with 1b.)

2) BIOS-based GPT, with a dedicated BIOS partition (typically ~128 KB or 
so in size is fine), is definitely preferable to legacy MBR for grub2.  
This is because grub2 makes use of the (bare-partition, no-filesystem) 
dedicated BIOS partition to place its core in, something grub1 doesn't 
do.  With no filesystem and a special partition type dedicated by GPT for 
this purpose, this is the strongest guarantee yet that the core will 
remain undisturbed at the absolute address grub placed it at, and thus at 
least the core rescue shell should always be available, even if something 
happens to /boot (which is entirely separate from the reserved BIOS 
partition.

If a user has planned well when they setup their GPT partitioning, this 
reserved BIOS partition should be plenty large enough for all required 
modules, even for stacked devices such as exotic filesystem on lvm on 
mdraid.

3) For EFI-based GPT, there's another entirely separate special reserved 
partition for the EFI system.  According to the EFI spec, this must be 
formatted FAT32, and should be 256 MB or so.  I don't have an EFI system 
so have skipped much of the grub2 documentation on this so far and thus 
don't know a whole lot about it.

Again, if a user has planned well when setting up their GPT, they may 
actually have both an EFI partition and a BIOS partition (as I do here), 
tho only one will likely be in use.  But having both in the gpt layout 
does allow migrating the disk from a legacy BIOS system to a newer EFI 
system when the time comes, without re-gdisking (fdisking for gpt).


Meanwhile, for those who didn't know yet, it's worth noting that with GPT 
there's no primary/logical partition division, they're all the same, and 
there's room for upto 128 partition entries in the standard GPT, tho a 
larger one is possible if needed.  Additionally, there's two copies of 
the partition table and they're checksummed, making them MUCH more 
reliable than the old MBR scheme.  AND, gpt allows direct partition 
names, much like filesystem labels, udev maps them (tho for some reason 
it doesn't seem to map those on mdraid devices last I checked), and mount 
can mount by partition name using udev in much the same way as it mounts 
by UUID or filesystem label.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




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

* Re: [gentoo-dev] Re: grub:2 keywords
  2012-06-30  5:55                           ` [gentoo-dev] " Duncan
@ 2012-06-30 15:18                             ` Maxim Kammerer
  0 siblings, 0 replies; 38+ messages in thread
From: Maxim Kammerer @ 2012-06-30 15:18 UTC (permalink / raw
  To: gentoo-dev

On Sat, Jun 30, 2012 at 8:55 AM, Duncan <1i5t5.duncan@cox.net> wrote:
> 3) For EFI-based GPT, there's another entirely separate special reserved
> partition for the EFI system.

An EFI partition can reside on a disk with an MBR (legacy)
partitioning scheme, GPT scheme, El Torito CD-ROM boot entry, etc. For
MBR, 0xEF partition ID is used, and the same platform ID is used in El
Torito; GPT uses a corresponding GUID.

> According to the EFI spec, this must be
> formatted FAT32,

No, the UEFI specification mandates that FAT12/16/32 EFI partitions
must be supported, but allows the firmware to support other
filesystems, with or without the 0xEF / GUID marker above.

> and should be 256 MB or so.

No such requirement.

-- 
Maxim Kammerer
Liberté Linux: http://dee.su/liberte



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

* Re: [gentoo-dev] grub:2 keywords
  2012-06-29 19:15                 ` Rich Freeman
  2012-06-29 19:26                   ` Mike Gilbert
@ 2012-07-02 18:57                   ` Jeroen Roovers
  2012-07-02 19:02                     ` Mike Gilbert
  1 sibling, 1 reply; 38+ messages in thread
From: Jeroen Roovers @ 2012-07-02 18:57 UTC (permalink / raw
  To: gentoo-dev

On Fri, 29 Jun 2012 15:15:23 -0400
Rich Freeman <rich0@gentoo.org> wrote:

> On Fri, Jun 29, 2012 at 3:01 PM, Mike Gilbert <floppym@gentoo.org>
> wrote:
> > 3. grub2-install calls grub2-bios-setup which installs boot.img into
> > the MBR and embeds core.img into the sectors immediately after the
> > MBR.
> 
> Ok, that isn't all that unlike grub1 - that is what stage1.5 is.  It
> just sounds like these aren't static files that are copied out of
> /boot/grub, but rather they're built on-demand from other files there.
>  Grub1 figures out which static stage1.5 you need based on where /boot
> is.  They probably went to a more dynamic model so that they can
> support stuff like LVM+MD+LUKS+etc without having every permutation of
> static code.  I'm not sure how smart the bootloader code ends up being
> - it wouldn't surprise me if at time of install the installer does all
> the work and just loads a simple bootloader on the diagnostic cylinder
> with just enough smarts to find /boot if it hasn't changed.

And if in this complex transition something goes wrong, we could opt
for the solution Ubuntu provided years ago, which was to add to the
grub1 boot loader configuration an entry which would call the grub2
boot loader, so that grub2's correct function could be ascertained
before the definitive switch to grub2 and removal of the grub1 code.


     jer



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

* Re: [gentoo-dev] grub:2 keywords
  2012-07-02 18:57                   ` Jeroen Roovers
@ 2012-07-02 19:02                     ` Mike Gilbert
  2012-07-03 14:20                       ` Jeroen Roovers
  0 siblings, 1 reply; 38+ messages in thread
From: Mike Gilbert @ 2012-07-02 19:02 UTC (permalink / raw
  To: gentoo-dev

On Mon, Jul 2, 2012 at 2:57 PM, Jeroen Roovers <jer@gentoo.org> wrote:
> On Fri, 29 Jun 2012 15:15:23 -0400
> Rich Freeman <rich0@gentoo.org> wrote:
>
>> On Fri, Jun 29, 2012 at 3:01 PM, Mike Gilbert <floppym@gentoo.org>
>> wrote:
>> > 3. grub2-install calls grub2-bios-setup which installs boot.img into
>> > the MBR and embeds core.img into the sectors immediately after the
>> > MBR.
>>
>> Ok, that isn't all that unlike grub1 - that is what stage1.5 is.  It
>> just sounds like these aren't static files that are copied out of
>> /boot/grub, but rather they're built on-demand from other files there.
>>  Grub1 figures out which static stage1.5 you need based on where /boot
>> is.  They probably went to a more dynamic model so that they can
>> support stuff like LVM+MD+LUKS+etc without having every permutation of
>> static code.  I'm not sure how smart the bootloader code ends up being
>> - it wouldn't surprise me if at time of install the installer does all
>> the work and just loads a simple bootloader on the diagnostic cylinder
>> with just enough smarts to find /boot if it hasn't changed.
>
> And if in this complex transition something goes wrong, we could opt
> for the solution Ubuntu provided years ago, which was to add to the
> grub1 boot loader configuration an entry which would call the grub2
> boot loader, so that grub2's correct function could be ascertained
> before the definitive switch to grub2 and removal of the grub1 code.
>

That is exactly what Doug (cardoe) proposed, and he is working on the
docs for that.



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

* Re: [gentoo-dev] grub:2 keywords
  2012-07-02 19:02                     ` Mike Gilbert
@ 2012-07-03 14:20                       ` Jeroen Roovers
  2012-07-05  4:26                         ` Doug Goldstein
  0 siblings, 1 reply; 38+ messages in thread
From: Jeroen Roovers @ 2012-07-03 14:20 UTC (permalink / raw
  To: gentoo-dev

On Mon, 2 Jul 2012 15:02:28 -0400
Mike Gilbert <floppym@gentoo.org> wrote:

> That is exactly what Doug (cardoe) proposed, and he is working on the
> docs for that.
> 

Ah yes, it's been a long-winded thread. :)


     jer



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

* Re: [gentoo-dev] grub:2 keywords
  2012-07-03 14:20                       ` Jeroen Roovers
@ 2012-07-05  4:26                         ` Doug Goldstein
  2012-07-05  7:29                           ` Hinnerk van Bruinehsen
  0 siblings, 1 reply; 38+ messages in thread
From: Doug Goldstein @ 2012-07-05  4:26 UTC (permalink / raw
  To: gentoo-dev

On Tue, Jul 3, 2012 at 9:20 AM, Jeroen Roovers <jer@gentoo.org> wrote:
> On Mon, 2 Jul 2012 15:02:28 -0400
> Mike Gilbert <floppym@gentoo.org> wrote:
>
>> That is exactly what Doug (cardoe) proposed, and he is working on the
>> docs for that.
>>
>
> Ah yes, it's been a long-winded thread. :)
>
>
>      jer
>

I got a little busier this past weekend than I had intended (loving
that leap second bug) but here's the first draft:

http://dev.gentoo.org/~cardoe/docs/grub2-migration.xml

It will be integrated into the official Gentoo doc set once I get a
nod from the docs guys.

-- 
Doug Goldstein



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

* Re: [gentoo-dev] grub:2 keywords
  2012-07-05  4:26                         ` Doug Goldstein
@ 2012-07-05  7:29                           ` Hinnerk van Bruinehsen
  0 siblings, 0 replies; 38+ messages in thread
From: Hinnerk van Bruinehsen @ 2012-07-05  7:29 UTC (permalink / raw
  To: gentoo-dev

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

On 05.07.2012 06:26, Doug Goldstein wrote:
> On Tue, Jul 3, 2012 at 9:20 AM, Jeroen Roovers <jer@gentoo.org>
> wrote:
>> On Mon, 2 Jul 2012 15:02:28 -0400 Mike Gilbert
>> <floppym@gentoo.org> wrote:
>> 
>>> That is exactly what Doug (cardoe) proposed, and he is working
>>> on the docs for that.
>>> 
>> 
>> Ah yes, it's been a long-winded thread. :)
>> 
>> 
>> jer
>> 
> 
> I got a little busier this past weekend than I had intended
> (loving that leap second bug) but here's the first draft:
> 
> http://dev.gentoo.org/~cardoe/docs/grub2-migration.xml
> 
> It will be integrated into the official Gentoo doc set once I get
> a nod from the docs guys.
> 

Hi,

according to my "/etc/grub.d/10_linux" grub2 (or better the
grub2-mkconfig script) searches for the following kernel names:
/vmlinuz-*, /boot/vmlinuz-* and /boot/kernel-* for x86 and x86_64 and
the same plus /vmlinux-* and /boot/vmlinux-* for other arches.

The accepted names for initrd/initramfs are: initrd.img-${version},
initrd-${version}.img, initrd-${version}.gz,initrd-${version},
initramfs-${version}.img, initrd.img-${alt_version},
initrd-${alt_version}.img, initrd-${alt_version},
initramfs-${alt_version}.img, initramfs-genkernel-${version},
initramfs-genkernel-${alt_version},
initramfs-genkernel-${GENKERNEL_ARCH}-${version} and
initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}.

I (as a user) would propose to reflect this . I would also give
information about /etc/defaults/grub since that is the config file
that you need to enable persistent, customized kernel options (will be
automatically appended when you run grub2-mkconfig) and grub specific
options like the timeout or the graphic settings.

Thank you for your effort. I really look forward for grub2 becoming
the "default" (whatever that is in gentoo ;) ) option.

WKR
Hinnerk

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJP9UI8AAoJEJwwOFaNFkYc2kcH/jKTjWpkqxx4rJxjHwGHDm0N
3BNe+o8/DbMbiyTG/fAwVmq4EdzucqWtoF5fRrNRkNd3OGg9+dZcoUeOVdZfWKpY
evJF1/iuetr7XuHDJhjnAn2FLNfb7jzuLlUEXiGLYLvgtu+O5NUgLQyv3ut+eVMU
JCRM41/BchnfnZdFTPWreL6QimpxQVBT4HDff5K0YYqrVEePLOufIt8ct81c2oAQ
3KSC4uPb9bvrM+3S3NVtyYUZgy60QrtzuWXM0S4eWEodU1pO5xnczqt7FCGlnnw1
G83aDcXI1oBdvVnMbhHJtAQi9EBvUn/q56gYMbtREFTXDjUvKZ0ozfu1lmEKGk8=
=/ZBF
-----END PGP SIGNATURE-----



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

end of thread, other threads:[~2012-07-05  7:29 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25  4:15 [gentoo-dev] grub:2 keywords Mike Gilbert
2012-06-25  5:35 ` Richard Yao
2012-06-25  9:15   ` Michał Górny
2012-06-25  9:10 ` heroxbd
2012-06-25 15:19 ` Doug Goldstein
2012-06-25 16:56   ` Mike Gilbert
2012-06-26  2:43     ` [gentoo-dev] " Duncan
2012-06-26  3:13       ` Mike Gilbert
2012-06-26  4:04         ` Duncan
2012-06-29  5:12           ` Mike Frysinger
2012-06-29  5:35             ` Duncan
2012-06-26  3:53       ` Michał Górny
2012-06-25 17:02 ` [gentoo-dev] " Michał Górny
2012-06-25 17:26   ` Mike Gilbert
2012-06-29  5:13 ` Mike Frysinger
2012-06-29  5:59   ` Mike Gilbert
2012-06-29 10:28     ` Rich Freeman
2012-06-29 15:32     ` Mike Frysinger
2012-06-29 16:11       ` Mike Gilbert
2012-06-29 18:08         ` Rich Freeman
2012-06-29 18:29           ` Mike Gilbert
2012-06-29 18:38             ` Rich Freeman
2012-06-29 18:51               ` Richard Yao
2012-06-29 19:00                 ` Rich Freeman
2012-06-29 19:04                   ` Mike Gilbert
2012-06-29 20:56                     ` Richard Yao
2012-06-29 21:04                       ` Mike Gilbert
2012-06-29 21:10                         ` Richard Yao
2012-06-30  5:55                           ` [gentoo-dev] " Duncan
2012-06-30 15:18                             ` Maxim Kammerer
2012-06-29 19:01               ` [gentoo-dev] " Mike Gilbert
2012-06-29 19:15                 ` Rich Freeman
2012-06-29 19:26                   ` Mike Gilbert
2012-07-02 18:57                   ` Jeroen Roovers
2012-07-02 19:02                     ` Mike Gilbert
2012-07-03 14:20                       ` Jeroen Roovers
2012-07-05  4:26                         ` Doug Goldstein
2012-07-05  7:29                           ` Hinnerk van Bruinehsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox