Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Grub and windows entry setup, setup grub.conf file
oli
 Posted: May 5 2012, 03:00 PM
Quote Post


SLF Newbie


Group: Members
Posts: 3
Member No.: 1512
Joined: 5-May 12









>>> Problem Solved with the help of toracat giving me the virtual swap documentation's link
(Original post edited)
-----
Hello everyone

I successfully installed SL 6.2 but I have a Grub configuration problem : windows do not boot with my grub entry.
Before the installation process, I've unplugged my data HDD and my Windows HDD so I do not mess with important files. That's why Anaconda did not set this automatically.

QUOTE
I have 3 HDD :
sda1 : Scientific Linux
sdb1 : Data Disk (common to win and linux)
sdc1 : windows system Disk


When I plugged back thoses disk, I also wanted to have a windows entry in grub so I do not have to do bios setup to log into windows (that's why a bootloader is made for, right ?)

I can not find any automatic graphical tool to set the grub config for me (like it does in anaconda in the SL 6.2 installation process)

The menu I've first edited was showing up at boot, but windows did not not boot (but it was if I booted the disk from bios settings)

So I have written windows entry in the /boot/grub/grub.conf file, here is my file content (edited : working):
CODE
title Scientific Linux (2.6.32-220.13.1.el6.x86_64)
       root (hd0,0)
       kernel /vmlinuz-2.6.32-220.13.1.el6.x86_64 ro root=/dev/mapper/vg_benbo$
       initrd /initramfs-2.6.32-220.13.1.el6.x86_64.img
title Windows XP
       map (hd0) (hd2)
       map (hd2) (hd0)
       rootnoverify (hd2,0)
       makeactive
       chainloader +1


I was looking for an equivalent to "update-grub" (debian style) OR "grub-mkconfig -o /boot/grub/grub.cfg" in Scientific Linux 6.2... because I did not succeeded to use the standard "Grubby" package...

==> I did not found any "updade-grub" function... and it's normal, because it's a grub 1.x. and the only thing to do was to édit the grub.cong with the right parameters.

==> if you need to adapt your grub conf, and do a virtual swap, just swap the disk grub is in with the one windows is in. The disk order depend on how you configured it on you bios (or the slot order you plugged them if you did not changed anaything in bios.


--------------------
Give a man a fish...
PM
^
toracat
 Posted: May 5 2012, 03:57 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 251
Member No.: 11
Joined: 10-April 11









The problem is most likely because Windows is not on the first drive. There are workarounds for this. For example, see this article for more details.


--------------------
ELRepo: repository specializing in hardware support for EL
PMUsers Website
^
oli
 Posted: May 6 2012, 08:56 AM
Quote Post


SLF Newbie


Group: Members
Posts: 3
Member No.: 1512
Joined: 5-May 12









Thanks for the tip.
Am I supposed to enter something like that :
CODE

title Scientific Linux (2.6.32-220.13.1.el6.x86_64)
      root (hd0,0)
      kernel /vmlinuz-2.6.32-220.13.1.el6.x86_64 ro root=/dev/mapper/vg_benbo$
      initrd /initramfs-2.6.32-220.13.1.el6.x86_64.img
title Windows XP
      map (hd0) (hd2)
      map (hd2) (hd0)
      rootnoverify (hd0,0)
      makeactive
      chainloader +1

But how can I make grub to take my grub.conf into account ?
What is the equivalent to an update-grub (debian clones) in REHL clones ?


--------------------
Give a man a fish...
PM
^
toracat
 Posted: May 6 2012, 04:25 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 251
Member No.: 11
Joined: 10-April 11









QUOTE (oli @ May 6 2012, 12:56 AM)


But how can I make grub to take my grub.conf into account ?
What is the equivalent to an update-grub (debian clones) in REHL clones ?

Normally you do not have to do anything after editing the grub.conf file. If you need to [re]install grub, there is a command called 'grub-install'.

Your 'rootnoverify (hd0,0)' does not seem right. If Windows is in hd2, it may be more like (hd2,0). Try looking at the output of 'fdisk -l' and determine the exact numbers to enter.


--------------------
ELRepo: repository specializing in hardware support for EL
PMUsers Website
^
soulblighter
 Posted: May 9 2012, 03:28 AM
Quote Post


SLF Newbie


Group: Members
Posts: 2
Member No.: 1521
Joined: 9-May 12









Oli, Did you get this working?
I have the same problem ( I installed linux in a primary hard-drive, and windows on the secondary).
I edited grub.conf just like you had written, but I am not getting the boot menu after a restart. I go straight into SL6.2!
Thanks for any help!
PM
^
toracat
 Posted: May 9 2012, 08:33 AM
Quote Post


SLF Geek
****

Group: Members
Posts: 251
Member No.: 11
Joined: 10-April 11









QUOTE (soulblighter @ May 8 2012, 07:28 PM)

I edited grub.conf just like you had written, but I am not getting the boot menu after a restart. I go straight into SL6.2!

Edit the grub.conf file and delete (or comment out) the line that says hiddenmenu and try booting again.


--------------------
ELRepo: repository specializing in hardware support for EL
PMUsers Website
^
oli
 Posted: May 9 2012, 04:43 PM
Quote Post


SLF Newbie


Group: Members
Posts: 3
Member No.: 1512
Joined: 5-May 12









Hello everyone.

Special thanks to toracat who put me on the right path.
PROBLEM SOLVED WITH A VIRTUAL SWAP. Easy to do. (when you have the good info).

Here is my grub.conf, everything is working like a charm :
CODE

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Scientific Linux (2.6.32-220.13.1.el6.x86_64)
       root (hd0,0)
       kernel /vmlinuz-2.6.32-220.13.1.el6.x86_64 ro root=/dev/mapper/vg_benbo$
       initrd /initramfs-2.6.32-220.13.1.el6.x86_64.img
title Windows XP
       map (hd0) (hd2)
       map (hd2) (hd0)
       rootnoverify (hd2,0)
       makeactive
       chainloader +1



--------------------
Give a man a fish...
PM
^
toracat
 Posted: May 9 2012, 05:20 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 251
Member No.: 11
Joined: 10-April 11









You are welcome. Glad to hear things are working. smile.gif


--------------------
ELRepo: repository specializing in hardware support for EL
PMUsers Website
^
soulblighter
 Posted: May 10 2012, 12:49 AM
Quote Post


SLF Newbie


Group: Members
Posts: 2
Member No.: 1521
Joined: 9-May 12









Thanks to both of you!
I had a bigger problem. I had installed Win XP on my primary disc, Win 7 on my secondary disk, and then did a format and install of SL over win XP. This lead to a NTLDR missing error when trying to bootup win7.

I simply moved the Win 7 to the primary slot, disconnected the drive with SL,
put in my Win7 installation disc, and then re installed the bootrec
using this http://support.microsoft.com/kb/927392 ( I used the /FixMbr option for Bootrec.exe).

I also edited the grub file accordingly, and now dual boot works!
Thanks again Toracat and Oli!
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll