Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Gjgtp-0000uG-Vp for mharc-grub-devel@gnu.org; Mon, 13 Nov 2006 13:51:18 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gjgto-0000si-5Z for grub-devel@gnu.org; Mon, 13 Nov 2006 13:51:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gjgtm-0000r3-Gb for grub-devel@gnu.org; Mon, 13 Nov 2006 13:51:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gjgtm-0000qw-A5 for grub-devel@gnu.org; Mon, 13 Nov 2006 13:51:14 -0500 Received: from [66.163.179.223] (helo=web36109.mail.mud.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1Gjgtm-0007qw-7U for grub-devel@gnu.org; Mon, 13 Nov 2006 13:51:14 -0500 Received: (qmail 8209 invoked by uid 60001); 13 Nov 2006 18:51:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Nuhdm0NC4CcC0zHgvMpWvA4ASDfW9KeuPlYO0tmncXghfaBGLoFdw+s7ymG8vHNZidPGiM/q7gf5sYTLpigBWs8qU1pdWGrWaNGsp/EfqXicAHuBWfAS0lUzCevVzX05WjwWBdHe9eTlkjdN9d71N9+rLx0iIeXJ+mF0Kvf/ZnM= ; Message-ID: <20061113185112.8207.qmail@web36109.mail.mud.yahoo.com> Received: from [199.103.25.106] by web36109.mail.mud.yahoo.com via HTTP; Mon, 13 Nov 2006 10:51:12 PST Date: Mon, 13 Nov 2006 10:51:12 -0800 (PST) From: Andrey Shuvikov To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: grub-mkimage 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, 13 Nov 2006 18:51:16 -0000 Hello, I was looking into how grub2 works and noticed that in the load list in grub2/boot/i386/pc/diskboot.S sector number is 8-byte integer, while grub2/util/i386/pc/grub-mkimage.c sets the number of sectors to load at 4-byte offset. Because of this it actually patches upper part of the sector rather than number of sectors. This is the changes I've made: ====================================================== --- grub-mkimage.old Mon May 08 14:29:10 2006 +++ grub-mkimage.c Mon Nov 13 13:41:01 2006 @@ -143,7 +143,7 @@ generate_image (const char *dir, FILE *o /* i386 is a little endian architecture. */ *((grub_uint16_t *) (boot_img + GRUB_DISK_SECTOR_SIZE - - GRUB_BOOT_MACHINE_LIST_SIZE + 4)) + - GRUB_BOOT_MACHINE_LIST_SIZE + 8)) = grub_cpu_to_le16 (num); grub_util_write_image (boot_img, boot_size, out); ====================================================== Sincerely, Andrey Shuvikov ____________________________________________________________________________________ Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited