FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 06-29-2012, 06:29 PM
Mike Gilbert
 
Default grub:2 keywords

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.
 
Old 06-29-2012, 06:38 PM
Rich Freeman
 
Default grub:2 keywords

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
 
Old 06-29-2012, 06:51 PM
Richard Yao
 
Default grub:2 keywords

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.
 
Old 06-29-2012, 07:00 PM
Rich Freeman
 
Default grub:2 keywords

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
 
Old 06-29-2012, 07:01 PM
Mike Gilbert
 
Default grub:2 keywords

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
 
Old 06-29-2012, 07:04 PM
Mike Gilbert
 
Default grub:2 keywords

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.
 
Old 06-29-2012, 07:15 PM
Rich Freeman
 
Default grub:2 keywords

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
 
Old 06-29-2012, 07:26 PM
Mike Gilbert
 
Default grub:2 keywords

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. :-)
 
Old 06-29-2012, 08:56 PM
Richard Yao
 
Default grub:2 keywords

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.
 
Old 06-29-2012, 09:04 PM
Mike Gilbert
 
Default grub:2 keywords

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.
 

Thread Tools




All times are GMT. The time now is 09:41 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org