bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Request for help debugging this grub problem


From: Jon Seymour
Subject: Request for help debugging this grub problem
Date: Sat, 27 Sep 2003 23:48:58 +1000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

I have had grub installed on my RedHat 8 system for sometime now. It had been working fine.

Just recently, I needed to compile a later kernel (2.4.21) to take advantage of some additional functionality.

make install on the kernel updated my grub configuration, but I can no longer boot from the hard disk.

The symptom is a console with the following message:

GRUB<space>

To explain my setup:

* the MBR of hd0 boots into Windows XP on /dev/hda1 [ kept around so that I can use partition magic ] * boot.ini of Windows XP has been configured with one item for Windows XP and one for /dev/hda3
   * the Linux root file system is on /dev/hda5 (hd0,4)
* the boot file system is on /dev/hda3 (hd0,2) and is mounted over /boot when /dev/hda5 is the root fs.
   * /dev/hda3 and /dev/hda5 are ext2 partitions
I tried re-installing grub with:

   grub-install /dev/hda3

I also tried:

   grub-install --root-directory=/boot /dev/hda3

but neither option helped.

So, I booted off a linux recovery disk and tried installing grub on a new floppy disk with:

   grub-install /dev/fd0

I copied grub.conf from (hd0,2)/grub/grub.conf on (fd0)/boot/grub.

When I boot from this floppy disk, this works as expected - a grub menu appears and I can select the OS image I want to boot from the grub menu.

Having tried everything I could think off to get the harddisk booting, I resorted to using xxd to edit the stage1 file in /usr/share/grub so that byte0x17c was 'g' rather than 'G'. This is the first letter of the first message that "GRUB" writes to the console when the boot record is executed. I then did a grub-install /dev/fd0 and confirmed that the boot message was gRUB rather than GRUB. However, if then I did a grub-install /dev/hda3 and then tried to boot the boot message was GRUB rather than the expected "gRUB". This seems to indicate to me that the stage1 file it is executing isn't the one that gets installed by grub-install (otherwise the message should read gRUB).

I am not sure if it is relevant, but here is a copy of the partition table (captured with sfdisk). fdisk reports that the partition table is "out of order". I haven't tried an reordering the partition table yet because I am afraid of the consequences of doing so.

Disk /dev/hda: 4998 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hda1   *      0+    764     765-   6144831    7  HPFS/NTFS
/dev/hda2 4735 4997 263 2112547+ 1c Hidden Win95 FAT32 (LBA)
/dev/hda3        765     777      13     104422+  83  Linux
/dev/hda4        778    4734    3957   31784602+   f  Win95 Ext'd (LBA)
/dev/hda5        778+   4591    3814-  30635923+  83  Linux
/dev/hda6       4592+   4721     130-   1044193+  82  Linux swap
               start: (c,h,s) expected (1023,254,63) found (1023,1,1)
/dev/hda7       4722+   4734      13-    104391    b  Win95 FAT32
               start: (c,h,s) expected (1023,254,63) found (1023,1,1)

For the record, here is my grub.conf file located in /boot/grub/grub.conf (hd0,2)/grub/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,2)
#          kernel /vmlinuz-version ro root=/dev/hda5
#          initrd /initrd-version.img
# boot=/dev/hda3
default=0
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
       root (hd0,2)
       kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ hdc=ide-scsi
       initrd /initrd-2.4.18-14.img
title DOS
       rootnoverify (hd0,0)
       chainloader +1


Any thoughts about why grub has started misbehaving for me?

jon.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]