LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   help dual-boot CentOS 5/ WinXP (https://www.linuxquestions.org/questions/linux-general-1/help-dual-boot-centos-5-winxp-616452/)

owa 01-26-2008 11:27 AM

help dual-boot CentOS 5/ WinXP
 
I installed WinXP on a spare hd by temporarily disconnecting hd0 and connecting hd1 in its place. It installed and booted, and then I was ready to switch back to CentOS 5 on hd0 and WinXP on hd1.
I reconnected hd0 as primary, /dev/hda, and hd1 as /dev/hdc. I added an entry to grub.conf to boot WinXP as follows;
# 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 (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hdc1
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS 5 (2.6.18-8.1.15.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.1.15.el5 ro root=/dev/hda3 rhgb quiet
initrd /initrd-2.6.18-8.1.15.el5.img

title CentOS 5 (2.6.22.5-al)
root (hd0,0)
kernel /vmlinuz-2.6.22.5-al ro root=/dev/hda3 rhgb quiet
initrd /initrd-2.6.22.5-al.img

title Windows XP Home Edition
rootnoverify (hd1,0)
chainloader +1

This much is correct, I think. Now, I'm pretty sure I need to edit the boot.ini file to account for the change from windows thinking it is mounted on hd0 to actually being mounted on hd1. This is the current boot.ini;
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect
C:\ = "Unidentified operating system on drive C."

I'm not sure how this needs to be modified. Also, I'm mystified by the last line, C:\ = "Unidentified operating system on drive C.". When the only hd connected was hd1 in the hd0 spot, WinXP booted and ran just fine, with no errors. So, I don't know if I need to be concerned about this or not. But, until I get the necessary editing done to at least get it to start to boot, I won't know about this last line.

So, first things first. Does anyone know how this boot.ini file should be modified? Thanks for any help.

owa

Lenard 01-26-2008 11:56 AM

With both drives attached and booted into CentOS (which is out of date by the way) as root type something along the lines of;

/sbin/grub-install --recheck /dev/hda1

And also see this: http://www.redhat.com/advice/tips/dualboot.html

Use fdisk -l (that is the lower case letter 'L' in the command) to verify before making any changes.

owa 01-29-2008 06:46 AM

Thanks, Lenard. Your link provided the answer.
owa


All times are GMT -5. The time now is 06:31 PM.