From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KBcr2-0004KO-Hy for mharc-grub-devel@gnu.org; Wed, 25 Jun 2008 17:48:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KBcr0-0004GL-KL for grub-devel@gnu.org; Wed, 25 Jun 2008 17:48:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KBcqy-0004CF-TL for grub-devel@gnu.org; Wed, 25 Jun 2008 17:48:38 -0400 Received: from [199.232.76.173] (port=40014 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBcqy-0004Bz-Pt for grub-devel@gnu.org; Wed, 25 Jun 2008 17:48:36 -0400 Received: from c60.cesmail.net ([216.154.195.49]:8203) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1KBcqy-00089b-Mq for grub-devel@gnu.org; Wed, 25 Jun 2008 17:48:36 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 25 Jun 2008 17:48:35 -0400 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 28419618F22 for ; Wed, 25 Jun 2008 17:48:35 -0400 (EDT) From: Pavel Roskin To: grub-devel@gnu.org Content-Type: text/plain; charset=UTF-8 Date: Wed, 25 Jun 2008 17:48:34 -0400 Message-Id: <1214430514.11716.19.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 8bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Failure to embed core.img is fatal now 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: Wed, 25 Jun 2008 21:48:38 -0000 Hello! I have a system with a hard drive with a geometry that doesn't leave space for GRUB to be embedded: Disk /dev/sda: 30.0 GB, 30020272128 bytes 64 heads, 32 sectors/track, 28629 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Disk identifier: 0xfafa98d2 Device Boot Start End Blocks Id System /dev/sda1 1 26704 27344880 83 Linux /dev/sda2 26705 28629 1971200 82 Linux swap / Solaris I'm trying to install the current GRUB2: # grub-install /dev/sda grub-setup: error: Cannot read `/boot/grub/core.img' correctly It turns out following happens in grub-setup: - core.img is read by the OS facilities - the memory image is modified - the memory image is compared to core.img read by GRUB FS code and fails - the memory image is modified again - first 2 sectors of the memory image are written to core.img I think the 2 sectors should be written before the image is read back. I tried to fix it, but it didn't work in the first try (GRUB hangs after showing "GRUB Loading kernel.") I'm also surprised that the code alternately uses dir and DEFAULT_DIRECTORY to calculate core_path. core_path is calculated 3 times in one function! If dir and DEFAULT_DIRECTORY are used correctly, I suggest that two different variables are used for what is now called core_path. -- Regards, Pavel Roskin