From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Dx61e-0004qH-RX for mharc-grub-devel@gnu.org; Mon, 25 Jul 2005 12:41:58 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dx61d-0004pn-Hf for grub-devel@gnu.org; Mon, 25 Jul 2005 12:41:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dx61Z-0004ng-9i for grub-devel@gnu.org; Mon, 25 Jul 2005 12:41:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dx61Z-0004jv-1H for grub-devel@gnu.org; Mon, 25 Jul 2005 12:41:53 -0400 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dx66R-0007uy-OC for grub-devel@gnu.org; Mon, 25 Jul 2005 12:46:56 -0400 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id 07EAB8B68 for ; Mon, 25 Jul 2005 18:35:58 +0200 (CEST) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 31961-10 for ; Mon, 25 Jul 2005 17:44:07 +0200 (CEST) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 468258B9A for ; Mon, 25 Jul 2005 18:35:55 +0200 (CEST) Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 0443AC045 for ; Mon, 25 Jul 2005 18:35:55 +0200 (CEST) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <200507242044.19861.okuji@enbug.org> <200507251111.56217.okuji@enbug.org> <42E4BE5F.8030304@draigBrady.com> <798ee839cfbfdb4093c2e9e90b4d861e@penguinppc.org> From: Marco Gerards Date: Mon, 25 Jul 2005 18:35:55 +0200 In-Reply-To: <798ee839cfbfdb4093c2e9e90b4d861e@penguinppc.org> (Hollis Blanchard's message of "Mon, 25 Jul 2005 11:15:14 -0400") Message-ID: <87hdein8r8.fsf@student.han.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Subject: Re: grub-install X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2005 16:41:57 -0000 Hollis Blanchard 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