Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I had a RHEL system with / - 40 GB, /boot - 100 MB and /swap - 2 GB as primary partitions. The remaining space I used as secondary partition for /home - 189 GB.

I needed to install windows in this system and so, I deleted the secondary partition and installed Windows on that partition. Now, after the Windows installation, I am not able to view my primary partitions anymore. Basically, when the system boots up, I am not able to see the option for RHEL. I see only Windows 7.

The windows 7 size is 189 GB. So, I believe the primary partition is still intact. But I am not able to access it anymore. What should I do to view the RHEL OS?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The Windows Bootloader doesn't work with non-Windows Operating Systems that co-exist on the same system. When you installed Windows it overwrote the Linux bootloader (which was most likely grub) with it own and then only configured that bootloader for the one Windows install it could see (the new one).

Assuming the Windows installer didn't overwrite the actual partitions that contained RHEL, you just need to reinstall the Grub bootloader. Instructions from after the jump:

Boot from CentOS/RHEL installation disc (for example, CD #1 or the DVD).

For CentOS-4 or CentOS-5 type "linux rescue" at the "boot:" prompt. For CentOS/RHEL-6 pick "Rescue installed system" from the boot menu.

Mount all filesystems in read-write mode then change root to real root ('/') on your hard disk:

# chroot /mnt/sysimage

Re-install bootstrap code (GRUB). If you wish to re-install GRUB to the MBR on a SCSI or SATA disk (/dev/sda):

# grub-install /dev/sda

If you wish to re-install GRUB to the PBR of Partition #2 on a SCSI or SATA disk (/dev/sda2):

# grub-install /dev/sda2

If you wish to re-install GRUB to the MBR on an IDE disk (/dev/hda):

# grub-install /dev/hda

If you wish to re-install GRUB to the MBR on a HP Smart Array disk (/dev/c0d0):

# grub-install /dev/cciss/c0d0
share|improve this answer
1  
Alternatively, you can manually configure the Windows bootloader to boot the Linux partition but that's pretty much "hard mode" and only something you would do so that you could brag about having been able to do it. –  Joel Davis Mar 7 at 23:49
    
I want to get rid of windows but my friend needs it for some program execution. –  Ramesh Mar 7 at 23:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.