Unable to get dual boot working (Windows 7 & RHEL5)
Hello
I'm pretty new to linux and was attempting to setup dual boot with Windows 7 (already installed) and RHEL5.8. I first searched within the forums, but did not come across a thread that matched my exact situation. If anyone has any ideas after reading what I've posted below about how to help me to boot up in Windows 7 again I would be greatly appreciative. Or, if maybe I've overlooked a thread that has what I'm looking for maybe someone could point me in the right direction. I wanted to install both on the same internal harddrive and used the following steps that I found here to shrink the Windows partition to make room for RHEL5... I booted up using a CentOS Live DVD and did the following: Resized the existing Windows parition to 132GB out of a total of 250GB Code:
[root@livecd ~]# ntfsresize -b --size 135168M /dev/sda1 Code:
[root@livecd ~]# fdisk /dev/sda At this point I believe I should have been able to reboot and still boot into Windows 7, but I could not. I went ahead and installed RHEL5.8. During the installation it mentioned that I could create multiple boot options, but it didn't find anything for Windows. I'm able to boot into RHEL5 and can still see the Windows partition there. Code:
[root@lab1 grub]# fdisk -l I added the Windows 7... Code:
[root@lab1 grub]# cat menu.lst Code:
Error 13: Invalid or unsupported executable format. Thanks for any help. |
I've not done resizing in the manner suggested at the site you linked to. Your windows entry looks OK as it is on sda1 and your Grub entry for windows points to it. More information on your partitions and boot files would help. Boot Red Hat and go to the site below, read the instructions then download and run the bootinfoscript. It will produce a results.txt file which you can post here.
http://sourceforge.net/projects/bootinfoscript/ |
Thanks for your reply, yancek. This is a computer I have at work and I'm working from home today, so I will be sure to run the bootinfoscript and post output here on Monday morning at the latest.
|
OK, I just ran the bootinfoscript. Here is the output:
Code:
Boot Info Script 0.61 [1 April 2012] |
One other bit of information I failed to mention before that I just thought of...after running the following commands I mentioned in my original post:
Code:
Command (m for help): a Code:
|
Your results.txt output shows Red Hat Grub Legacy in the mbr and since you can boot it, that is not part of the problem. The grub.conf entry for windows is correct pointing to the first drive, first partition. You indicate in an earlier post that you can still see the windows files so you might have a problem with the boot files. You could try reinstalling windows boot file to the mbr of the disk. These files are usually not on a Recovery Disk so you will probably need a full installation CD/DVD. You would need to look for the Repair option on the CD/DVD. You would then need to reinstall Grub to the mbr to boot both windows and Red Hat.
There is some information missing from your results.txt output. Usually it shows boot files for windows also and there is nothing in the output. It also shows uuid and /etc/fstab info which is not in your output. If the windows boot files are actually missing for some reason that would obviously be a problem. You could check from Red Hat to see if your windows boot files are where they belong. Windows 7 has its own software for resizing. I resized a windows 7 partition to install Linux using GParted when I first bought the computer three years ago. I was unable to boot windows but had made a Recovery disk for windows and was able to reset to factory settings. I had no data as it was not a problem. I have read numerous posts of people who have successfully used GParted. I don't know why in the tutorial you referred to they suggest you delete the partition and re-create it. Generally, one would use the 'w' command in fdisk to write the change and reboot. Your windows boot files may be corrupt?? If you have an installation CD/DVD it should be an easy fix. If not, I would search for repairing windows 7 bootloader. You should find a lot of sites. |
Thank you! I downloaded a windows install iso today during some downtime at work and will burn it to dvd tomorrow and give some of this a try. I will say, though, that I placed a windows rescue disk in, booted from it and it did not recognize a windows operating system. I'm really hoping the procedures I used did not wipe out my windows drive, but I guess I will just re-install if so. I'll update this thread with attempts to rebuild windows MBR tomorrow.
|
I certainly wouldn't feel warm and fuzzy about deleting and re-creating the partition in fdisk. A much better option, as suggested in that link, is to use Windows's partitioning tools to shrink its own partition. Once you have some available space on the drive, any Linux distro can install to it without a problem.
I can almost guarantee you that your problems are due to the way in which the Windows partition resizing was done ("almost", because I haven't actually tried it myself, but it definitely looks a bit unsettling). Can you at least mount the Windows partition from within RHEL? If nothing else, you can back up the necessary files to an external drive that way and then use the Windows DVD to re-install. |
In retrospect I agree 100% that it would have been wiser to have used windows partitioning tools. Ah well. I have been trying to see if I could mount the Windows partition (/dev/sda1)to see if any files remain, but I'm getting the following:
Code:
# mount /dev/sda1 /mnt Code:
# uname -r |
You just need to install the NTFS packages in RHEL. I think it's called ntfs-3g, but you can use "yum list | grep ntfs" to see for sure. Once you find the package name, "yum install package" will install it. Then, as long as the partition isn't corrupt, you should be able to mount it just like you tried above.
|
Quote:
|
Thanks, guys. Installed the ntfs-3g package and I might be in trouble...
Code:
# mount -t ntfs /dev/sda1 If that is the case and I need to reinstall Windows, do any of you have a good recommended thread to look at or set of steps to follow for installing Windows on a computer with existing RedHat OS? Or would it be easier to to just start over, install Windows and then reinstall RedHat using preferred procedures? Thanks again for all the help. |
You would need to make certain you install windows to sda1. It will overwrite the mbr and you will then need to reinstall Grub to boot both.
You might be able to use EasyBCD from windows but I don't think it is a free download any longer. Might be easier to reinstall both, windows first. |
Finally got a chance to try reinstalling Windows7 and thankfully there was an option to install only to sda1. I did this and then reinstalled linux and everything is working great.
Thanks again for the help everyone. |
All times are GMT -5. The time now is 10:08 AM. |