Linux - SoftwareThis 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.
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.
I'm a Linux noob, but have been tasked with installing CentOS on a machine that has an existing Redhat installation. The Redhat installation is install on the master drive, and I'm wanting to install CentOS on the slave drive (two seperate drives).
I loaded up CentOS and went through the installation. Now the GRUB loader thingy only displays CentOS as a boot option. Where'd Redhat go? I'm guessing that CentOS didn't know that Redhat was on there, so it just put it's own entry into the GRUB loader. Any easy way to get that back? I'm not really sure where the other one was loaded, but I'm guessing dev/hda2.
I am guessing RH is still there and that GRUB just doesn't have it in its configuration file.
I would boot into CentOS and use one of its partitioning tools to see what partitions are on the two disks. If you have fdisk, running
Code:
fdisk -l
as root will list all of the partitions on both disks. Otherwise, see what partioning tools you have using
Code:
man -k partition
Compare this against the partitions that are currently mounted (issue the mount command w/o any parameters). I am guessing you will see one or more partitions on your slave drive (partitions that start with /dev/hdb) mounted and none mounted from your master drive (partitions that start with /dev/hda).
If this is true, create a temporary mount point (say /mnt/temp) if you do not already have one, and see if you can mount any of the partitions from your master drive on it with commands like:
Code:
mount -t auto /dev/hda1 /mnt/temp
These commands need to be run as root. If you can mount any of these, look at their content with
Code:
ls /mnt/temp
This should tell you whether your RH system is still there. If it is, you just need to modify you GRUB configuration file to give you a choice of which to boot.
Thanks Blackhole. I'll give this stuff a try now. I did try adding an entry to the GRUB loader, but when I tried to boot from it it didn't work. Let me try the stuff you've outlined and I'll get back to you.
My primary drive looks like the following: ("fdisk -l" worked like a charm)
Device Boot ... System
/dev/hda1 ... Linux
/dev/hda2 ... Linux
/dev/hda3 ... Linux swap
and slave drive:
/dev/hdb1 ... Linux
/dev/hdb2 ... Linux LVM
I did the mount command on 1 and 2 on the primary. Both of them had what I think is the Redhat OS.
hda1 has folders grub, and lost+found, and then files like boot.b, chain.b ... initrd.2.4.20-6.img, kernel.h etc.
hda2 has folders like bin, boot, dev, etc, home, initrd, lib...
I'm going to totally guess and say I need to get grub to point to the hda1 drive to boot from that. It does look like there is a grub folder in the primary disk. Going to now lookup how to modify the GRUB stuff.
Woot! Got it working. I went into the mounted directory grub and looked at it's grub.conf and simply copy and pasted the existing entry over. Rebooted, selected RedHat 9, and up she came. Awesome!
for reference my /boot/grub/grub.conf file looks like:
title CentOS (2.6.9-34.EL)
root (hd1,0)
kernel /vmlinuz-2.6.9-34.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-34.EL.img
title Red Hat Linux (2.4.20-6)
root (hd0,0)
kernel /vmlinuz-2.4.20-6 ro root=LABEL=/
initrd /initrd-2.4.20-6.img
Thanks again for taking the time to help out. Much appreciated!
Last question...any reason why it started booting from the slave drive's grub.conf instead of the old one that RedHat 9 already had? Should I be concerned that it's booting from the slave?
Last question...any reason why it started booting from the slave drive's grub.conf instead of the old one that RedHat 9 already had? Should I be concerned that it's booting from the slave?
True confession time. I am glad you got it working on your own because, while I am familiar with LILO, I have never used GRUB! So I am somewhat guessing here. When you installed centOS, it put instructions on the MBR (Master Boot Record -- the first 512 bytes of /dev/hda) to run GRUB from /dev/hdb. If this bothers you, I would think you could boot RH, setup its GRUB config file and give the magic instruction (this is where I have no idea what I am talking about) to have it set up the MBR to use its version of GRUB. Or ... you can always go with the old adage: if it ain't broke, don't fix it!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.