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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-23-2014, 04:37 PM
|
#1
|
Member
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219
Rep:
|
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.
|
|
|
05-23-2014, 07:05 PM
|
#2
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,405
|
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.
|
05-24-2014, 12:19 PM
|
#3
|
Member
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219
Original Poster
Rep:
|
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?
|
|
|
05-24-2014, 03:06 PM
|
#4
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
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.
|
|
|
05-24-2014, 03:42 PM
|
#5
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,405
|
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
|
|
|
05-24-2014, 04:22 PM
|
#6
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
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
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.
|
|
|
05-24-2014, 06:29 PM
|
#7
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,405
|
Fierat:
In post #3, he indicates he got the boot problem resolved by using the map entry:
|
|
1 members found this post helpful.
|
05-28-2014, 12:45 PM
|
#8
|
Member
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219
Original Poster
Rep:
|
The Plus Repository?
Quote:
Originally Posted by yancek
|
This link goes to discussion on the CentOS Repository. Is that what you intended? I don't see the relevance.
|
|
|
05-28-2014, 12:47 PM
|
#9
|
Member
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219
Original Poster
Rep:
|
That is correct
Quote:
Originally Posted by yancek
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.
|
|
|
All times are GMT -5. The time now is 07:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|