Boot from separate distros of Linux on sep hard drives
Linux - GeneralThis 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.
Boot from separate distros of Linux on sep hard drives
I have 2 hard drives that have a separate version of linux on each. Both are fully configured and were not installed/configured for dual boot. One is CentOS and the other is RHENT3.
I would like to install both HDDs in the same PC and be able to boot from either hard drive so we can test on either OS separately when necessary. Can the grub boot loader be configured to do this?
I have 2 hard drives that have a separate version of linux on each. Both are fully configured and were not installed/configured for dual boot. One is CentOS and the other is RHENT3.
I would like to install both HDDs in the same PC and be able to boot from either hard drive so we can test on either OS separately when necessary. Can the grub boot loader be configured to do this?
Yes--in principle.
Were the OSes installed using the machine in which you want to use them? If not, there could be some changes required in the grub configuration.
Assuming that you can install one of them and boot up, then post the contents of /boot/grub/menu.lst
From this, we can tell you how to configure for the other drive.
Also, put in the other drive and run (as root) "fdisk -l"
Both systems were installed on separate HDDs on the same PC, and either can be booted up without any issue.
Here is the grub info from the rhent3.0 box:
]# cat /boot/grub/menu.lst
# 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/hda10
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-40.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-40.EL ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.21-40.EL.img
title Red Hat Enterprise Linux ES (2.4.21-37.0.1.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-37.0.1.EL ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.21-37.0.1.EL.img
title Red Hat Enterprise Linux ES (2.4.21-4.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.21-4.EL.img
I cannot get to the centos hdd from where I am but can get there later.
OK--when you install the other drive, it will likely be drive 1 (in grub-speak, the first one is 0).
Install the other drive, mount it, and look in /boot. You will see the equivalent of the files that are listed in the menu.lst that you posted---i.e. vmlinux..... and initrd......
You need to create an entry in menu.lst for Centos---same format as the ones for RHEL, but with the Centos names---and using hd1,0 instead of 0,0 (I'm assuming that the Centos is also on partition 0.
I'm unclear on the meaning of "root=LABEL=/ hdd=ide-scsi", but--if it works--its OK!! I'm more used to something like this (from your file): "# kernel /vmlinuz-version ro root=/dev/hda10"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.