'Testing' RHEL 7 & SL 7 , which uses the new GrandUnifiedBootLoader2 ,showed the issue of existing Windows on your hard drivenot being added to the GRUB boot menu automatically ;However , the legacy GRUB did this."One step forward , two steps back.".I have read some of the documantation , and it is a bit 'dry' for me ;"GNU GRUB Manual 2.00 # 4.1.2 Chain-loading an OS" http://www.gnu.org/software/grub/manual/grub.html#Chain_002dloading&"GNU GRUB Manual 2.00 # 5.3 Multi-boot manual config" http://www.gnu.org/software/grub/manual/grub.html#Multi_002dboot-manual-configsays "Currently autogenerating config files for multi-boot environments depends on os-prober and has several shortcomings. While fixing it is scheduled for the next release, meanwhile you can make use of the power of GRUB syntax and do it yourself."Documentation mentions os-prober , however , on the CentOS forums , they ignore that method (see below).A good tutorial : http://www.dedoimedo.com/computers/grub-2.htmlAdditionally , at Fedora Project "Adding Other operating systems to the GRUB 2 menu " portion of their GRUB 2 documentation :https://fedoraproject.org/wiki/GRUB_2?rd=Grub2#Adding_Other_operating_systems_to_the_GRUB_2_menu? What is the best way to add a Windows entry to the boot menu ?..I have learned (correct me , if wrong):It seems like we cannot directly edit the menu file located/boot/grub2/grub.cfgAnd the /etc/grub2.cfg is only a symlink to the above file.* editable files {sh ell scripts} are located :/etc/grub.d/ README 00_header 10_linux 20_linux_xen 20_ppc_terminfo 30_os-prober 40_custom 41_custom* can add a new file (say 13_wind-xp)

As usual the "Wind" can be anything ;the hd0 is the first HDD , numbered starting at 0however , the partition ,2 is numbered strting at 1 !There seems to be a new syntax also for the partion : msdos2....I am no guru -- please verify....& after adding the above file , need to have GRUB generate the grub2.cfg file with (you guessed it) a command in a terminal window :"Re: Anaconda did not cofigure grub 2 correctly" (by paulrooney » 2014/07/24)https://www.centos.org/forums/viewtopic.php?f=47&t=47376#p201619says :

CODE

>$ sudo grub2-mkconfig -o /etc/grub2.cfg

& doublecheck that it added to the grub2.cfg ,>$ sudo cat /etc/grub2.cfgthen reboot>$sudo reboot..I will try this -2-step later this weekend.

Hi, I just now tried installing SL7 on a machine already having windows 7. I was going for the dual boot. But when I start the machine, I dont get the dual boot option. It just goes directly to the SL. I am new in using Scientific linux. Can you please help me in solving this problem.Faizman

Hi, I just now tried installing SL7 on a machine already having windows 7. I was going for the dual boot. But when I start the machine, I dont get the dual boot option. It just goes directly to the SL. I am new in using Scientific linux. Can you please help me in solving this problem.Faizman

? First , did you make sure install the SL 7 into a 'new' partition , in order to avoid overwritting the Wind partition?.

CODE

IN GENERAL :I like to pre - partition the HDD in a live linux with GParted -- it is in Live SL first ,then 'pick that partition when insalling SL in Anaconda (which is the default GraphicalUserInterface for installation) [url=https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/ch-guimode-x86.html]https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/ch-guimode-x86.html[/url]...During installation {correct me if I am wrong other experts} install the GRUB into the same partition as SL , in order to preserve the Wind boot...Subsequent to installing SL , [i]do the procedure in the first post[/i] of this topic & read the information in the links.

...Let me know if you did the first ;& any questions after attempting the procedure in the first post of this topic.

Hi, Thank you for the reply. Yes I did install it in a new partition. My hard drive was partitioned into three- C, D and E. I cleared some space on E by shrinking it. Then I installed SL7 on to the freed up space. I have used the SL live CD to install. When I boot into SL, I can see the different drives where my windows stuff is present. SO, I think the windows partition is still there. Please let me know what to do next.thank you

Here they mention this solution------------------------------------------------If you are using BIOS mode, simple login as root and open a text editor and copy the entry you have in your first post (shown below) to the 40_custom file in the /etc/grub.d/directory. That is if your windows boot files are actually on that partition, sda1.

Then as root run the "grub2-mkconfig..." command you show in your post. When you reboot, you should see the windows 7 entry.----------------------------------------I am very new to these things. So, I am going to list the steps that I will take-1. login as root2. edit the 40_custom file located in /etc/grub.d3. it has the following lines in it- #!/bin/sh exec tail -n +3 $0 # 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.

6. On the terminal enter the command- grub2-mkconfig -o /boot/grub2/grub.cfg here I have a question- before I enter the command at terminal, do i have to navigate to grub.d? Or I can just open the terminal, login as root and enter this command?

So, these 4 steps are to be done after the steps mentioned in my earlier post. Is that correct? the steps you mention will only change the time the boot menu stays ON. Currently, in my case, it already stays on for ~ 5 seconds.

<snip>So, these 4 steps are to be done after the steps mentioned in my earlier post. Is that correct? the steps you mention will only change the time the boot menu stays ON. Currently, in my case, it already stays on for ~ 5 seconds. thank you

Here they mention this solution------------------------------------------------If you are using BIOS mode, simple login as root and open a text editor and copy the entry you have in your first post (shown below) to the 40_custom file in the /etc/grub.d/directory. That is if your windows boot files are actually on that partition, sda1.

It looks like this is a solution for Wind 7 Mine from my first posting in thsi topic was for XP --so this part looks good .Sometimes , i like to read the reference material also ;that is why i linked to the GRUB documentation in my first posting in this topic .The fedora forum link that I posted in my first posting in this topic is good also.Finally , I like to double - check & cross reference these linux commands that I am learning.

QUOTE

Then as root run the "grub2-mkconfig..." command you show in your post. When you reboot, you should see the windows 7 entry.----------------------------------------I am very new to these things. So, I am going to list the steps that I will take-1. login as root2. edit the 40_custom file located in /etc/grub.d3. it has the following lines in it- #!/bin/sh exec tail -n +3 $0 # 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.

.................................................................................................................................................Personally , I chose to make a new file , so that , if anything went wrong , then I know that I only changed 1 file ;see my first post in this topic..The "(hd0,msdos1)" needs to be specific for your HDD partitioning ;the linux command to see your partitions is

6. On the terminal enter the command- grub2-mkconfig -o /boot/grub2/grub.cfg

That looks right.

QUOTE

here I have a question- before I enter the command at terminal, do i have to navigate to grub.d? Or I can just open the terminal, login as root and enter this command?

Linux (just like Wind) uses directories & subdirectories (in Wind they call them "Folders").So the path is relative. If the path starts with "/" , then it is at the "root" of the directory structure.For example , the above starts with the / , then specifies the directory "boot" -- giving :/boot, followed by the "/" and then the subdirectory "grub2" and another "/" -- giving/boot/grub2/and finally the actual file name grub.cnf.TL;DR No . The navigation is done in the command itself.

QUOTE

7. Restart the PC.Will these steps work? Can someone please suggest.thank you

Looks good so far ...Remember , the (hd0,msdos1) is specific for your HDD --see above here

Thank you +X^N and Duda for your replies. The problem is solved. So, I did the steps like they are listed in my last to last post. Except , I had to add another step between step 5 and 6. The step is- from terminal run - chmod +x /etc/grub.d/40_custom