LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Dual boot with Ubuntu and RHEL5 (https://www.linuxquestions.org/questions/linux-distributions-5/dual-boot-with-ubuntu-and-rhel5-697542/)

benderan 01-15-2009 11:39 AM

Dual boot with Ubuntu and RHEL5
 
Hi,

I currently have a dual boot system, where one side is RHEL 5 and the other is Scientific Linux 3.0.9. I'm trying to erase the SciLinux partitions and install Ubuntu 8.04.1 in its place. However, after completing the installation process I'm unable to boot into Ubuntu. During the install process I made three partitions(which are the same as before)

sda1 /boot
sda2 /home
sda3 /root
sda5 swap

and installed the boot loader on sda1. I've tried booting off the different partitions (although I'm pretty sure I've got the right partition), and my boot lines in my /boot/grup/menu.lst on the RHEL5 OS are

rootnoverify(hd0,0)
chainloader +1

Can someone suggest where I'm going wrong in the install?

Also, during the Ubuntu install process I had no control over which packages to install? Is there a way to do this during install, or is it only after that you can add/delete packages?

PTrenholme 01-16-2009 11:26 AM

By default Ubuntu installs in a single partition, and there is no known advantage (except an artificial limit on the size of /boot, /home and /root) to using separate partitions. (If you need to spread your installation over several drives it's actually more efficient to combine those separate drives into a single logical volume - or, perhaps, two logical volumes in a RAID configuration for redundancy - and use the Ubuntu "Alternate Installation" disk to install a LVM system.

Also, all those named partitions need to be sub-directories of /, and, from your description, you have made no place for / to reside. (Note that /root is the administrator's home directory, not the root of the file system, which is /).

I'd suggest you delete those unneeded partitions, and let Ubuntu "do its thing" with the resulting free space on the drive.

benderan 01-16-2009 04:06 PM

Sorry for the confusion, when I said /root, I meant /.

PTrenholme 01-16-2009 09:22 PM

OK, if I correctly understand what you've written, you have RHEL 5 on some other drive, with a working GRUB on that other drive that you've tried to use to boot the Ubuntu you installed as though it (the Ubuntu) was a "foreign" distribution (A.K.A "Windows").

Instead of that, boot your RHEL GRUB and, instead of pressing <enter> after you select the "Ubuntu" entry, press "e" to start the GRUB file image editor. (That editor does not make any changes in the config file, but does let you experiment with different settings.)

Now, instead of the
Code:

        rootnoverify    (hd0,0)
        chainloader    +1

lets see if you can enter something like this:
Code:

 
root            (hd0,0)                               
kernel          /boot/vmlinuz-2.6.24-21-generic root=LABEL=/ ro quiet splash
initrd          /boot/initrd.img-2.6.24-21-generic

Notice the red sections in that suggestion. For each red entry, you should press a <tab> key, look at the possible "completions" and decide which entry is correct. (The values I copied into the suggestion are from a Ubuntu 8.04 installation and unlikely to be correct for yours.

Anyhow, the point here is to find a set of values which will let you boot the Ubuntu you've installed from the RHEL GRUB.

---------------------------

Another approach is to mount the three Ubuntu partitions in your RHEL installation (or, actually, only the /boot one is needed for this) and look at the Ubuntu /boot/grub/menu.lst and copy the relevant stanzas from that into your RHEL GRUB confg file. Note, however, that, unless you have only one hard drive, what the RHEL GRUB calls (hd0) is the RHEL "first disk," and that is probably not the (hd0) to which the Ubuntu configuration refers. You'll need to change it to the correct (hd#) from the RHLE point of view.

--------------------------

Using either approach you should be able to boot both distributions from the same GRUB configuration file.

The installation problem you have is, I think, because you did not install the Ubuntu GRUB in a location that your BIOS can access for booting. Since both RHEL and Ubuntu use GRUB, all you really need to do is put stanza for each distribution in a single GRUB configuration file.

As an illustration, here's my GRUB configuration file from this laptop which lets me boot three operating systems (Kubuntu, Fedora and Vista) with different kernels.
Code:

$ cat /Ubuntu/boot/grub/menu.lst | grep -v ^\# | grep -v ^$
default saved                                                               
timeout        10                                                         
title          Ubuntu 8.04.1, kernel 2.6.24-21-generic                     
                savedefault                                                 
root            (hd0,4)                                                     
kernel          /boot/vmlinuz-2.6.24-21-generic root=UUID=17841f9e-fa3a-4850-aa52-0e6d0ba242e3 ro quiet splash                                                       
initrd          /boot/initrd.img-2.6.24-21-generic                               
quiet                                                                             
title          Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)           
root            (hd0,4)                                                           
kernel          /boot/vmlinuz-2.6.24-21-generic root=UUID=17841f9e-fa3a-4850-aa52-0e6d0ba242e3 ro single                                                             
initrd          /boot/initrd.img-2.6.24-21-generic                               
title          Ubuntu 8.04.1, kernel 2.6.24-19-generic                           
root            (hd0,4)                                                           
kernel          /boot/vmlinuz-2.6.24-19-generic root=UUID=17841f9e-fa3a-4850-aa52-0e6d0ba242e3 ro quiet splash                                                       
initrd          /boot/initrd.img-2.6.24-19-generic                               
quiet                                                                             
title          Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)           
root            (hd0,4)                                                           
kernel          /boot/vmlinuz-2.6.24-19-generic root=UUID=17841f9e-fa3a-4850-aa52-0e6d0ba242e3 ro single                                                             
initrd          /boot/initrd.img-2.6.24-19-generic                               
title          Ubuntu 8.04.1, memtest86+                                         
root            (hd0,4)                                                           
kernel          /boot/memtest86+.bin
quiet
title          Other operating systems:
root
title Fedora (2.6.27.9-159.fc10.x86_64)
        savedefault
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.27.9-159.fc10.x86_64 ro nohpet root=UUID=ffccf6e4-8321-46a7-9ef0-48e2aeedc325 quiet
        initrd /boot/initrd-2.6.27.9-159.fc10.x86_64.img
title Fedora (2.6.27.7-134.fc10.x86_64)
        savedefault
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.27.7-134.fc10.x86_64 ro nohpet root=UUID=ffccf6e4-8321-46a7-9ef0-48e2aeedc325 quiet
        initrd /boot/initrd-2.6.27.7-134.fc10.x86_64.img
title Fedora (2.6.27.5-117.fc10.x86_64)
        savedefault
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.27.5-117.fc10.x86_64 ro nohpet root=UUID=ffccf6e4-8321-46a7-9ef0-48e2aeedc325 quiet
        initrd /boot/initrd-2.6.27.5-117.fc10.x86_64.img
title Windows Vista
        savedefault
        root            (hd0,0)
        makeactive
        chainloader    +1
title          Windows Recovery
        root            (hd0,1)
        makeactive
        chainloader    +1


syg00 01-16-2009 09:40 PM

Quote:

Originally Posted by benderan (Post 3410005)
However, after completing the installation process I'm unable to boot into Ubuntu.

What happens ?. Any messages ?. Are you talking about 2 separate hard disks ?.
If you did in fact properly install to the Ununtu /boot partition, chainloading works fine. And IMHO is safer/better than merging the menu.lst in that both systems will successfully update their respective entries for kernel updates.
Have a look for posts by user CJS (here on LQ) and download and run the script he appears to maintain. Let's see the output.

billymayday 01-16-2009 10:13 PM

From the grub menu as described earlier, you should be able to try

find menu.lst

and hopefully thiswill confirm the partition to point grub to.

benderan 01-19-2009 12:38 AM

Hi,

Thanks for all the good advice. It turns out I was having several problems. The first was that while the iso & the cd I burned with Ubuntu checked out fine, the installation was not completing. After switching to the alternative Ubuntu installation cd I was able to get it installed. At this point though, I was not longer able to get my RedHat grub to boot. Instead I mounted my redhat boot drive in the Ubuntu partition, copied the menu.lst lines from the redhat side into the ubuntu grub and then the dual-boot worked. I never could get it to work with chainloader.


All times are GMT -5. The time now is 01:58 PM.