LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-12-2008, 07:20 AM   #1
liamkincaid25
Member
 
Registered: Apr 2002
Location: puerto rico
Posts: 70

Rep: Reputation: 15
Question Double boot (fedora +ubuntu)


2 weeks I tried to do a double installation with ubuntu and suse, it all went wrong. Looking for some advice to try make the installation work was useless. I decided to start from scratch. Erased the disk now installed Fedora and want to install Ubuntu . When I inserted the disk from ubuntu it ran ok and when was going to install the system gave me this information

"The partition tables of the following devices are changed SCSI1 (0,1,0)(sda)"
'The following partition are going to be formatted
Partition #1 of SCSI1 (0,1.0) as ext3
Partition #5 of SCSI1 (0,1,0) as swap

When I hit advanced for the boot loader installation I get
Device for boot loader installation
(hd0)
/dev/sda
/dev/sd1

When I installed Fedora I did not install the boot loader to the MBR (I remember in my other thread I was told NOT to do this). I just canceled the installation of ubuntu and came here looking for advice. I do not want to spend another week trying to make a double installation work and having to start from scratch again.Right now fedora is the only OS in the disk there is nothing more .My next step is to try install Ubuntu with your help. Thank you. (boy this linux stuff is harder than I imagined)

Last edited by liamkincaid25; 06-12-2008 at 07:22 AM.
 
Old 06-12-2008, 09:39 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
You have at least 2 options:
1. Install GRUB with the new install (Ubuntu). Let it put GRUB in the MBR. Then edit the menu.lst file to add Fedora.

2. Install Ubuntu, but tell it not to install GRUB at all. If it doe not give you that choice, then simply install GRUB to the partition---eg sda2 and not sda. Then boot into Fedora and edit the Fedora menu.lst to add Ubuntu.

The thing to keep in mind is that, when GRUB is installed (anywhere) it gets "hard-coded" to point to it's configuration files (in /boot/grub) Suppose you have everything working with Fedora in sda1 and GRUB in sda (ie the MBR). GRUB will go to sda1/boot/grub to find the menu.lst file. If you then put Ubuntu on sda2 and install GRUB to the MBR, it will now use the file in sda2/boot/grub.

The "booting" link below might help also.
 
Old 06-12-2008, 11:12 AM   #3
liamkincaid25
Member
 
Registered: Apr 2002
Location: puerto rico
Posts: 70

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pixellany View Post
You have at least 2 options:
1. Install GRUB with the new install (Ubuntu). Let it put GRUB in the MBR. Then edit the menu.lst file to add Fedora.

2. Install Ubuntu, but tell it not to install GRUB at all. If it doe not give you that choice, then simply install GRUB to the partition---eg sda2 and not sda. Then boot into Fedora and edit the Fedora menu.lst to add Ubuntu.

The thing to keep in mind is that, when GRUB is installed (anywhere) it gets "hard-coded" to point to it's configuration files (in /boot/grub) Suppose you have everything working with Fedora in sda1 and GRUB in sda (ie the MBR). GRUB will go to sda1/boot/grub to find the menu.lst file. If you then put Ubuntu on sda2 and install GRUB to the MBR, it will now use the file in sda2/boot/grub.

The "booting" link below might help also.
Waoo , I am really getting a headache reading this. I know is simple but I am not used to linux yet (I have done double boot in windows but is simpler than with linux). My fear is that I was being pointed on how to edit the menu.lst , but was unable to.That is why I erased the disk installed fedora to see if this time the sailing was smoother. Ubuntu gives the option of not installing the boot loader. After I install Ubuntu without the boot loader what information do you need to help me add it to themenu.lst? From the alternatives it is giving me whcih if any should I select to install the boot loader
(hd0)
/dev/sda
/dev/sd1
?

Last edited by liamkincaid25; 06-12-2008 at 01:41 PM.
 
Old 06-12-2008, 03:44 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Let's take it one step at a time.....

Install Ubuntu and select the option for no bootloader.
Reboot into Fedora, and edit menu.lst to add an entry for Ubuntu.

You can edit the file with any text editor (not word processor). I prefer "nano", but you can also use something like gedit.
Example:
su (to become root)
gedit /boot/grub/menu.lst

I like to set softlinks for the various distros so that I can make all menu.lst entries the same, eg
title whatever
root (hdx,y) (The location of /boot/grub)
kernel /boot/vmlinuz root=/dev/sdAB (the location of /)
initrd /boot/initrd

Note that--eg--hd0,0 in grubspeak is the same as sda1
hd0,1 = sda2
hd1,0 = sdb1
hd0 = sda
.
.
etc.

To make the soft link, go into /boot/grub and do "ln -s vmlinuzstuff vmlinuz", where "vmlinuzstuff" is the specific kernel you want to boot. Similar command to make softlink for initrd.

My "booting" link will give all the details on how to do this.
 
Old 06-12-2008, 04:00 PM   #5
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,094

Rep: Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809
Are you able to boot your computer at all. What OS are you using? It usually works better if you make a decisiion on which OS's bootloader you are going to use before you begin your installations. The first system you install should have Grub in the mbr. After the installation completes and you have a bootable system, you can add other OS's (making sure you do not install to the same partition) and then simply make a text entry to the menu.lst file (in Fedora it is grub.conf). It's a simple process to mount the new OS on the first system and find the information you need to make this entry (in grub.conf).
 
Old 06-12-2008, 06:04 PM   #6
liamkincaid25
Member
 
Registered: Apr 2002
Location: puerto rico
Posts: 70

Original Poster
Rep: Reputation: 15
Post Fedora

Quote:
Originally Posted by yancek View Post
Are you able to boot your computer at all. What OS are you using? It usually works better if you make a decisiion on which OS's bootloader you are going to use before you begin your installations. The first system you install should have Grub in the mbr. After the installation completes and you have a bootable system, you can add other OS's (making sure you do not install to the same partition) and then simply make a text entry to the menu.lst file (in Fedora it is grub.conf). It's a simple process to mount the new OS on the first system and find the information you need to make this entry (in grub.conf).

I using Fedora. But when given the option of where to put the bootloader I choosed not to write it to the mbr (guess from my other post I am guetting all wrong). I using it so far with no problem. I will install ubuntu this night and ask for more help. Thank you all
 
Old 06-13-2008, 07:48 AM   #7
liamkincaid25
Member
 
Registered: Apr 2002
Location: puerto rico
Posts: 70

Original Poster
Rep: Reputation: 15
Alzheimer mind

Quote:
Originally Posted by pixellany View Post
Let's take it one step at a time.....

Install Ubuntu and select the option for no bootloader.
Reboot into Fedora, and edit menu.lst to add an entry for Ubuntu.

You can edit the file with any text editor (not word processor). I prefer "nano", but you can also use something like gedit.
Example:
su (to become root)
gedit /boot/grub/menu.lst

I like to set softlinks for the various distros so that I can make all menu.lst entries the same, eg
title whatever
root (hdx,y) (The location of /boot/grub)
kernel /boot/vmlinuz root=/dev/sdAB (the location of /)
initrd /boot/initrd

Note that--eg--hd0,0 in grubspeak is the same as sda1
hd0,1 = sda2
hd1,0 = sdb1
hd0 = sda
.
.
etc.

To make the soft link, go into /boot/grub and do "ln -s vmlinuzstuff vmlinuz", where "vmlinuzstuff" is the specific kernel you want to boot. Similar command to make softlink for initrd.

My "booting" link will give all the details on how to do this.
I am an insomniac , this morning at 2 am I loaded Ubuntu 8.04 in the desktop with fedora on it. It loaded ok all the way and asked for a reboot. When I did I was received with the message "error loading OS". Then it hit me !! when I loaded FEDORA I did not put grub on the mbr
I am guessing that that is what caused the error. I search the site to see if there was a quick solution easy for a newbie but close to 3 am , half asleep I understood nothing of what I was reading. So I decided to install Ubuntu once more with grub in the mbr rebooted and now ubuntu is working ok ( I know that now I have space of the disc occupied by the first installation but I gues that I can delete that later). I imagine thAT NOW i HAVE TO EDIT THE menu.list i Ubuntu to make it boot onto fedora.I was trying to boot as root but in ubuntu it does not gives me that option I can only open the terminal on desktop(as you can see) I was trying to provide 'fdisk-l' ( which I was asked for in the other thread I was doing and thought it will be needed here too. Reading your post once more Itried to lug using "su" and got this (and I used a very easy to remember password , nothing complex no numbers and letters because I am the only one who uses this and by the way when I try to change the date and hour it accept the password I use the same to log in and for everything)
herbert@herbert-desktop:~$ su
Password:
su: Authentication failure
herbert@herbert-desktop:~$


When I go to terminal and type cd/boot/grun and the menu.lst I get the following
herbert@herbert-desktop:/boot/grub$ cat menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=fcc8c971-4dbd-4800-9b38-9e410eef4bb0 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,5)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 8.04, kernel 2.6.24-18-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.24-18-generic root=UUID=fcc8c971-4dbd-4800-9b38-9e410eef4bb0 ro quiet splash
initrd /boot/initrd.img-2.6.24-18-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-18-generic (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.24-18-generic root=UUID=fcc8c971-4dbd-4800-9b38-9e410eef4bb0 ro single
initrd /boot/initrd.img-2.6.24-18-generic

title Ubuntu 8.04, kernel 2.6.24-16-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=fcc8c971-4dbd-4800-9b38-9e410eef4bb0 ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=fcc8c971-4dbd-4800-9b38-9e410eef4bb0 ro single
initrd /boot/initrd.img-2.6.24-16-generic

title Ubuntu 8.04, memtest86+
root (hd0,5)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title Ubuntu 8.04 (8.04) (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-16-generic root=/dev/sda1
initrd /boot/initrd.img-2.6.24-16-generic
savedefault
boot

herbert@herbert-desktop:/boot/grub$

Last edited by liamkincaid25; 06-13-2008 at 08:27 AM.
 
Old 06-13-2008, 11:10 AM   #8
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,094

Rep: Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809
You have Ubuntu installed on (hd0,4) with kernel 'vmlinuz-2.6.24-18-generic' as well as on (hd0,0) with kernel vmlinuz-2.6.24-16-generic.

You need to add an entry for Fedora to the Ubuntu /boot/grub/menu.lst file.

Running as root in Ubuntu is done by using 'sudo' rather than 'su'. Type sudo at the command line, enter your user password and then type: fdisk -l to get the output and post it and someone here will be able to help with the next step. The partition you have Fedora on is needed to give specific instructions.
 
Old 06-13-2008, 08:41 PM   #9
liamkincaid25
Member
 
Registered: Apr 2002
Location: puerto rico
Posts: 70

Original Poster
Rep: Reputation: 15
Post Am I stupid?

I go to the terminal and try to log as root but I am unable. THis is all that I can get
herbert@herbert-desktop:~$ sudo
usage: sudo -h | -K | -k | -L | -l | -V | -v
usage: sudo [-bEHPS] [-p prompt] [-u username|#uid] [VAR=value]
{-i | -s | <command>}
usage: sudo -e [-S] [-p prompt] [-u username|#uid] file ...
herbert@herbert-desktop:~$ su
Password:
su: Authentication failure
herbert@herbert-desktop:~$ su herbert
Password:
herbert@herbert-desktop:~$ fdisk -l
herbert@herbert-desktop:~$

I can not log as root I tried su and sudo maybe I am using the wrong commands?
 
Old 06-14-2008, 09:27 AM   #10
liamkincaid25
Member
 
Registered: Apr 2002
Location: puerto rico
Posts: 70

Original Poster
Rep: Reputation: 15
Post After looking hard I got it

This is the fdisk info
herbert@herbert-desktop:~$ sudo su
[sudo] password for herbert:
root@herbert-desktop:/home/herbert# fdisk -l

Disk /dev/sda: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000cf95b

Device Boot Start End Blocks Id System
/dev/sda1 * 1 350 2811343+ 83 Linux
/dev/sda2 351 4863 36250672+ 5 Extended
/dev/sda5 4659 4863 1646631 82 Linux swap / Solaris
/dev/sda6 351 4475 33133999+ 83 Linux
/dev/sda7 4476 4658 1469916 82 Linux swap / Solaris

Partition table entries are not in disk order

From the post I thought to log as root was using sudo or su only it turns out to be sudo su
 
Old 06-14-2008, 01:51 PM   #11
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,094

Rep: Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809
Generally logging in as root user in Ubuntu is done by using the 'sudo' command. Don't use Ubuntu very much so not sure why it did not work for you. You have Linux installed on sda1 and sda6 so if Ubuntu is on sda1 Fedora should be on sda6. Your menu.lst output shows two stanzas for Ubuntu, both sda1 (hd0,0) and sda6 (hdo,5). One of these should be Fedora.
With root privileges do:

mkdir /mnt/fedora
mount -t ext3 /dev/sda6 /mnt/fedora
cd /mnt/fedora/boot/grub/
ls -l

If this is Fedora you should have the grub.conf file here with the entry you need to put in the Ubuntu menu.lst to boot Fedora.
 
Old 06-15-2008, 02:15 AM   #12
liamkincaid25
Member
 
Registered: Apr 2002
Location: puerto rico
Posts: 70

Original Poster
Rep: Reputation: 15
Got this

Quote:
Originally Posted by yancek View Post
Generally logging in as root user in Ubuntu is done by using the 'sudo' command. Don't use Ubuntu very much so not sure why it did not work for you. You have Linux installed on sda1 and sda6 so if Ubuntu is on sda1 Fedora should be on sda6. Your menu.lst output shows two stanzas for Ubuntu, both sda1 (hd0,0) and sda6 (hdo,5). One of these should be Fedora.
With root privileges do:

mkdir /mnt/fedora
mount -t ext3 /dev/sda6 /mnt/fedora
cd /mnt/fedora/boot/grub/
ls -l

If this is Fedora you should have the grub.conf file here with the entry you need to put in the Ubuntu menu.lst to boot Fedora.
I got this after doing your steps

herbert@herbert-desktop:~$ sudo su
[sudo] password for herbert:
root@herbert-desktop:/home/herbert# mkdir /mnt/fedora
mkdir: cannot create directory `/mnt/fedora': File exists
root@herbert-desktop:/home/herbert# mount -t ext3 /dev/sda6 /mnt/fedora
root@herbert-desktop:/home/herbert# cd /mnt/fedora/boot/grub/
root@herbert-desktop:/mnt/fedora/boot/grub# ls -l
total 204
-rw-r--r-- 1 root 999 197 2008-06-13 04:04 default
-rw-r--r-- 1 root 999 15 2008-06-13 04:04 device.map
-rw-r--r-- 1 root 999 8056 2008-06-13 04:04 e2fs_stage1_5
-rw-r--r-- 1 root 999 7904 2008-06-13 04:04 fat_stage1_5
-rw-r--r-- 1 root 999 16 2008-06-13 04:04 installed-version
-rw-r--r-- 1 root 999 8608 2008-06-13 04:04 jfs_stage1_5
-rw-r--r-- 1 root root 5099 2008-06-13 05:19 menu.lst
-rw-r--r-- 1 root root 4671 2008-06-13 05:19 menu.lst~
-rw-r--r-- 1 root 999 7324 2008-06-13 04:04 minix_stage1_5
-rw-r--r-- 1 root 999 9632 2008-06-13 04:04 reiserfs_stage1_5
-rw-r--r-- 1 root 999 512 2008-06-13 04:04 stage1
-rw-r--r-- 1 root 999 108356 2008-06-13 04:04 stage2
-rw-r--r-- 1 root 999 9276 2008-06-13 04:04 xfs_stage1_5
root@herbert-desktop:/mnt/fedora/boot/grub#

I am trying to make sense of this but Have no idea of what I am looking at.
 
Old 06-15-2008, 10:15 AM   #13
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,094

Rep: Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809
Results of the commands I gave you listed in your last post looks like sda6 is Ubuntu. Fedora does not use 'menu.lst' but 'grub.conf' for the boot menu. If you don't have sda6 mounted do that:

mount -t ext3 /dev/sda6 /mnt/fedora

Then run these commands:
cd /mnt/fedora/boot/grub/
cat installed-version

This will tell you the version and whether it is Ubuntu. If it shows Ubuntu, try the previous commands I suggested substituting sda1 where you had sda6.

mount -t ext3 /dev/sda1 /mnt/fedora
cd /mnt/fedora/boot/grub/
/mnt/fedora/boot/grub# ls -l

You should see a file 'grub.conf' here if it is Fedora with the Fedora stanzas in the file.
If you have no 'grub.con' file it's not Fedora. If you have an 'installed-version' file check it to see what it is.
 
  


Reply

Tags
boot, double, fedora, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot Fedora 7 + Ubuntu Feisty yusuo Linux - Distributions 7 07-07-2007 07:46 AM
Ubuntu double page VWandSTUDEBAKER Linux - General 1 03-06-2007 01:33 AM
Dual boot Ubuntu and fedora core 6 bzeecongas Linux - Newbie 13 01-07-2007 01:01 AM
tri boot windows, ubuntu, and fedora 5 paintmaster Linux - General 12 09-30-2006 07:04 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration