From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: root seems to be incorrectly set after install
Date: Sat, 2 Feb 2008 23:39:23 +0100 [thread overview]
Message-ID: <20080202223923.GA5661@thorin> (raw)
In-Reply-To: <47A4E372.2050000@comcast.net>
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
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
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
[-- Attachment #2: boot_drive.diff --]
[-- Type: text/x-diff, Size: 1747 bytes --]
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)
next prev parent reply other threads:[~2008-02-02 23:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-02 21:41 root seems to be incorrectly set after install George Lengel
2008-02-02 22:39 ` Robert Millan [this message]
2008-02-03 3:44 ` George Lengel
2008-02-03 11:00 ` Robert Millan
2008-02-03 14:47 ` George Lengel
2008-02-03 15:18 ` Robert Millan
2008-02-03 16:53 ` Yoshinori K. Okuji
2008-02-03 21:55 ` Yoshinori K. Okuji
2008-02-09 4:15 ` root seems to be incorrectly set after install (patch works) George Lengel
2008-02-09 10:26 ` screen corruption Robert Millan
2008-02-09 19:33 ` George Lengel
2008-02-09 20:26 ` Vesa Jääskeläinen
2008-02-09 23:27 ` George Lengel
2008-02-09 22:10 ` Robert Millan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080202223923.GA5661@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.