Cannot Dual-Boot Centos with Windows 7

Posted by Sleepy on 2012/2/17 1:16:14
So i've partitoned my drive to 2 partitions, 1 for Windows 7 and one for Centos (technically each install builds other partitions etc). I've installed windows 7 first, then installed CentOS on the second partition. After the install of CentOS and reboot, the grub loader doesn't load and system boots into Windows 7. If i use the BIOS boot menu, it shows i can boot into either "windows loader" or boot into hard drive. If i choose boot into hard drive, it would boot into CentOS grub loader, but windows 7 is not on the list. If i choose to boot into windows loader, it boots into Windows 7. This system has a uefi bios and a SSD (not sure if that's relavant). So, while going into centos, i've added the line for windows loader;

title Windows 7
root (hd0,2)
savedefault
makeactive
rootnoverify (hd0,2)
chainloader +1

I made the boot to (hd0,2) because windows 7 is in the first drive, and windows 7 makes a 100MB partition, so booting to the 2nd partition makes sense. However, when i get to the grub menu, it says:

BOOTMGR is missing
Press ctrl + alt + del to restart

I'm guessing it has something to do with the NTFS, but i'm not 100%, and i don't know where to go from here. Any ideas?

Re: Cannot Dual-Boot Centos with Windows 7

Posted by lightminer on 2012/2/17 2:42:55
Read through these:

http://www.ehow.com/info_12206074_bootmgr-missing-mean.html
http://www.ehow.com/how_8715158_reinstall-bootmgr.html
http://www.ehow.com/info_12147686_bootmgr-ubuntu-missing.html

and you should be covered.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by r_hartman on 2012/2/17 11:20:52
Welcome to the CentOS fora. New users should do the recommended reading as linked in my signature.

Quote:
Sleepy wrote:
I made the boot to (hd0,2) because windows 7 is in the first drive, and windows 7 makes a 100MB partition, so booting to the 2nd partition makes sense.

If I'm not mistaken that 100MB partition is your boot partition. Have you tried (hd0,1) at all, or even (hd0,0)?
Where does CentOS point to, in /etc/grub.conf?

Re: Cannot Dual-Boot Centos with Windows 7

Posted by Enzan on 2012/2/19 1:44:50
Working with Sleepy on this one.

When booting from hd(0,0) the message is:
Remove disks or other media.
Press any key to restart

When booting from hd(0,1) the message is:
Error 13: Invalid or unsupported executable format.

The one CentOS is booting off of is hd(0,3) in grub.conf.

For the fixing bootmgr, I don't believe that that is the issue, since we are able to use the EFI boot to get into Windows without any issues.

Could this issue have anything to do with using gpt instead of mbr?
Any other suggestings of things we could try?

Re: Cannot Dual-Boot Centos with Windows 7

Posted by pschaff on 2012/2/19 19:37:37
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

1. Try a google on efi OR uefi gpt mbr grub "enterprise linux 6" site:redhat.com

2. If more help is needed then please provide more information about your system by running "./getinfo.sh disk " as root, using a CentOS LiveCD/DVD or rescue boot from installation media, and showing us the output file.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by lightminer on 2012/2/20 6:30:44
Hmmm... This is actually interesting. Do we know if someone has successfully done an UEFI/SSD/GPT/Win7/CentOS6.2or1/GRUB install?

Re: Cannot Dual-Boot Centos with Windows 7

Posted by Enzan on 2012/2/25 20:56:45
Sorry about the late responses for everyone that's trying to help. Didn't really find anything from that search with redhat. Here's what the getinfo gave as output:

Information for disk problems.
== BEGIN uname -rmi ==
2.6.32-220.el6.x86_64 x86_64 x86_64
== END   uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
rpmforge-release-0.3.6-1.el5.rf.i386
centos-release-6-2.el6.centos.7.x86_64
== END   rpm -qa \*-release\* ==

== BEGIN cat /etc/redhat-release ==
CentOS release 6.2 (Final)
== END   cat /etc/redhat-release ==

== BEGIN getenforce ==
Enforcing
== END   getenforce ==

== BEGIN free -m ==
             total       used       free     shared    buffers     cached
Mem:         15925        792      15133          0         90        212
-/+ buffers/cache:        489      15436
Swap:        18111          0      18111
== END   free -m ==

== BEGIN cat /etc/fstab ==

#
# /etc/fstab
# Created by anaconda on Sat Feb 11 05:13:26 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_baskettcentos-lv_root /                       ext4    defaults        1 1
UUID=decf6856-c339-4679-85e2-2affea2fbe69 /boot                   ext4    defaults        1 2
/dev/mapper/vg_baskettcentos-lv_home /home                   ext4    defaults        1 2
/dev/mapper/vg_baskettcentos-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
== END   cat /etc/fstab ==

== BEGIN df -h ==
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_baskettcentos-lv_root
                       41G  2.2G   39G   6% /
tmpfs                 7.8G  284K  7.8G   1% /dev/shm
/dev/sda4             485M   38M  422M   9% /boot
/dev/mapper/vg_baskettcentos-lv_home
                       28G  219M   26G   1% /home
== END   df -h ==

== BEGIN fdisk -l ==

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/mapper/vg_baskettcentos-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_baskettcentos-lv_swap doesn't contain a valid partition table
Disk /dev/mapper/vg_baskettcentos-lv_home doesn't contain a valid partition table

Disk /dev/sda: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x549bb6d1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       29186   234431063+  ee  GPT
/dev/sda2   *           1           1           0    0  Empty
Partition 2 does not end on cylinder boundary.

Disk /dev/mapper/vg_baskettcentos-lv_root: 44.3 GB, 44333793280 bytes
255 heads, 63 sectors/track, 5389 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_baskettcentos-lv_swap: 19.0 GB, 18991808512 bytes
255 heads, 63 sectors/track, 2308 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_baskettcentos-lv_home: 29.7 GB, 29666312192 bytes
255 heads, 63 sectors/track, 3606 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

== END   fdisk -l ==

== BEGIN blkid ==
/dev/sda1: UUID="5C88-964D" TYPE="vfat" 
/dev/sda3: UUID="BE2A8D1F2A8CD635" TYPE="ntfs" 
/dev/sda4: UUID="decf6856-c339-4679-85e2-2affea2fbe69" TYPE="ext4" 
/dev/sda5: UUID="ptEFzN-XZ7M-uA69-tof4-Ms17-zgZt-WDxuVf" TYPE="LVM2_member" 
/dev/mapper/vg_baskettcentos-lv_root: LABEL="_CentOS-6.2-x86_" UUID="89a4feac-2620-4ecf-8279-6437bb391602" TYPE="ext4" 
/dev/mapper/vg_baskettcentos-lv_swap: UUID="63038524-1b31-4312-a7a3-bdab4a4e912c" TYPE="swap" 
/dev/mapper/vg_baskettcentos-lv_home: UUID="65c8d331-1777-422c-a4bd-29d9b7626050" TYPE="ext4" 
== END   blkid ==

== BEGIN cat /proc/mdstat ==
Personalities : 
unused devices: <none>
== END   cat /proc/mdstat ==

== BEGIN pvs ==
  PV         VG               Fmt  Attr PSize  PFree
  /dev/sda5  vg_baskettcentos lvm2 a--  86.61g    0 
== END   pvs ==

== BEGIN vgs ==
  VG               #PV #LV #SN Attr   VSize  VFree
  vg_baskettcentos   1   3   0 wz--n- 86.61g    0 
== END   vgs ==

== BEGIN lvs ==
  LV      VG               Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  lv_home vg_baskettcentos -wi-ao 27.63g                                      
  lv_root vg_baskettcentos -wi-ao 41.29g                                      
  lv_swap vg_baskettcentos -wi-ao 17.69g                                      
== END   lvs ==



Re: Cannot Dual-Boot Centos with Windows 7

Posted by pschaff on 2012/2/25 21:24:21
Well, that's confusing. Please explain what you were running to get that script output, and the current state of the system.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by Enzan on 2012/2/25 21:51:11
I was logged into root and ran the script using "./getinfo.sh disk". The system is running on one a Sandy Bridge-E platform with 16GB memory. It's got Win 7 installed first, then we installed CentOS afterwards. The system hasn't changed since we've installed CentOS. Only thing we've done is change the grub configuration file to add an entry.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by pschaff on 2012/2/25 21:59:58
OK - Now I see my confusion. I thought CentOS was not bootable. Please show the current contents of /boot/grub/grub.conf

Re: Cannot Dual-Boot Centos with Windows 7

Posted by Enzan on 2012/2/25 22:07:16
Here are the contents of grub.conf.

# 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,3)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_baskettcentos-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,3)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-220.el6.x86_64)
	root (hd0,3)
	kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_baskettcentos-lv_root rd_NO_LUKS  
KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_LVM_LV=vg_baskettcentos/lv_root rd_NO_MD quiet 
rd_LVM_LV=vg_baskettcentos/lv_swap rhgb crashkernel=auto SYSFONT=latarcyrheb-sun16 rd_NO_DM
	initrd /initramfs-2.6.32-220.el6.x86_64.img

title Windows 7
	insmod part_msdos
	insmod ntfs
	root (hd0,0)
	savedefault
	makeactive
	rootnoverify (hd0,0)
	chainloader +1


Edited so it doesn't overflow

Re: Cannot Dual-Boot Centos with Windows 7

Posted by pschaff on 2012/2/25 22:24:45
AFAIKT insmod is a GRUB2 command. I'd try
title Windows 7
	rootnoverify (hd0,2)
	chainloader +1
title Windows 7 Alt0
	rootnoverify (hd0,0)
	chainloader +1
title Windows 7 Alt1
	rootnoverify (hd0,1)
	chainloader +1

See what works.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by lightminer on 2012/2/25 22:39:20
No makeactive in the middle there?

Re: Cannot Dual-Boot Centos with Windows 7

Posted by pschaff on 2012/2/25 22:42:02
Not needed for my dual-boots with Windows 7 (which I hate to use, but family members consider gotta' have).

Re: Cannot Dual-Boot Centos with Windows 7

Posted by Enzan on 2012/2/25 22:48:23
Quote:

Enzan wrote:
Working with Sleepy on this one.

When booting from hd(0,0) the message is:
Remove disks or other media.
Press any key to restart

When booting from hd(0,1) the message is:
Error 13: Invalid or unsupported executable format.

The one CentOS is booting off of is hd(0,3) in grub.conf.

For the fixing bootmgr, I don't believe that that is the issue, since we are able to use the EFI boot to get into Windows without any issues.

Could this issue have anything to do with using gpt instead of mbr?
Any other suggestings of things we could try?


The results were the same as in the previous post.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by pschaff on 2012/2/26 14:54:39
The previous post did not include (hd0,2).

Re: Cannot Dual-Boot Centos with Windows 7

Posted by Enzan on 2012/2/26 21:28:56
That was in the initial post about the problem, it was bootmgr not found.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by vonskippy on 2012/2/26 21:46:11
Seems like a lot of work debugging a obsolete method of running more then one OS.

Install Windows 7.

Install Virtual Box.

Install CentOS inside a VM.

...

Profit

So much better having both OS's available at the same time, then waiting for one OS to shutdown and then waiting again for the other OS to startup - usually only to find out that you left something you needed in the other OS, so you get the repeat the process several times over.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by pschaff on 2012/2/26 21:47:36
Quote:

Enzan wrote:
That was in the initial post about the problem, it was bootmgr not found.

Yes, but not in the previous post. Was hoping the change to grub.conf would make a difference,. but I guess not. So, can you still boot Windows via the UEFI bootloader?

Quote:

vonskippy wrote:
Seems like a lot of work debugging a obsolete method of running more then one OS.

Install Windows 7.

Install Virtual Box.

Install CentOS inside a VM.

I would install CentOS on the bare metal, but do agree in concept.

Re: Cannot Dual-Boot Centos with Windows 7

Posted by vonskippy on 2012/2/26 22:29:23
Quote:

pschaff wrote:
I would install CentOS on the bare metal, but do agree in concept.

Since Windows 7 has a "heavier" graphics foot print (i.e. Aero takes more resources) and CentOS has a "lighter" graphics foot print (i.e. Gnome takes less resources), Windows 7 is more suited for the Host OS and CentOS for the Guest OS. With that order, you get the best of both OS's without giving anything up for running them in a VM environment.

This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=55&topic_id=35853