LinuxQuestions.org
Help answer threads with 0 replies.
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 02-19-2015, 02:50 AM   #31
kwenda
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Rep: Reputation: Disabled
windows option not available


I have a similar problem. I had Windows 7 and Centos 5.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.
 
Old 02-19-2015, 09:47 AM   #32
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by kwenda View Post
I have a similar problem. I had Windows 7 and Centos 5.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.
The best answer is a bit buried in this long thread (and in several others) so I will repeat it:

Enable the epel repository (see post #29 in this thread or search online).
Install ntfs-3g
Rerun grub2-mkconfig -o /boot/grub2/grub.cfg

Last edited by johnsfine; 02-19-2015 at 09:49 AM.
 
Old 02-24-2015, 12:47 PM   #33
elduende
LQ Newbie
 
Registered: Feb 2015
Location: Alicante
Distribution: Centos
Posts: 1

Rep: Reputation: Disabled
Fix GRUB2

There are two ways you can resolve the issue. One, you can add a manual chainload entry to the 40_custom GRUB script under /etc/grub.d, and then update the GRUB2 menu using the following command:

grub2-mkconfig -o /boot/grub2/grub.cfg

The content you actually need to add to the 40_custom script BEFORE you update the menu is as follows:

menuentry "Windows 7" {
set root='(hd0,1)'
chainloader +1
}

Do pay attention to the disk and partition number. And remember that GRUB2 enumerates disks starting with zero, but partitions starting with 1. Therefore, if you have Windows installed on the first partition of your first disk, you will use (hd0,1) and not (hd0,0) like you would back in the GRUB legacy days.

I Fix the problem in my installation with this setting.

I hope can help you.
 
Old 07-21-2016, 01:45 AM   #34
tashi
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Rep: Reputation: Disabled
Talking Help!

Quote:
Originally Posted by johnsfine View Post
I recently hit the same issues described in this thread: I installed Centos 7 after Windows 7. The grub installer did not automatically detect Windows. When I later ran grub2-mkconfig, the os-prober did not detect Windows.

I manually edited /etc/grub.d/40_custom trying a few different sets of contents that I found with google searches, several of which might have worked if I hadn't been confused and trying to boot Windows from sda3 (which is my Windows C partition). This copy of Windows had been booting sda3 through the recovery partition sda2. sda3 by itself was not bootable. Once I realized that, I used the following /etc/grub.d/40_custom, which (when I next used grub2-mkconfig) inserted itself into /boot/grub2/grub.cfg and worked (which directory, file and command names have the "2" after "grub" and which don't seems to be a strange mix that I have not seen in other distributions using grub2. Be careful to get each of those right when working with grub2 in Centos 7).

Code:
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Windows" {
        insmod part_msdos
           set root='hd0,msdos2'
        chainloader +1
}
Note the above probably depends on having an old style partition table (on my 1TB disk). I haven't tried any of this on a bigger disk with a new style partition.

After verifying that worked, I enabled the EPEL repository and installed ntfs-3g (which is something I expect anyone dual booting Windows 7 and Centos 7 should do). Then I reran grub2-mkconfig and now os-prober detects the bootable Windows on sda2 and sets up a slightly more complicated menuentry for it. I haven't tested it yet, but it looks like it ought to work.

I'm not certain, but I think installing ntfs-3g was the reason os-prober now works. That is strange because sda2 (where the Windows 7 boot code is) is not ntfs. sda3 (the C partition) is ntfs but os-prober found the Windows boot on sda2. Maybe it needed to read sda3 in order to act on what it saw in sda2.

So, probably there was never any need to search grub2 info online and manually edit /etc/grub.d/40_custom. I just needed to install ntfs-3g and then rerun
Code:
grub2-mkconfig -o /boot/grub2/grub.cfg


I think that is the correct answer for Hopsahejs. In the following command there is a 2 after "grub" in only two of the three places "grub" occurs:
Code:
grub2-mkconfig -o /boot/grub2/grub.cfg

Hello,
I am a newbie in centos as well. Recently I installed centos 7 into my pc which already had windows 10(upgraded from windows 8). But when I boot it, it can see only two centos and one windows boot manager on /dev/sda2. When I click on the "Windows boot manager", it gives "/EndEntire file path:......... error cannot load image" and cannot be opened.
Can you help me with it. I tried editing the grub.cfg file and all but it wasn't solved.
Many thanks.
 
  


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 01:49 PM
Problems with Windows and CentOS dual-boot nidishady Linux - Newbie 13 05-23-2013 11:32 PM
[SOLVED] Want to dual boot CentOs 5.5 onto Windows 7 HP G62 laptop missrose1991 Linux - Laptop and Netbook 6 01-11-2011 02:07 PM
How to dual boot Centos 5.0 and Windows XP pro (XP installed first) UMadara Linux - Newbie 2 05-13-2010 09:23 PM
CentOS 4.0 + Windows XP Dual Boot laserlight Linux - Enterprise 9 02-01-2010 12:51 PM

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

All times are GMT -5. The time now is 06:38 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