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 |
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.
|
|
04-06-2014, 03:17 AM
|
#1
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,418
|
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
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
FYI the 'Centos B' install (v6) works just fine.
Last edited by chrism01; 04-06-2014 at 03:33 AM.
|
|
|
04-06-2014, 04:19 AM
|
#2
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,661
|
Did you forget that centos 5 uses BOTH sd and hd ?
(sd0.5) and (hd0,5)
use sd0,5 for a sata drive
|
|
|
04-06-2014, 05:36 AM
|
#3
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,418
Original Poster
|
Actually, it installed itself as 'hd0', but I tried changing the C5 grub.conf to use 'sd0' ; no success.
|
|
|
04-06-2014, 08:11 AM
|
#4
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
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 08:14 AM.
|
|
|
04-07-2014, 06:06 AM
|
#5
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,418
Original Poster
|
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
|
|
|
04-07-2014, 07:26 AM
|
#6
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,418
Original Poster
|
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.
|
|
|
04-07-2014, 08:28 AM
|
#7
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by chrism01
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.
|
|
|
04-08-2014, 05:51 AM
|
#8
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,418
Original Poster
|
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.
|
|
|
04-08-2014, 08:31 AM
|
#9
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by chrism01
(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.
|
|
|
All times are GMT -5. The time now is 09:28 AM.
|
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
|
|