• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Grub mis-config

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

ihrsetrdr

Señor Senior Member
Joined
May 17, 2005
Location
High Desert, Calif.
I replaced Debian squeeze on my daily box with Centos 6.2; Win XP is on another HDD but does not boot. Centos 6.2 is using grub 0.97 and the grub.conf file looks like this:

Code:
GNU nano 2.0.9          File: /boot/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 do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-220.7.1.el6.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.32-220.7.1.el6.x86_64 ro root=UUID=b8cc1f31-11$
        initrd /boot/initramfs-2.6.32-220.7.1.el6.x86_64.img
title CentOS (2.6.32-220.el6.x86_64)
        root (hd0,0)
title Windows
	rootnoverify (hd1,0)
        makeactive
        chainloader +1

During install I chose the option to install Grub to /dev/sda(the linux hdd) but did not check the box(thinking it un-necessary) for /dev/sdb(the Windows hdd); I'm thinking that maybe I should have....?
 
During install I chose the option to install Grub to /dev/sda(the linux hdd) but did not check the box(thinking it un-necessary) for /dev/sdb(the Windows hdd); I'm thinking that maybe I should have....?

No, on the Win-HDD you don't need and don't want grub. Your problem is not related to that. Maybe you have a USB disk attached and bios counts differently than grub, so your Win disk gets number 2 or 3 (aka hd2,0...)? Have you tried that? Maybe your Windows is not on your first primary partition as well, and so it could be hd1,1 or even hd2,1, etc. What is the exact error you get? Does Windows boot process start or not?

Maybe you need to repair the Windows boot sector with a win install CD? (Unplug Linux disk first)
 
Grub expects to see the Linux drive first and the Windows drive second. If you put them in that order in the BIOS, it should work.
 
No, on the Win-HDD you don't need and don't want grub. Your problem is not related to that. Maybe you have a USB disk attached and bios counts differently than grub, so your Win disk gets number 2 or 3 (aka hd2,0...)? Have you tried that? Maybe your Windows is not on your first primary partition as well, and so it could be hd1,1 or even hd2,1, etc. What is the exact error you get? Does Windows boot process start or not?

Maybe you need to repair the Windows boot sector with a win install CD? (Unplug Linux disk first)
No USB attached, the Linux drive is first boot in the BIOS.
The error is simply a blinking curser, after choosing Windows in the grub menu; Windows does not attempt to boot at all.
 
No USB attached, the Linux drive is first boot in the BIOS.
The error is simply a blinking curser, after choosing Windows in the grub menu; Windows does not attempt to boot at all.

Looks like Grub cannot find a windows boot loader for chainloading or is chainloading to nirvana.

Can you boot to WinXP without grub using only the Windows disk? (Unplug the Linux one, set Bios to boot from Win HD). If this doesn't work either, then your Windows boot loader ist probably damaged.

Using a WinXP install CD you can repair it using the recovery console (command line) using fixboox and fixmbr (leave Linux HD unplugged for this).

See for details:

http://tips4pc.com/articles/computer%20troubleshooting/how_to_repair_a_damaged_boot_sec.htm
 
I did use the Recovery console a bit ago, did the following:

Code:
copy d:\i386\ntldr c:\

copy d:\i386\ntdetect.com c:\

however, choosing "Windows" in the grub menu again just yields a blinking curser.

I just now booted to the xp disc again, thinking that I'd do an"installation repair", but this xp home edition disc doesn't have the repair feature.

Edit:

I unplugged the Linux hard-drive and am going to reattempt the copying of the two ntldr files, and anticipate doing a repair install of Centos.
 
Last edited:
You might be having the issue of windows not being on the "primary" drive. Sometimes windows doesn't like that.

http://www.gentoo-wiki.info/HOWTO_Dual_boot#Multi_Drive_Install

Note: It may be necassary in some instances to trick your Windows OS into believing it is the primary, if it is not on the first hard drive (hd0). To do so, use the following in your grub.conf file:

title Windows XP
#:1 <-- type: 0 => linux, 1 => windows, 2 => other
rootnoverify (hd1,0) #Windows is secondary drive, Linux is primary
makeactive
chainloader +1
map (hd0) (hd1) # Tell the first hard drive to pretend to be the second
map (hd1) (hd0) # Tell the second hard drive to pretend to be the first

You can avoid the mapping trouble by installing your Windows operating system on the first hard drive seen by the BIOS.
 
An installation repair operation was unsuccessful, decided that a Windows reinstall was inevitable...deed done. :shrug: Used Debian Live CD to quickly get Linux back up on rig.

You might be having the issue of windows not being on the "primary" drive. Sometimes windows doesn't like that.

http://www.gentoo-wiki.info/HOWTO_Dual_boot#Multi_Drive_Install

On this machine setting the XP hdd as first boot would render the Linux hdd in-accessible; however, setting the Linux drive enabled both to boot as expected.
 
Back