LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 04-06-2014, 02:17 AM   #1
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Centos v5 & v6 multi-boot issue


Hi Guys,

Having an issue trying to multi-boot Centos v5 from v6.

grub.conf for v6
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=7
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
#hiddenmenu
title CentOS (2.6.32-431.11.2.el6.centos.plus.x86_64)
	root (hd0,0)
	kernel /boot/vmlinuz-2.6.32-431.11.2.el6.centos.plus.x86_64 ro root=UUID=ec95cdc7-c574-43ae-b51a-faf866d1faab rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_NO_LVM rd_NO_DM rhgb quiet crashkernel=auto
	initrd /boot/initramfs-2.6.32-431.11.2.el6.centos.plus.x86_64.img
title CentOS (2.6.32-431.5.1.el6.centos.plus.x86_64)
	root (hd0,0)
	kernel /boot/vmlinuz-2.6.32-431.5.1.el6.centos.plus.x86_64 ro root=UUID=ec95cdc7-c574-43ae-b51a-faf866d1faab rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_NO_LVM rd_NO_DM rhgb quiet crashkernel=auto
	initrd /boot/initramfs-2.6.32-431.5.1.el6.centos.plus.x86_64.img
title CentOS (2.6.32-431.3.1.el6.centos.plus.x86_64)
	root (hd0,0)
	kernel /boot/vmlinuz-2.6.32-431.3.1.el6.centos.plus.x86_64 ro root=UUID=ec95cdc7-c574-43ae-b51a-faf866d1faab rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_NO_LVM rd_NO_DM rhgb quiet crashkernel=auto
	initrd /boot/initramfs-2.6.32-431.3.1.el6.centos.plus.x86_64.img
title Centos B
	rootnoverify (hd0,2)
	makeactive
	chainloader +1
title Centos 5.10
    rootnoverify (hd0,5)
    makeactive
    chainloader +1
target v5 system
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,5)
#          kernel /boot/vmlinuz-version ro root=/dev/sda6
#          initrd /boot/initrd-version.img
#boot=/dev/sda6
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-371.el5)
	root (hd0,5)
	kernel /boot/vmlinuz-2.6.18-371.el5 ro root=LABEL=/ rhgb quiet
	initrd /boot/initrd-2.6.18-371.el5.img
Set to start in runlevel 3
Code:
id:3:initdefault:
so I know (?) its not a video driver issue.

Drive mapping
Code:
# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00059eb3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        5737    46080000   83  Linux
/dev/sda2            5737        6247     4096000   82  Linux swap / Solaris
/dev/sda3   *        6247        6885     5120000   83  Linux
/dev/sda4            6885       60802   433089536    5  Extended
/dev/sda5            6885        7140     2048000   82  Linux swap / Solaris
/dev/sda6   *        7140        9751    20976811   83  Linux
/dev/sda7            9752       10274     4199973+  82  Linux swap / Solaris

# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0    44G  0 part /
├─sda2   8:2    0   3.9G  0 part [SWAP]
├─sda3   8:3    0   4.9G  0 part 
├─sda4   8:4    0     1K  0 part 
├─sda5   8:5    0     2G  0 part 
├─sda6   8:6    0    20G  0 part
└─sda7   8:7    0     4G  0 part 
sr0     11:0    1  1024M  0 rom
When choosing the Centos v5.10 I get
Quote:
Error 12: Invalid device
FYI the 'Centos B' install (v6) works just fine.

Last edited by chrism01; 04-06-2014 at 02:33 AM.
 
Old 04-06-2014, 03:19 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Did you forget that centos 5 uses BOTH sd and hd ?
(sd0.5) and (hd0,5)

use sd0,5 for a sata drive
 
Old 04-06-2014, 04:36 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Original Poster
Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually, it installed itself as 'hd0', but I tried changing the C5 grub.conf to use 'sd0' ; no success.
 
Old 04-06-2014, 07:11 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Why are you using chainloader?

That should be needed only if the grub you are using is incompatible with the kernel you want to load. It should be possible only if the partition you are chainloading has the first sector of boot code (first sector of grub) stored in the partition boot sector, which is NOT the default when grub is installed by the Centos installer.

It should be possible to just copy the lines from your Centos 5 grub.conf
Code:
	root (hd0,5)
	kernel /boot/vmlinuz-2.6.18-371.el5 ro root=LABEL=/ rhgb quiet
	initrd /boot/initrd-2.6.18-371.el5.img
replacing the chainloading lines you have now (for the Centos 6 grub.conf to load Centos 5 instead)
Code:
    rootnoverify (hd0,5)
    makeactive
    chainloader +1
But if you really prefer to chainload, I think you should try to reinstall grub for the Centos 5 system, making sure the part that is normally installed in the MBR is not installed in the MBR but IS installed in the sda6 boot sector instead. I forget the grub install command for doing that, but it should be easy to figure out from the man page.

BTW, when chainloading to Windows, you might need that makeactive command. When chainloading from grub to another copy or version of grub, the makeactive command is useless.

Last edited by johnsfine; 04-06-2014 at 07:14 AM.
 
Old 04-07-2014, 05:06 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Original Poster
Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Interesting ...
TBH I've been using the chainloader thing for years; always worked up till now.
(I did tell it to add the bootblock to the first section of sda6 as an attempt to persuade it)

Anyway, your suggestion about just using the kernel defn etc works.
I always worked on the assumption of non-compatible OSes, just for safety.

Only tricky bit is it doesn't recognize my screen.
I used to have the customised xorg.conf lying around somewhere; hopefully I'll be able to find it without too much trouble
 
Old 04-07-2014, 06:26 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Original Poster
Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
OK johnsfine; here's the report.

I can get C5 up in GUI mode, screen looks good (found my old xorg,conf).

BUT it really crawls; symptoms are
1. during boot waits for minutes when starting sendmail and also sm-client
2. even after the login screen everything goes very! slowly eg 35+ seconds to open an xterm.

Any hints?
When I used to run it as the main OS it was pretty snappy.
 
Old 04-07-2014, 07:28 AM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by chrism01 View Post
OK johnsfine; here's the report.
You are now way outside my expertise and you may have discouraged other experts from helping by responding specifically to me.

Anyway, you are also outside the topic of your thread. This might turn out to be caused by some multi-boot issue. But that is both unlikely and a bad starting point for diagnosis.

I think you should start a new thread for why your Centos 5 is now very slow. If it was fast when it was the only OS on the computer, that might be relevant and is worth mentioning. But I think it is a mistake to start with the assumption that the cause is in the multi-boot.
 
Old 04-08-2014, 04:51 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Original Poster
Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually, as per original qn; the system already has 2 copies of Centos 6 that work just fine, with the 2nd one being called via chainloader.
It's only the new added Centos5 that has an issue; everything else is fine.

Actually, I'd like to have the Centos5 as independent as possible from the rest, as I'm going to be using it to do some Centos 5 specific testing.

I'm fairly sure I did this last time i re-installed Centos 5
Quote:
But if you really prefer to chainload, I think you should try to reinstall grub for the Centos 5 system, making sure the part that is normally installed in the MBR is not installed in the MBR but IS installed in the sda6 boot sector instead.
PS this qn is of course open to anyone who can help

I may have to try another re-install; its very odd.
Funnily enough, iirc, I used to have this system with C5 as the 1st system and added on C6 when it became available and that was fine (via chainloader)....

I'm sure someone will come up with a soln.
 
Old 04-08-2014, 07:31 AM   #9
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by chrism01 View Post
(I did tell it to add the bootblock to the first section of sda6 as an attempt to persuade it)
That step appears to not have worked.

What OS from what media was booted when you did that and exactly what command did you use to do it?

I don't have the correct command memorized, but if you tell me exactly what you did (to tell it to put that bootblock there), I will check the documentation and see if I spot a flaw in what you did.
 
  


Reply



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
Fedora 12 multi boot issue rrjoshua Linux - Distributions 1 12-17-2009 11:17 PM
Is it possible to make multi linux os startup cd for Redhat, Fedora & Centos ? shivumailbox Linux - Newbie 2 06-18-2009 04:44 AM
How to boot into multi Linux & Windows olkar Linux - Newbie 1 10-12-2005 08:08 PM
How to Boot Multi Windows & Multi Linux olkar Linux - Newbie 5 10-03-2005 11:52 AM
Multi-boot (Win2000 and Redhat 9.0) issue jk21 Linux - Newbie 11 09-19-2004 11:35 AM

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

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