From: Marco Gerards <metgerards@student.han.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: grub-install
Date: Mon, 25 Jul 2005 18:35:55 +0200 [thread overview]
Message-ID: <87hdein8r8.fsf@student.han.nl> (raw)
In-Reply-To: <798ee839cfbfdb4093c2e9e90b4d861e@penguinppc.org> (Hollis Blanchard's message of "Mon, 25 Jul 2005 11:15:14 -0400")
Hollis Blanchard <hollis@penguinppc.org> writes:
>> In case others don't know the reason for "31KB":
>>
>> As can be seen in the attached common linux disk layout diagram,
>> the optional DOS compatability region used by stage 1.5 is added by
>> default by most partition managers, and is there so that partitions
>> start on a cylinder boundry. Therefore its size is determined by the
>> number of sectors (512 bytes) per cylinder. The maximum sectors per
>> cylinder is 64, and so the largest size available for grub's stage 1.5
>> is 63 * 512, or 32256 bytes.
>
> This is for GRUB Legacy, right? There is no "stage 1.5" In GRUB2? What
> is the new layout?
You are right. In GRUB 2 there is no stage 1.5 and stage2. In GRUB 2
there is a core image. It mainly consists of the stuff in kern/, some
stuff from disk/i386/pc, term/i386/pc. Using that is can load
modules.
The core image with some modules replace stage 1.5. So the main core
of GRUB together with some important modules are stored in this 31KB.
Because this space is limited not every module can fit in there. Most
importantly is the filesystem module. It is used to load other
modules from that filesystem.
So an example of a boot process is:
- The BIOS loads the GRUB2 (boot.img) as it is stored in the MBR
- GRUB2 in the MBR loads that 31KB into memory and jumps to it
- That 31KB consists of the kernel (kernel.img) and some raw modules
- The kernel (rescue mode) starts and loads every module
- Rescue mode tries to load normal.mod
- If normal.mod can be found on the prefix path it is loaded
- Normal mode looks for grub.cfg on the prefix path and loads it
- The menu is shown and the user can choose an OS to boot
It is possible to load additional modules so other filesystems can be
accessed, other loaders can be used, etc. On the PC a nice set of
modules is: pc.mod (for partition access), _chain.mod (rescue mode
chainloader), ext2.mod. Of course ext2.mod is for the case that you
want to load normal.mod and other modules from an ext2 filesystem.
I hope this e-mail made clear how GRUB 2 basically works on the PC.
I am not a PC expert and my English is not that good. Hopefully
someone can and will correct me if I was wrong so I will understand
things better. Hopefully Hollis' question is answered.
Thanks,
Marco
next prev parent reply other threads:[~2005-07-25 16:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-24 18:44 grub-install Yoshinori K. Okuji
2005-07-25 2:04 ` grub-install Hollis Blanchard
2005-07-25 9:11 ` grub-install Yoshinori K. Okuji
2005-07-25 10:26 ` grub-install P
2005-07-25 13:12 ` grub-install P
2005-07-26 13:13 ` grub-install P
2005-07-26 19:28 ` grub-install Yoshinori K. Okuji
2005-07-25 15:15 ` grub-install Hollis Blanchard
2005-07-25 16:35 ` Marco Gerards [this message]
2005-07-25 19:16 ` grub-install Yoshinori K. Okuji
2005-07-26 18:41 ` grub-install Vincent Pelletier
2005-07-26 19:34 ` grub-install Yoshinori K. Okuji
2005-07-26 19:56 ` grub-install Vincent Pelletier
2005-07-25 12:15 ` grub-install Marco Gerards
2005-07-25 19:25 ` grub-install Yoshinori K. Okuji
2005-07-25 13:06 ` grub-install Vincent Pelletier
2005-07-25 19:04 ` grub-install Yoshinori K. Okuji
-- strict thread matches above, loose matches on Subject: below --
2008-05-27 5:06 grub-install E.R
2008-05-27 15:40 ` grub-install Pavel Roskin
2008-05-28 0:54 ` grub-install Gregg Levine
2008-05-28 6:00 grub-install E.R
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=87hdein8r8.fsf@student.han.nl \
--to=metgerards@student.han.nl \
--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.