LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux on one HDD and Win XP on another HDD (https://www.linuxquestions.org/questions/linux-newbie-8/linux-on-one-hdd-and-win-xp-on-another-hdd-584335/)

vikas027 09-13-2007 12:52 AM

Linux on one HDD and Win XP on another HDD
 
Hi all,

I am new to Linux machines. I have three PATA HDD in my system
1)40 GB Seagate
2)80 GB
3)40 GB Samsung

I have Win XP installed on the 80 GB hard drive. I have just installed RHEL 5 on 40 GB Seagate Hard drive
AND now I can not boot my Win XP. Although RHEL 5 is working fine. I do get an option to choose the boot preference BUT when I choose other (i.e. for windows) it gives this error.

-----------------------------------

Booting 'Other'

rootnoverify (hd2,0)
chainloader +1

Remove disks or other media
Press any key to restart

-----------------------------------

And when I press any key, GRUB comes in the last i.e.

-----------------------------------

Booting 'Other'

rootnoverify (hd2,0)
chainloader +1

Remove disks or other media
Press any key to restart

GRUB

-----------------------------------



Pls help me out !!! I have installed both the OS on the same HDD many times, it never gave such errors.

Thanks & Regards,
Vikas

Junior Hacker 09-13-2007 01:38 AM

One thing you have to realize is that Windows expects to be on the first drive set to boot in the bios. If it is not, you have to edit /boot/grub/menu.lst in RHEL 5 to map Windows to fool it into thinking it's on the first disk.
According to the errors you posted, it appears Windows is on the third drive. How about you post the contents of the file /boot/grub/menu.lst and someone will show you how to edit the file so Windows can boot. And also post the output of this command as root --> fdisk -l
And mention whether the other 40GB drive has an OS installed or what?

vikas027 09-13-2007 01:52 AM

hi,
Thanks for the reply.

Well there is no other OS installed in the other 40 GB HDD i.e. Samsung one.

Also fdisk isnt working while man page for fdisk exist. No idea why this is so.

These are the contents of menu.lst

[root@localhost grub]# cat menu.lst
# 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,1)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hdb
default=0
timeout=5
splashimage=(hd2,1)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd2,1)
kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=256M@16M
initrd /initrd-2.6.18-8.el5.img
title Other
rootnoverify (hd2,0)
chainloader +1


Thanks,
Vikas

vikas027 09-13-2007 02:04 AM

Also is it now possible to remove the drive with Linux OS, and boot only Win XP, as it was before. I tried removing the Linuz drive, BUT didnt work.

I am thinking to have just Linux on my laptop. That would best suit me.

Pls help.

Nylex 09-13-2007 02:06 AM

You'll need to reinstall Windows' bootloader.

Junior Hacker 09-13-2007 02:06 AM

Try changing the last three to look like this:
Code:

title Windows
  rootnoverify (hd2,0)
  map (hd2) (hd0)
  map (hd0) (hd2)
  chainloader +1
  makeactive
  boot

If you want the system to automatically boot Windows if you don't make a selection, change the "default=0" to "default=1". If you want it to boot within 2 seconds (or whatever) instead of 5 seconds when you don't make a selection, change "timeout=5" to "timeout=2".

Junior Hacker 09-13-2007 02:11 AM

If you want to remove the Linux and only have Windows, you'll have to follow the other poster's suggestion, you'll need the Windows XP CD, instructions follow:
Code:

To restore Windows XP MBR

1: Boot with Windows XP CD in the drive
2: Hit any key to boot from the CD
3: Wait for installer to load drivers in memory
4: When asked to press enter to install, type: r
5: When asked which Windows installation would you like to log onto,
if there is only one, type: 1  (and hit enter)
6: When asked to type the Administrator password, I hit enter without
typing anything which will be the administrator password for most OEM
Windows installations, (No password). If you installed Windows XP
yourself and added an administrator password, type this password.
7: At the prompt type: fixmbr  (and hit enter)
-**CAUTION** and a warning appear
8: When asked "Are you sure you want to write a new MBR?:" type: y
-The new master boot record has been successfully written.
9: When the prompt returns, type: exit
-The computer re-boots and Windows kernel is loaded.

If you don't have a Windows XP CD, I believe the UBCD4win CD can help you, google it.
EDIT: The Windows drive will have to be the first one set to boot in the bios (setup).

jacobselvin 09-13-2007 02:12 AM

You should be root to run fdisk. If it is still not running try to execute it as /sbin/fdisk -l.

vikas027 09-13-2007 02:16 AM

I have made the changes, Trying now !!



Quote:

Originally Posted by Junior Hacker (Post 2890391)
Try changing the last three to look like this:
Code:

title Windows
  rootnoverify (hd2,0)
  map (hd2) (hd0)
  map (hd0) (hd2)
  chainloader +1
  makeactive
  boot

If you want the system to automatically boot Windows if you don't make a selection, change the "default=0" to "default=1". If you want it to boot within 2 seconds (or whatever) instead of 5 seconds when you don't make a selection, change "timeout=5" to "timeout=2".


vikas027 09-13-2007 05:18 AM

hi,
thanks for the advice, i just did exactly this. thnk God my windows is back.

Thanks to all for your time and suggestions.
I will install RHEL 5 on my Laptop only.

Thanks & Regards,
Vikas


Quote:

Originally Posted by Junior Hacker (Post 2890397)
If you want to remove the Linux and only have Windows, you'll have to follow the other poster's suggestion, you'll need the Windows XP CD, instructions follow:
Code:

To restore Windows XP MBR

1: Boot with Windows XP CD in the drive
2: Hit any key to boot from the CD
3: Wait for installer to load drivers in memory
4: When asked to press enter to install, type: r
5: When asked which Windows installation would you like to log onto,
if there is only one, type: 1  (and hit enter)
6: When asked to type the Administrator password, I hit enter without
typing anything which will be the administrator password for most OEM
Windows installations, (No password). If you installed Windows XP
yourself and added an administrator password, type this password.
7: At the prompt type: fixmbr  (and hit enter)
-**CAUTION** and a warning appear
8: When asked "Are you sure you want to write a new MBR?:" type: y
-The new master boot record has been successfully written.
9: When the prompt returns, type: exit
-The computer re-boots and Windows kernel is loaded.

If you don't have a Windows XP CD, I believe the UBCD4win CD can help you, google it.
EDIT: The Windows drive will have to be the first one set to boot in the bios (setup).


Junior Hacker 09-13-2007 10:07 AM

I didn't think you would have gotten the dual boot to work. Because the errors you posted showed both Red Hat and Windows on the same drive (hd2). That is why the output of the command fdisk -l was important, to see exactly which drive Windows was on. As mentioned earlier, you need to run that command as root. I never used Red Hat, but others have said in the past that you need to run command: su- to swith user to root in RH compared to just su in most other Linux.


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