LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Double boot (fedora +ubuntu) (http://www.linuxquestions.org/questions/linux-newbie-8/double-boot-fedora-ubuntu-648783/)

liamkincaid25 06-12-2008 06:20 AM

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)

pixellany 06-12-2008 08:39 AM

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.

liamkincaid25 06-12-2008 10:12 AM

Quote:

Originally Posted by pixellany (Post 3182527)
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
?

pixellany 06-12-2008 02:44 PM

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.

yancek 06-12-2008 03:00 PM

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).

liamkincaid25 06-12-2008 05:04 PM

Fedora
 
Quote:

Originally Posted by yancek (Post 3182890)
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

liamkincaid25 06-13-2008 06:48 AM

Alzheimer mind
 
Quote:

Originally Posted by pixellany (Post 3182872)
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$

yancek 06-13-2008 10:10 AM

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.

liamkincaid25 06-13-2008 07:41 PM

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?

liamkincaid25 06-14-2008 08:27 AM

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

yancek 06-14-2008 12:51 PM

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.

liamkincaid25 06-15-2008 01:15 AM

Got this
 
Quote:

Originally Posted by yancek (Post 3184745)
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.

yancek 06-15-2008 09:15 AM

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.


All times are GMT -5. The time now is 10:14 AM.