From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JLRMM-0007zf-7m for mharc-grub-devel@gnu.org; Sat, 02 Feb 2008 18:01:18 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JLRMK-0007zZ-HI for grub-devel@gnu.org; Sat, 02 Feb 2008 18:01:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JLRMJ-0007zM-2N for grub-devel@gnu.org; Sat, 02 Feb 2008 18:01:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JLRMJ-0007zJ-00 for grub-devel@gnu.org; Sat, 02 Feb 2008 18:01:15 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JLRMI-0005vC-Lh for grub-devel@gnu.org; Sat, 02 Feb 2008 18:01:14 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JLRKR-00039J-Om for grub-devel@gnu.org; Sat, 02 Feb 2008 23:59:20 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JLR19-0001Ty-8Z for grub-devel@gnu.org; Sat, 02 Feb 2008 23:39:23 +0100 Date: Sat, 2 Feb 2008 23:39:23 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080202223923.GA5661@thorin> References: <47A4E372.2050000@comcast.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47A4E372.2050000@comcast.net> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: root seems to be incorrectly set after 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: Sat, 02 Feb 2008 23:01:16 -0000 --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, Feb 02, 2008 at 04:41:06PM -0500, George Lengel wrote: > When I reboot I get thrown into rescue mode and typing set shows > grub>prefix= (hd0,7)/boot/grub > grub>root=hd0,7 > > If I manually set root to (hd2,7) and prefix to (hd2,7)/boot/grub I can > insmod normal and then running normal proceeds perfectly. It makes no > sense to me why it is prepending hd0 instead of hd2. I have searched all > over for a solution and the closest I came was someone a few months ago > posted a similar problem. It was suggested to delete system.map and > regenerate it, but this did not help. Sounds like grub_boot_drive not having the right info. It works when received via multiboot, but not from boot.img. Does the attached patch fix your problem? Just a guess ... -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.) --X1bOJ3K7DJ5YkBrT Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="boot_drive.diff" diff -ur grub2/boot/i386/pc/boot.S tmp/boot/i386/pc/boot.S --- grub2/boot/i386/pc/boot.S 2008-01-07 20:52:08.000000000 +0100 +++ tmp/boot/i386/pc/boot.S 2008-02-02 23:37:36.000000000 +0100 @@ -105,21 +105,6 @@ /* general setup */ cli /* we're not safe here! */ - /* - * This is a workaround for buggy BIOSes which don't pass boot - * drive correctly. If GRUB is installed into a HDD, check if - * DL is masked correctly. If not, assume that the BIOS passed - * a bogus value and set DL to 0x80, since this is the only - * possible boot drive. If GRUB is installed into a floppy, - * this does nothing (only jump). - */ -boot_drive_check: - jmp 1f /* grub-setup may overwrite this jump */ - testb $0x80, %dl - jnz 1f - movb $0x80, %dl -1: - /* * ljmp to the next instruction because some bogus BIOSes * jump to 07C0:0000 instead of 0000:7C00. diff -ur grub2/util/i386/pc/grub-setup.c tmp/util/i386/pc/grub-setup.c --- grub2/util/i386/pc/grub-setup.c 2008-01-05 13:20:28.000000000 +0100 +++ tmp/util/i386/pc/grub-setup.c 2008-02-02 23:37:21.000000000 +0100 @@ -246,13 +246,6 @@ free (tmp_img); - /* If DEST_DRIVE is a hard disk, enable the workaround, which is - for buggy BIOSes which don't pass boot drive correctly. Instead, - they pass 0x00 or 0x01 even when booted from 0x80. */ - if (dest_dev->disk->id & 0x80) - /* Replace the jmp (2 bytes) with double nop's. */ - *boot_drive_check = 0x9090; - /* If the destination device can have partitions and it is the MBR, try to embed the core image into after the MBR. */ if (dest_dev->disk->has_partitions && ! dest_dev->disk->partition) --X1bOJ3K7DJ5YkBrT--