Bug 143725 - grub-install fails to install stage1 on MBR
Summary: grub-install fails to install stage1 on MBR
Alias: None
Product: Fedora
Classification: Fedora
Component: grub   
(Show other bugs)
Version: rawhide
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-25 15:43 UTC by Kazuyuki Maejima
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 0.95-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-03 22:12:15 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Kazuyuki Maejima 2004-12-25 15:43:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020

Description of problem:
grub-install of grub-0.95-5 won't install the stage1 program
on the MBR of the IDE disk (/dev/hda) of my laptop.

After several attempts in vain, I extracted another grub-install
from grub-0.95-3 RPM in FC3 distribution set and found
it successfully installed stage1 code on the MBR.

I compared the two versions of grub-install scripts and found a
difference in the 'setup' command lines given to grub.

(0.95-3) setup $force_lba --stage2=$grubdir/stage2
--prefix=$grub_prefix $install_drive

(0.95-5) setup $force_lba --stage2=$grubdir/stage2
--prefix=$grub_prefix $root_drive

I think $root_drive should not come in place of a install device.
(But I don't know how to correct this as the script is being
complicated to support RAID1.)

Version-Release number of selected component (if applicable):

How reproducible:
Didn't try

Steps to Reproduce:
Assume that
 - /dev/hda is the only HDD of a PC.
 - Fedora Core is already installed in /dev/hda2 (/boot) and
   /dev/hda3 (/).
 - grub is installed on /dev/hda.
 - grub RPM is updated to 0.95-5.

1. Install Windows XP in /dev/hda1, and let the Windows installer
   overwrite the MBR of /dev/hda.
   (on which the first stage of grub was previously installed.)
2. Boot with FC3 CD disc 1 in rescue mode. (boot: linux rescue)
3. Mount the Fedora Core partitions under /mnt/sysimage as
   the Fedora Core installer suggests.
4. chroot to /mnt/sysimage. (# /usr/sbin/chroot /mnt/sysimage)
5. Run grub-install. (# /sbin/grub-install /dev/hda)

Actual Results:  stage1 boot loader was installed on /dev/hda2
instead of the MBR of /dev/hda.  (The MBR was left intact.)

Expected Results:  stage1 boot loader should be installed on
the MBR of /dev/hda.

Comment 1 Peter Jones 2005-01-03 22:12:15 UTC
I think I've fixed this in in -6.
I don't have a windows box but I simulated the failure with 2 linux installs.

Note You need to log in before you can comment on or make changes to this bug.