LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-11-2014, 06:27 AM   #1
Mridulj
Member
 
Registered: Jan 2008
Posts: 49

Rep: Reputation: 15
CenTOS 7 dual boot with windows


I have installed centos7 in my laptop but after installing i cannot boot into my windows OS .
Even there is no grub entry for it but my windows partitions are intake .
 
Old 08-12-2014, 07:36 AM   #2
azhar_mz
LQ Newbie
 
Registered: Aug 2014
Posts: 3

Rep: Reputation: Disabled
There should be some option you've missed out while installing Centos7. The options are i. Would you like Centos7 to find otherOSes on this computer? ii. Do you want to direct boot or wait for 10seconds?. Some distro like Puppy linux will only install Grub after finish the installation. sometimes it install auto magically but sometimes not. You have to go on to menu and click Install bootloader manually and edit grub of your /boot folder.
Fortunately your windows is still *INTACT* boot to your new Centos7 and reinstall the bootloader. Hope this help....
 
Old 08-12-2014, 05:33 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,077

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
I installed CentOS a few months ago and it created a boot entry for windows 7 so I'm not sure what happened. You can open the /boot/grub/grub.conf file as root user and add a chainload entry such as the one below. You would need to know the partition on which the windows 7 system/boot files are:

Quote:
title windows
root (hd0,0)
makeactive
chainloader +1
You may need to change the root entry above as it points to the first partition, first drive.
 
Old 08-14-2014, 12:33 PM   #4
Mridulj
Member
 
Registered: Jan 2008
Posts: 49

Original Poster
Rep: Reputation: 15
@ azhar
well i could not find any options like you mentioned while installing CentOs 7 .
Never used Puppy Linux .
 
Old 08-14-2014, 12:37 PM   #5
Mridulj
Member
 
Registered: Jan 2008
Posts: 49

Original Poster
Rep: Reputation: 15
@ Yancek
The grub file entry that you have mentioned exists for CentOs 5.5 or below while dual booting .
But for Centos 6 or Centos 7 , the grub file entries are quite different .
I would definitely post the grub.conf for my Centos 7 system to have a look .
 
Old 08-14-2014, 02:54 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,077

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
I don't have CentOS 7 but the entry below for CentOS 6.5 boots windows 7 on sda1:

Quote:
title Windows 7
rootnoverify (hd0,0)
chainloader +1
 
Old 08-14-2014, 07:00 PM   #7
wchouser3
Member
 
Registered: May 2013
Location: Fort Wayne, Indiana
Distribution: Arch Linux
Posts: 74

Rep: Reputation: Disabled
make sure you have os-prober installed, then run grub-mkconfig
 
Old 08-14-2014, 10:47 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,502

Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
PLEASE!!!!
do not double post !
post the same question IN ONLY ONE PLACE !
 
Old 08-16-2014, 05:08 AM   #9
Hopsahejsa
LQ Newbie
 
Registered: Aug 2014
Distribution: CentOS 7
Posts: 21

Rep: Reputation: 0
Dear all,

I have a similar problem. I had Windows 7 and Centos 6.5 installed on same disk /dev/sda1 and /dev/sda2 and then I installed Centos 7 instead.
Since then I cant find Windows entry in the Grub.

I am pretty sure that my Windows partition is OK as I can boot there directly from GRUB.
But after trying to use all kind of solution found on the net I still cant see any entry.

First I tried edit 40_custom script adding:

menuentry "Windows 7" {
insmod part_gpt
insmod ntfs
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root 387752987851CCKE
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}


+ grub2-mkconfig -o /boot/grub2/grub2.cfg of course but it did not add any entry.

Then I tried to create 15_Win script adding:

#! /bin/sh -e
echo "Adding Windows" >&2
cat << EOF
menuentry "Windows" {
set root=(hd0,1)
chainloader +1
}
EOF

Made it executable and again run grub2-mkconfig -o /boot/grub2/grub2.cfg .

Both of this solutions seem to add some entries to the Grub but they are not creating any real menu entry after booting the system.
"grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2" show only:

CentOS Linux, with Linux 3.10.0-123.el7.x86_64
CentOS Linux, with Linux 0-rescue-56a5525b6585421c9014090c1b0b09ac

Do you please have any idea how to fix this?
Thanks a lot!

Edit
 
Old 08-16-2014, 08:47 AM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,077

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
Quote:
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
That shows a uefi entry for windows meaning you should be using GPT partitioning and uefi for CentOS??
 
Old 08-16-2014, 09:34 AM   #11
Hopsahejsa
LQ Newbie
 
Registered: Aug 2014
Distribution: CentOS 7
Posts: 21

Rep: Reputation: 0
Hi yancek, thanks for your reply.
I do not understand that much to be perfectly honest. Only found that the UUID solution is more reliable.
Never played much with grub and bootloaders. But it does not matter now the second option is not working either. Not adding any entry.

But still the problem remains the same. I cannot find any Windows entry at booting. It is not that it is not working it is not even offering the entry.
I would understand if I chose some Windows entry and then it did not boot or returned some error.

As I am able to boot Windows from Grub I would guess the solution is really easy but still cant find it
 
Old 08-16-2014, 03:45 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,077

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
Did you install CentOS 7 to a separate partition? or did you install it over CentOS 6.5? Are you sure you did not install over windows? Did you check the partitions with GParted?
 
Old 08-16-2014, 04:23 PM   #13
Hopsahejsa
LQ Newbie
 
Registered: Aug 2014
Distribution: CentOS 7
Posts: 21

Rep: Reputation: 0
I installed it over the 6.5 version. Just deleted all its volumes during installation and created a new one.
100% positive Windows are ok. Can boot there from Grub using: insmod ntfs,set root (hd0,msdos1) etc.

grub2-mkconfig -o /boot/grub2/grub2.cfg seems to find Windows 7 loader but just cant see any other entry. apart from CentOS.
 
Old 08-16-2014, 06:43 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,077

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
Running grub-mkconfig after creating your windows entry in 40_custom should put an entry in grub.cfg. Do you see any output when you run it relating to windows? Do you use the arrow keys at the boot menu to make sure you have seen all the entries?

Quote:
As I am able to boot Windows from Grub I would guess the solution is really easy but still cant find it
If that is the case, I'm not sure what the problem is?
 
Old 08-17-2014, 02:22 AM   #15
Hopsahejsa
LQ Newbie
 
Registered: Aug 2014
Distribution: CentOS 7
Posts: 21

Rep: Reputation: 0
The problem is I cant find a solution as you quoted

My main problem is that I did not manage to create an entry in GRUB. Lets just say I do not wanna use it for booting for now. Just want to have in my GRUB menu:

CentOS 7
CentOS 7 rescue
Windows 7 <--- this I cant get there

All solutions I found put Windows to grub2.cfg but NOT actually create any entry to menu in GRUB.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot dual boot Centos 6.5 32 bit with windows 7 SarahGurung Linux - Newbie 2 04-09-2014 02:49 PM
Problems with Windows and CentOS dual-boot nidishady Linux - Newbie 13 05-24-2013 12:32 AM
[SOLVED] Want to dual boot CentOs 5.5 onto Windows 7 HP G62 laptop missrose1991 Linux - Laptop and Netbook 6 01-11-2011 03:07 PM
How to dual boot Centos 5.0 and Windows XP pro (XP installed first) UMadara Linux - Newbie 2 05-13-2010 10:23 PM
CentOS 4.0 + Windows XP Dual Boot laserlight Linux - Enterprise 9 02-01-2010 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration