LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-23-2014, 04:37 PM   #1
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Rep: Reputation: 30
Need help configuring Grub for dual booting from two drives


I just did an install of CentOS 6.5 on top of a Windows XP Pro host machine. I added a second drive as a slave, hoping the installation would protect my XP Pro and put the boot loader on the slave. I believe it did that, but I found that when I booted up, I had no prompt to choose an operating system, it just went right into XP Pro.

It occurred to me that the problem was the boot order in the BIOS, so I changed the boot priority to select the slave drive with CentOS. Sure enough, I got my menu from Grub and could get into CentOS. But when I tried to get into XP Pro, the boot loader just hangs with what looks like a prompt in the upper left hand corner.

Here is grub.conf, I can't guarantee that it is as originally configured by CentOS.

Code:
# 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,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_gyr2-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=19
splashimage=(hd1,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS (2.6.32-431.17.1.el6.centos.plus.x86_64)
	root (hd0,0)
	kernel /vmlinuz-2.6.32-431.17.1.el6.centos.plus.x86_64 ro root=/dev/mapper/vg_gyr2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_gyr2/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M rd_LVM_LV=vg_gyr2/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
	initrd /initramfs-2.6.32-431.17.1.el6.centos.plus.x86_64.img
title CentOS (2.6.32-431.el6.x86_64)
	root (hd0,0)
	kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/vg_gyr2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_gyr2/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M rd_LVM_LV=vg_gyr2/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
	initrd /initramfs-2.6.32-431.el6.x86_64.img
title Windows XP Pro
	rootnoverify (hd1,0)
	chainloader +1

Here is some other information from my CentOS installation using Disk Utility 2.30.1,

Windows drive /dev/sda file system /dev/sda1
CentOS drive /dev/sdb file system /dev/sdb1 mounted at /boot

I'm happy to provide more information to speed a solution.

I haven't a clue as to what to do about this. Any and all tips or clues would be appreciated.
 
Old 05-23-2014, 07:05 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,405

Rep: Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716
Your windows drive is on the second drive in boot priority so you might need to map it as in the example at the top of the page below:

http://blog.firetree.net/2005/08/26/...ows-with-grub/

Your grub.conf looks a little weird, shows windows on (hd1,0) and also shows your grub splash image on the same partition. Not sure this will work but no harm done, change it back if it doesn't and ignore the update-grub part of the link above.
 
1 members found this post helpful.
Old 05-24-2014, 12:19 PM   #3
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Original Poster
Rep: Reputation: 30
Yes, that did it. I'd seen similar suggestions elsewhere. Strange now I have two entries on my Grub menu for the CentOS system with identical configurations except the title which includes "plus" on one.

Any explanation and/or fixes for that?
 
Old 05-24-2014, 03:06 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,361

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
You have a few issues going on. One is boot order. That is important to grub usually. The way it describes the drives may change in bios boot change.
Also xp doesn't like being changed. It's loader is specific also to location in boot order.

What I normally do is remove power or data to first drive. I set bios to second drive as top choice or first boot order and then load entire OS on it. Then when I want to swap OS's I use F key to select boot or boot order in bios. It keeps two loaders on each drive and separate. It makes it much easier to change out later.
 
Old 05-24-2014, 03:42 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,405

Rep: Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716
Quote:
Strange now I have two entries on my Grub menu for the CentOS system with identical configurations except the title which includes "plus" on one.
I installed CentOS plus for the first time last week so am not familiar with it. A quick google on centOS plus brought up the CentOS wiki site below which has some info on it:

http://wiki.centos.org/AdditionalRes...ies/CentOSPlus
 
Old 05-24-2014, 04:22 PM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
You either need to change the boot device in BIOS
usually an option to select which hdd to boot first, note this is not the boot priority list, cdrom, hdd , network .. but another one
Then , when booted to cent do a grub update (update-grub. But don't quote me on that )

Or, boot livedisk
Mount root partition
e.g
Code:
mount /dev/sdb1 /mnt
Then bind mount special stuff
Code:
for I in dev proc sys;do
    mount -o bind /${I} /mnt/${I}
done
Then.. chroot
Code:
chroot /mnt
grub-install /dev/sda
update-grub2
exit
Code:
reboot
All as root


Assumptions made, sda1 is root
And
Grub commands same on cent

Last edited by Firerat; 05-24-2014 at 04:24 PM.
 
Old 05-24-2014, 06:29 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,405

Rep: Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716
Fierat:

In post #3, he indicates he got the boot problem resolved by using the map entry:

Quote:
Yes, that did it.
 
1 members found this post helpful.
Old 05-28-2014, 12:45 PM   #8
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Original Poster
Rep: Reputation: 30
The Plus Repository?

Quote:
Originally Posted by yancek View Post
I installed CentOS plus for the first time last week so am not familiar with it. A quick google on centOS plus brought up the CentOS wiki site below which has some info on it:

http://wiki.centos.org/AdditionalRes...ies/CentOSPlus
This link goes to discussion on the CentOS Repository. Is that what you intended? I don't see the relevance.
 
Old 05-28-2014, 12:47 PM   #9
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Original Poster
Rep: Reputation: 30
That is correct

Quote:
Originally Posted by yancek View Post
Fierat:

In post #3, he indicates he got the boot problem resolved by using the map entry:
Yes that is correct, the map entry did it.

Thanks to all who posted. Keep them coming if anyone has any new ideas.
 
  


Reply

Tags
grub, grub boot wrong devices


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
Dual Booting (2 Linux from Separate Drives) GRUB issue. RensoreK Linux - Desktop 1 08-22-2008 12:01 AM
GRUB is not booting the correct partition in a dual drives system ps6000 Linux - Software 4 01-11-2007 10:59 AM
Questions about dual booting, dual hard drives, and partitioning Raybrandt Linux - Newbie 4 04-22-2006 08:19 PM
Dual Booting SuSE 9.2 & XP Pro/dual hard drives The_Bug Linux - General 3 01-04-2006 05:44 PM
An Imperative Solution Needed - Configuring Grub For Linux/XP Dual Booting CAL Linux - Newbie 3 04-05-2004 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:24 PM.

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