LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-11-2010, 05:42 PM   #1
weshutchins
Member
 
Registered: Oct 2003
Location: Phoenix, AZ USA
Posts: 31

Rep: Reputation: 0
CentOs 5.3/Boot Order/Grub problem


I clone an drive with CentOs 5.3 from a drive connected to ATA0 device 0 of an ATA controller to an identical drive connected to the same ATA contoller ATA1 device 0. No matter what I do it boots from ATA1 device 0 and I need to be able to control which one it is booted from. When I have puppy linux on one drive and CentOs on the other drive I can control the boot thru the system BIOS either way no matter if puppy is in ATA 0 or 1. So its not a BIOS issue.

It appears (to me) to be a grub configuration issue. Since the 2 drives are clones they both have VolGroup00. I think grub loads from the last VolGroup00 found.

Here is my grub.conf file:

# 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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hde
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-128.el5.img

Here is the Device.map:

# this device map was generated by anaconda
(hd0) /dev/hde

Any help would be appreciated...

thanx
 
Old 02-12-2010, 12:12 PM   #2
weshutchins
Member
 
Registered: Oct 2003
Location: Phoenix, AZ USA
Posts: 31

Original Poster
Rep: Reputation: 0
I fixed the problem by reinstalling CentOs5.3 and configuring not to use logical volumes.

During install when you get to the "Installations requires partitioning" page, check the "Review and modify partitioning layout" check box and hit next. Select LVM volume groups-VolGroup00 and hit the delete button. I don't need or want the swap anyway. Select Hard drives-/dev/hde-/dev/hde2 and hit edit button. Change Filesystem Type to ext3 instead of LVM and give it a mount point of "/". Continue install as normal.

After installation, the grub.conf file(see below) in the grub directory on the /boot partition (hde1) needed to be edited to use root=/hde2 instead of root=LABEL=/. I also edited the devices.map file (see below) to add hdg as a device. The attached grub.conf file allows menu selection of which device to boot from (front or rear). The front device is the default. I do my editing from another linux OS.

To clone front to back I use:
dd if=/hde of=/hdg

My edited grub.conf:
# 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/hde2
# initrd /initrd-version.img
#boot=/dev/hde
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.el5) Front
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/hde2
initrd /initrd-2.6.18-128.el5.img
title CentOS (2.6.18-128.el5) Rear
root (hd1,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/hdg2
initrd /initrd-2.6.18-128.el5.img

My edited device.map:
(hd0) /dev/hde
(hd1) /dev/hdg

I got some good info on the CentOS forum:
https://www.centos.org/modules/newbb...24813&forum=37
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub question changing boot order making windows boot first nfsutim Linux - Newbie 29 10-27-2012 12:53 PM
GrUB boot order Tonygat105 Linux - Newbie 2 11-17-2007 01:22 PM
grub boot order NtlgnceAtWork Debian 6 10-02-2006 12:37 AM
grub boot order rsaar Linux - Newbie 4 02-26-2004 10:23 AM
grub boot order zeky Linux - General 3 12-11-2002 06:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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