Execution of grub-install (hd0) failed

Bug #181812 reported by naftaleno
134
This bug affects 21 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

During installation after hardware detection (94%) when installing grub it gave a fatal error on grub-install.
I think it's because installation cannot install grub in the windows partition. I've changed hd0 to sda and sda1 on successive installations and the problem remains.

I have partman file but I don't know how to attach.

Tags: iso-testing
Revision history for this message
Mb (mb-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

Can you please update the title to be in English ? Thank you.

naftaleno (asmiron)
description: updated
Revision history for this message
pontus (pontus-hammarback) wrote : Re: Execution of grub-install (hd0) failed)

I have exactly same problem. Have WinXP on first partition (NTFS), then two linux partitions (one for swap) and all the rest as fat32.
Guess I need a new Master Boot Record on the first partition, should I create a new, small partition 'before' windows containing only MBR?
Do not want to go thru hassle of reinstalling winxp, running so smoothly now :P

Revision history for this message
pontus (pontus-hammarback) wrote :
Revision history for this message
Phoenix9 (fourphoenix) wrote :

Same problem here. Although my installations differ. I have XP on hd0 and a linux swap partition(hd5) for a prior and still used Linux Mint Daryna(Gnome). Daryna is installed on a completely different hd, and i haven't had any probs with loading either through grub.

Revision history for this message
Phoenix9 (fourphoenix) wrote :

and for the other attached file asper instructed during crash

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

Have any of you experienced this with a recent ISO? If not could you test the release candidate which is available at http://www.ubuntu.com/testing/ . Thanks in advance.

Changed in ubiquity:
status: New → Incomplete
Revision history for this message
Darragh Bailey (felix-compsoc) wrote :

I've encountered this problem with the released version of Ubuntu 8.04.

Specifically the line that appears as the error is: "grub-installer: The file /boot/grub/stage1 not read correctly."

This appears in both of the attached syslog files. Also the error appears even why trying to install grub manually.

I have attempted to install this both to the MBR and to the first partition, using the full install and also running grub separately post failed install. Note that in my case the hard drive involved is hd2 and that Windows resides on hd0.

Revision history for this message
Jayson Rowe (jayson.rowe) wrote :

Since it's been a very long time since any additional info was added to this bug, I'm just checking to see if this is still an issue, and find out what additional work should be done on this bug.

Revision history for this message
David880948 (david880948) wrote :

When I had this problem, I made the whole partitioning (XP [30 GB], swap [1 GB], Ubuntu [20 GB], data [about 45 GB]) with Windows XP setup. After I installed XP, I didn’t touch the other partitions and continued with the Ubuntu installation. Then I got the error message. I tried the installation of Ubuntu a second time, but I got this error message a second time.
Before I had this problem, I also made the whole partitioning with Windows XP setup, but I formatted the data-partition as ntfs on Windows XP. Because I wasn’t able to mount the ntfs-data-partition I reformatted it as ext2 at Ubuntu setup. Bizarrely I didn’t have any problems.
Now, I don’t have this problem anymore, because I only make the first partition (XP) with XP setup. I make the other partitions (swap, Ubuntu and data) with Ubuntu setup.

Revision history for this message
erniew (erniewjr) wrote :

I have the same problem. I am installing Ubuntu 8.10 from a live disk onto a USB drive. The hard drive is disconnected so there are no NTFS partitions to deal with.

Revision history for this message
TheJJJ (r-launchpad-jaeke-de) wrote :
Download full text (3.8 KiB)

same error here. Kubuntu 8.10 desktop amd 64

(the german version: (so that this thread can be found)
GRUB konnte nicht nach (hd0) installiert werden
Die Ausführung von >> grub install (hd0)<< ist fehlgeschlagen.
Dies ist ein schwerwiegender Fehler. )

I also tried to install Grub to (hd0,4) and (hd0,5) - same error.

/var/log/syslog:
info: installing grub on '(hd0)'
info: grub-install supports --no-floppy
info: running chroot /target grub-install --no-floppy "(hd0)"
you shouldn´t call /sbin/grub-install. Please call /usr/sbin/grub-intall instead!
probing devices to gueass BIOS drives. this may take a long time.
       // which does not, finished in the same second
Searching for GRUB installation directory ...
found: /boot/grub
The file /boot/grub/stage1 is not read correctly
error: Running 'grub-install --no-floppy "(hd0)"' failed.

I can´t find any grub-files inside the cd-root (nothing in /etc or /boot).

Inside the /target:

/boot/grub/ contains

default (empty file, just comment)
device.map (hd0) /dev/sda (hd1) /dev/sdb
e2fs_stage1_5
fat_stage1_5
jfs_stage1_5
Minix_stage1_5
reiserfs_stage1_5
stage1 (512 byte, binary, last line contains: root@ubuntu:/target/boot/ )
stage2 (121460 byte, 'cat stage2' causes beep and clearscreen)
xfs_stage1_5

/etc only contains:
grub.d (folder contains 20_memtest86+)

I wonder where the menu.lst is located!

fstab seems to be ok.

My system:
----------
1. Samsung 1,5TB sata
partitions:
primary 50gb ntfs
primary 50gb ntfs
primary 50gb (no fs)
log 50gb ext3 / target for kubuntu 8.10 Desktop AMD64
log 50gb (no fs)
log 50gb (no fs)
log 4gb linux swap
log 340gb ntfs
log 1000gb ntfs

2. Samsung 1,5TB sata
partitions:
pri 50gb (no fs)
log 4gb linux swap
400gb ntfs
1000gb ntfs

My mainboard (Biostar t-power n750 with nforce 750sli chipset) allows the configuration of the sata-drives with 'sata'

and 'ahci' modes, the ahci mode with the additional option 'Change the AHCI DID for Linux'
The Bios manual says:
This item appears only when SATA mode is set to Linux AHCI. Options: Disabled (Default) / Enabled
(not really sure what it means. DID seems to be the Device ID and I expect this to be the PCI-Vendor and Device-ID on
wich the suitable driver is chosen. I figured out that Windows does not boot with LINUX DID enabled, Knoppix accesses

the harddisks fine, with linux-did enabled or disabled.)
I tried all options (sata, ahci without and with Linux DID) but the error remains.

Before I did this partitioning, I had the same kubuntu64 installed on a primary partition with a less complex

paritioning, which I don´t exactly remember.

So I tried another attempt:
Installation of kubuntu to the third primiary partition. Manually choosen to install grub to (hd0,2)

Here I found following output: (translated from german to english)
The partition tables of the following devices have been changed:
SCSI5(0,0,0) (sda)
SCSI6(0,0,0) (sdb)
And the dialogue-box:
creating ext3 filesystem on partition 3 on scsi5
(Why scsi5 ??)

But it worked!
The Acronis-Bootmanager in MBR starts grub in sda3 without any problem.

I checked the stage1 file of the installed system, which differs from t...

Read more...

Revision history for this message
Melhisedek (melhisedek-s) wrote :

I have the exact same problem as users before me. Tried a few things, like manually create ext3 partition to install root to but still no go...
I have SATA drive with Vista 64 Ultimate installed

Revision history for this message
Graham (crazedmaniac-hotmail) wrote :

Latest 9.04 desktop 64bit iso, seems to be same problem. (Ran livecd, ran install, at end of install - after copying all files - quits with a fatal error installing grub on /dev/hd0 - rather disconcerting).

Not sure why is said /dev/hd0 instead of /dev/sd0

I have two small FAT32 (/dev/sda1) and NTFS /dev/sda2, and a large EXT3 /dev/sda3 partitions (plus a swap).

Revision history for this message
catvang (thaibinhson) wrote : Re: [Bug 181812] Re: Execution of grub-install (hd0) failed

I had encountered this problem and it took me 3 days to find out. It turn
out very simple, you should set up the root (/) as master partition. Maybe
you partition your drive manually

Revision history for this message
Melhisedek (melhisedek-s) wrote :

Can you explain how do I set root (/) as master partition? I have Windows 7 on same HD (another partition) and wonder if that may be the problem?

Revision history for this message
dhaval (dhavalsharma) wrote :

same problem with 9.x

Revision history for this message
imp (r-z) wrote :

same problem with 9.x but 8.x was no problem to install grub.

 Traceback (most recent call last):
  File "/usr/lib/ubiquity/bin/ubiquity", line 457, in <module>
    main(oem_config)
  File "/usr/lib/ubiquity/bin/ubiquity", line 442, in main
    install(args[0], query=options.query)
  File "/usr/lib/ubiquity/bin/ubiquity", line 245, in install
    ret = wizard.run()
  File "/usr/lib/ubiquity/ubiquity/frontend/kde_ui.py", line 440, in run
    self.progress_loop()
  File "/usr/lib/ubiquity/ubiquity/frontend/kde_ui.py", line 865, in progress_loop
    (ret, realtb))
RuntimeError: Install failed with exit code 1
Traceback (most recent call last):
  File "/usr/share/ubiquity/install.py", line 2444, in <module>
    install.run()
  File "/usr/share/ubiquity/install.py", line 459, in run
    self.configure_bootloader()
  File "/usr/share/ubiquity/install.py", line 1801, in configure_bootloader
    "GrubInstaller failed with code %d" % ret)
InstallStepError: GrubInstaller failed with code 1

Revision history for this message
imp (r-z) wrote :
  • syslog Edit (215.5 KiB, application/octet-stream)
Revision history for this message
imp (r-z) wrote :

Hi :-) Ubuntu 64bit (Mint), GRUB 1.97beta4
Have WinXP on first partition (NTFS) - mysterious GRUB problem is still here.

Revision history for this message
imp (r-z) wrote :
  • syslog Edit (196.5 KiB, application/octet-stream)
imp (r-z)
Changed in ubiquity (Ubuntu):
assignee: nobody → imp (r-z)
assignee: imp (r-z) → nobody
Revision history for this message
imp (r-z) wrote :

Traceback (most recent call last):
  File "/usr/lib/ubiquity/bin/ubiquity", line 457, in <module>
    main(oem_config)
  File "/usr/lib/ubiquity/bin/ubiquity", line 442, in main
    install(args[0], query=options.query)
  File "/usr/lib/ubiquity/bin/ubiquity", line 245, in install
    ret = wizard.run()
  File "/usr/lib/ubiquity/ubiquity/frontend/kde_ui.py", line 440, in run
    self.progress_loop()
  File "/usr/lib/ubiquity/ubiquity/frontend/kde_ui.py", line 865, in progress_loop
    (ret, realtb))
RuntimeError: Install failed with exit code 1
Traceback (most recent call last):
  File "/usr/share/ubiquity/install.py", line 2444, in <module>
    install.run()
  File "/usr/share/ubiquity/install.py", line 459, in run
    self.configure_bootloader()
  File "/usr/share/ubiquity/install.py", line 1801, in configure_bootloader
    "GrubInstaller failed with code %d" % ret)
InstallStepError: GrubInstaller failed with code 1

Revision history for this message
Din0savr (adin0savr) wrote :

Traceback (most recent call last):
  File "/usr/lib/ubiquity/bin/ubiquity", line 457, in <module>
    main(oem_config)
  File "/usr/lib/ubiquity/bin/ubiquity", line 442, in main
    install(args[0], query=options.query)
  File "/usr/lib/ubiquity/bin/ubiquity", line 245, in install
    ret = wizard.run()
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py", line 465, in run
    self.progress_loop()
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py", line 975, in progress_loop
    (ret, realtb))
RuntimeError: Install failed with exit code 1
Traceback (most recent call last):
  File "/usr/share/ubiquity/install.py", line 2453, in <module>
    install.run()
  File "/usr/share/ubiquity/install.py", line 459, in run
    self.configure_bootloader()
  File "/usr/share/ubiquity/install.py", line 1810, in configure_bootloader
    "GrubInstaller failed with code %d" % ret)
InstallStepError: GrubInstaller failed with code 1

Revision history for this message
Ludwin Janvier (lud-janvier) wrote :

Has been marked incomplete on 2008-04-2. Still happen with karmic (I just add a fresh dup). I don't see any reason to be still incomplete.

Changed in ubiquity (Ubuntu):
status: Incomplete → New
Revision history for this message
skybon (skybon-deactivatedaccount-deactivatedaccount) wrote :

What about Lucid and Maverick trunk?

Changed in ubiquity (Ubuntu):
status: New → Incomplete
Revision history for this message
imp (r-z) wrote :

Hi ;-) In Lucid everything works perfectly and I have no prolem with Grub installation.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ubiquity (Ubuntu) because there has been no activity for 60 days.]

Changed in ubiquity (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.