This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 143725 - grub-install fails to install stage1 on MBR
grub-install fails to install stage1 on MBR
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-25 10:43 EST by Kazuyuki Maejima
Modified: 2007-11-30 17:10 EST (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Kazuyuki Maejima 2004-12-25 10:43:57 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020
Firefox/0.10.1

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):
grub-0.95-5

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 17:12:15 EST
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.