LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual boot Ubuntu and fedora core 6 (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-ubuntu-and-fedora-core-6-a-514343/)

bzeecongas 12-28-2006 11:21 AM

Dual boot Ubuntu and fedora core 6
 
Hi
Hope some one can help. I had install Ubuntu on a AMD based machine. I have two separate partition with a swap partition as well. Ubuntu installation completed fine, and was to boot to it until I installed Fedora core 6 on a separate partition. That installation went fine as well and now I only able to boot to fedora core. Although when I installed fedora, I had that option to setup dual boot and I did select that option. however I am only able to boot to fedora core. I believe my Ubuntu partition is still active but able to boot to it. Hopefully some one give me some direction to correctly setup a dual boot Ubuntu/Fedora core system

Running both the latest distro of linux

Thanks! Pixellany
I believe I also have a separate /boot partition. Maybe that was my problem. Can your solution still work.

pixellany 12-28-2006 12:01 PM

Quote:

Originally Posted by bzeecongas
Hi
Hope some one can help. I had install Ubuntu on a AMD based machine. I have two separate partition with a swap partition as well. Ubuntu installation completed fine, and was to boot to it until I installed Fedora core 6 on a separate partition. That installation went fine as well and now I only able to boot to fedora core. Although when I installed fedora, I had that option to setup dual boot and I did select that option. however I am only able to boot to fedora core. I believe my Ubuntu partition is still active but able to boot to it. Hopefully some one give me some direction to correctly setup a dual boot Ubuntu/Fedora core system

Running both the latest distro of linux

This should be easy.....
Linux installers do a good job of detecting Windows, but a lousy job of detecting other Linuces.

Running from Fedora, do this (in a terminal):
(I assume Fedora on hda2 and Ubuntu on hda1---make whatever corrections needed to match your setup**)

Code:

cd /mnt     --takes you to the folder where you will mount the Ubuntu partition
          There may be already an entry for hda1--if so:
mount <name>     (whatever it is named)---otherwise:
mkdir hda1
mount /dev/hda1 /mnt/hda1

cd /mnt/hda1/boot   
ls           --look for two files:  initrd..soemthing, and vmlinuz..something  make links like so:
ln -s vmlinuz* vmlinuz
ln -s initrd* initrd


Now to put the correct entries in the grub config file....

cd /boot/grub
ls
          look for a file named menu.lst or grub.conf
nano menu.lst (or grub.conf)    --nano is a common editor, you can also use gedit.
Add to this file--after the Fedora entries:

title  ubuntu
root (hd0,1)
    --tells grub that ubuntu's /boot is on disk 1, partition 2
              (grub counts from zero and always uses hd--even if linux tells you sd)

    <<EDIT:  fixed typo here--was hda1, should have been hda2>>
kernel /boot/vmlinuz root=/dev/hda2    --points grub at the kernel in said partition, and tells the kernel to mount the filesystem in the same place
initrd /boot/initrd

reboot 

**This also assumes that there is no separate /boot partition for either Linux. Everything listed has to point either to the /boot partition or to the / partition--hopefully is obvious which is which.

bzeecongas 12-28-2006 02:20 PM

Thanks! Pixellany
I believe I also have a separate /boot partition. Maybe that was my problem. Can your solution still work.

pixellany 12-28-2006 02:32 PM

Quote:

Originally Posted by bzeecongas
Thanks! Pixellany
I believe I also have a separate /boot partition. Maybe that was my problem. Can your solution still work.

Absolutely!!

FIRST--I HAVE FIXED A TYPO IN THE STUFF BELOW--AND IN THE ORIGINAL -- ERROR LIKE THIS

In this code:
Code:

title  ubuntu
root (hd0,1)    --tells grub that ubuntu's /boot is on disk 1, partition 2
              (grub counts from zero and always uses hd--even if linux tells you sd)
kernel /boot/vmlinuz root=/dev/hda2    --points grub at the kernel in said partition, and tells the kernel to mount the filesystem in the same place
initrd /boot/initrd

The root entry has to point to the partition where /boot is. Then the kernel entry has to have "root=" point to the partition where / is mounted.

So--suppose Ubuntu has /boot on /dev/hda1, and / on /dev/hda2. You would then do this:
Code:

title  ubuntu
root (hd0,0)   
kernel /vmlinuz root=/dev/hda2   
initrd /initrd

<<edited 12/29 to fix a typo--last two lines above.>>

pixellany 12-29-2006 08:22 AM

OOPS!!!--another typo
 
I made another boo-boo in this--the correct version is below. (When /boot is on a separate partition you do not put /boot in the kernel and inird entries.)


Code:

title  ubuntu
root (hd0,0)   
kernel /vmlinuz root=/dev/hda2   
initrd /initrd


bzeecongas 12-29-2006 09:48 AM

Hi Pixellany
Ok..Maybe that is why I was not able to get to work, I did not know that!

Here what my Grub file looks like under Fedora I also have a menu.lst file that reads the same

# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,2)
# kernel /boot/vmlinuz-version ro root=/dev/hdd3
# initrd /boot/initrd-version.img

#boot=/dev/hdd
default=0
timeout=5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)

root (hd0,2)
kernel /boot/vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-1.2798.fc6.img
title ubuntu

rootnoverify (hd0,0)
chainloader +1

Thanks

bzeecongas 12-29-2006 09:49 AM

The above Grub Post is without your suggested modification form yesterday.
Thanks

pixellany 12-29-2006 11:14 AM

Hmmm--how did it wind up with a Ubuntu entry setup to chainload? That is the Windows is done--and you don't even have Windows.

So we see that with the Fedora install (which currently owns grub) does not have a separate /boot partition. curious, since Fedora often make /boot separate by default.

now we need to know if the Ubuntu install has a separate /boot and you will be rounding third base.....

bzeecongas 12-30-2006 02:23 PM

Ubuntu entry in there because when I was installing Fedora it prompted me to to add secondary boot, which I did. So I will have to try your last solution to see if that works. I will post with the result later this week

bzeecongas 01-06-2007 06:56 PM

Hi Pixellany
I am back at this again. Tried your solution, upon selecting the ubuntu boot I get the following error

root (hd0,0)
Filesystem type is ext2fs, partion type 0x83
kernel /vmlinux root=/dev hda2
[linux- bzImage, setup=0x1c00, size 0x18db49]
initrd /initrd

error 2 Badfiel or directory type

press any key to continue ....return to boot distro selection

It would seem I will need to reinstall ubuntu. What would be best course without killing fedora? Or you may have a better suggestion.

Thanks
bzeecongas

IBall 01-06-2007 08:07 PM

You can install just reinstall Ubuntu - it seems to do a better job of detecting other Linuxes than Fedora.

But to fix the problem, boot up Fedora, and mount Ubuntu's root partition on /mnt as root.
Code:

mount /dev/hda1 /mnt
Open up /mnt/boot/grub/menu.lst, and find the entry that corresponds to the default Ubuntu entry. Copy that entry to Fedora's /boot/grub/menu.lst, just after the Fedora entry. Reboot your machine, and you should be able to select Ubuntu and boot it.

--Ian
Pixellany: Chainloading is useful for Linux as well. See this page. It makes things much more flexible in the long run, but we won't go in to that now :)

bzeecongas 01-06-2007 09:53 PM

Hi Ian
I can not see any listing under /mnt. What I am I missing here!
Tahnks
bzeecongas

IBall 01-06-2007 10:06 PM

So you have mounted the Ubuntu root partition on /mnt? You should see the contents of your Ubuntu root partition (/bin, /boot, /etc ...).

If not, then you have (somehow) lost your Ubuntu installation. You will need to reinstall.

If you are interested, check out my Dual booting Linux page. If you follow my instructions (they look complicated, but they aren't really), it will work out simpler in the long run.

--Ian

bzeecongas 01-07-2007 12:01 AM

Hi Ian
I reinstalled Ubuntu again, and this time it worked as advertised....awesome!
Ubuntu partition may have disabled in my first attempt. I am now able to select either Ubuntu or fedora boot.
Thanks
bzeecongas

Thanks Pixellany for your previous help


All times are GMT -5. The time now is 01:25 AM.