Reinstalling GRUB on RH Enterprise WS 4 in dual boot system
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Reinstalling GRUB on RH Enterprise WS 4 in dual boot system
I have a two HD dual boot system with Widows XP and RH Enterprise WS 4. I had to reinstall Windows XP and lost GRUB. I am not able to fix the problem using the following procedure:
1. I boot using the RedHat DVD
2. At the command line I type: linux rescue
3. I answer a few questions and get to command line again
4. Next, I type the following command at the following prompt:
~/bin/sh-3.00# chroot /mnt/sysimage
5. Then, I try to restore the boot loader by typing at the following prompt:
sh-3.00# grub-install /dev/hd0
(I have also tried grub-install /dev/hda)
However, I get the following error:
/dev/hd0: Not found or not a block device
(or /dev/hda: Not found or not a block device)
grub wants to know where the file /boot/ <-- is so it can load the file grub in it.
that would be /dev/hda1 then the boot loader will be /dev/hda. try running grubconfig
grub install is part of that program. grubconfig simple install /dev/hda1 put it on the mbr /dev/hda or
down load super grub do a manual linux boot and then your in your system and reinstall it from there.
good luck.
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Mounting failed:
mount: fs type ntfs not supported by kernel
/root/Desktop/boot_info_script032.sh: line 1114: ntfs-3g: command not found
/dev/VolGroup00/LogVol00 on / type ext3 (rw,defaults)
/dev/sdb1 on /boot type ext3 (rw,defaults)
none on /proc type proc (rw,defaults)
none on /sys type sysfs (rw,defaults)
# 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 (hd2,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd2,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$rZNJWR42$iNXAMFlFyXUroQZX89mZ10
title Red Hat Enterprise Linux WS (2.6.9-78.0.17.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.17.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.17.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.17.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.17.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.17.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.13.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.13.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.13.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.13.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.13.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.13.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.8.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.8.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.8.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.8.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.8.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.8.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.5.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.5.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.5.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.5.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.5.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.5.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.1.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.1.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.1.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.1.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.1.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.1.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-5.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-5.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-5.ELsmp.img
title Red Hat Enterprise Linux WS-up (2.6.9-5.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-5.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-5.EL.img
title Other
rootnoverify (hd0,0)
chainloader +1
=================== sdb1: Location of files loaded by Grub: ===================
As soon as you get the loading 1.5" message, hit the <Esc> key - see if you get a menu.
If so, follow the messages at the bottom to edit an entry, and change the "root (hd2,0)" to "root (hd1,0)" and see if it boots. This is a temporary change only.
Not sure if this helps, but before my c drive took a dump and I had to reinstall Windows XP, I had two other HDs that I used for backup and that were formatted for Windows.
I reconnected both of these HDs to the computer, installed a new MBR from the widows xp cd, and again ran bootinfo.
Here is what I got, does this help?
============================= Boot Info Summary: ==============================
=> Windows is installed in the MBR of /dev/sda
=> No known boot loader is installed in the MBR of /dev/sdb
=> Windows is installed in the MBR of /dev/sdc
=> Windows is installed in the MBR of /dev/sdd
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Mounting failed:
mount: fs type ntfs not supported by kernel
/root/Desktop/boot_info_script032.sh: line 1114: ntfs-3g: command not found
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Mounting failed:
mount: fs type ntfs not supported by kernel
/root/Desktop/boot_info_script032.sh: line 1114: ntfs-3g: command not found
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Mounting failed:
mount: fs type ntfs not supported by kernel
/root/Desktop/boot_info_script032.sh: line 1114: ntfs-3g: command not found
/dev/VolGroup00/LogVol00 on / type ext3 (rw,defaults)
/dev/sdb1 on /boot type ext3 (rw,defaults)
none on /proc type proc (rw,defaults)
none on /sys type sysfs (rw,defaults)
# 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 (hd2,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd2,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$rZNJWR42$iNXAMFlFyXUroQZX89mZ10
title Red Hat Enterprise Linux WS (2.6.9-78.0.17.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.17.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.17.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.17.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.17.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.17.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.13.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.13.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.13.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.13.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.13.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.13.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.8.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.8.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.8.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.8.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.8.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.8.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.5.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.5.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.5.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.5.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.5.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.5.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.1.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.1.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.1.EL.img
title Red Hat Enterprise Linux WS (2.6.9-78.0.1.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-78.0.1.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-78.0.1.ELsmp.img
title Red Hat Enterprise Linux WS (2.6.9-5.ELsmp)
root (hd2,0)
kernel /vmlinuz-2.6.9-5.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-5.ELsmp.img
title Red Hat Enterprise Linux WS-up (2.6.9-5.EL)
root (hd2,0)
kernel /vmlinuz-2.6.9-5.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-5.EL.img
title Other
rootnoverify (hd0,0)
chainloader +1
=================== sdb1: Location of files loaded by Grub: ===================
Your last post shows you have four hard drives. Three of these have windows in their master boot record (sda, sdc and sdd). The fourth drive (sdb) does not have any bootloader in the master boot record. So that means you don't have Grub installed. You will either have to modify your windows boot loader file or re-install Grub to (hd1)
Log in as root.
Enter grub at prompt in terminal so you get the grub prompt (grub>)
Here you type:
root (hd1,0)
setup (hd1)
quit
This should put the Grub stage1 file in the master boot record of sdb pointing to the remaining Grub files on (hd1,0) or sdb1. You will then need to set sdb as first boot priority. You may need to manually edit the menu.lst file to put entries for windows.
did you realize it is looking for /boot/vmlinuz-2.6.9-5.EL .
Quote:
title Linux sdb1 ----------<-change to your hard drive
root (hd1,0) ---------<-change to your hard drive (hd0,0)=sda1 or hda1 (hd1,0)=sdb1
configfile /boot/grub/menu.lst
Now reboot your machine and select Linux sdb1 grub will now go to that hardware search for
/boot/grub/menu.lst file read it and load it you will see a new selection. select your system it will be on top as default. all is well. if you moved any of your hard drives or changed there priority in bios then you will need to put things back to the way you installed your systems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.