Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MqAPJ-00067D-BN for mharc-grub-devel@gnu.org; Tue, 22 Sep 2009 14:48:09 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqAPH-000678-Gd for grub-devel@gnu.org; Tue, 22 Sep 2009 14:48:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqAPC-00066w-Ag for grub-devel@gnu.org; Tue, 22 Sep 2009 14:48:06 -0400 Received: from [199.232.76.173] (port=44135 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqAPC-00066t-7T for grub-devel@gnu.org; Tue, 22 Sep 2009 14:48:02 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:61028) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqAPB-0003Cy-LS for grub-devel@gnu.org; Tue, 22 Sep 2009 14:48:02 -0400 Received: from [85.180.51.189] (e180051189.adsl.alicedsl.de [85.180.51.189]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MKsym-1MqAPA1gFT-000QKp; Tue, 22 Sep 2009 20:48:00 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Tue, 22 Sep 2009 20:47:59 +0200 Message-Id: <1253645279.22288.16.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.92 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+6m7XHvRSvb5TnYMfK9fyk1ilahk46qm9qvir Ml7iJRp05TGmj3c+rJImV/yT/x3LBJNCBL554vJRRfL3FIWvHt kyJKdMSvanIRpKLoVJgDU2WMHwgoPBv X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: grub core size 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: Tue, 22 Sep 2009 18:48:07 -0000 Am Dienstag, den 22.09.2009, 19:41 +0100 schrieb James Courtier-Dutton: > Hi, > > I am using grub 2. > The stage 1 bit of grub, that stores itself in the partition table and > the following sectors, seems to be quite large. > I have a HP server system that only has 32 512-bytes sectors free > before the first partition but the grub core does not fit in there. It > seems to need more like 64 512-byte sectors. > > Why does grub need so much space on that part of the hard disk ? > My /boot/grub has been installed on an ext2 partition. > > How difficult would it be to fit the stage 1 into 16384 bytes? > USB sticks sometimes have similar problems. > > How about two versions of the grub core, one that requires the rest of > grub to be on an ext2/3 partition, and a larger one that can handle > other options, e.g. lvm etc. > Obviously, it is only worth trying that if the ext2 one can get into > 16384 bytes or 32 sectors. > The stage1 equivalent from GRUB Legacy in GRUB 2 would be boot.img which is 512 bytes big. What you probable mean is the size of core.img which usually gets embed between MBR and first partition, like stage1_5 from GRUB Legacy. core.img only contains the stuff which is needed to access your /boot and is created in the grub-install script with the grub-mkimage line. Just run it with `sh -x grub-install /dev/sda' and you see what modules get included. Well not all kernel.img gets also included and all necessary dependencies of the modules. And core.img is also compressed with LZMA to make it smaller. The problem of the size is the actual code. GRUB 2's kernel.img is for me 31K You can get it smaller if you remove the rescue mode and other stuff you personally don't need, but that's not a generic solution. -- Felix Zielcke Proud Debian Maintainer