LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-10-2007, 09:09 AM   #1
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Rep: Reputation: 30
Chainload an OS


This is how I chainload GENTOO in my MENU.LST:
Code:
title		GENTOO
 root		(hd0,7)
 chainloader	+1
GENTOO is installed on 'hda8':
Code:
/dev/hda8 on /mnt/gentoo type reiserfs (rw,noatime,notail)
But all of a sudden it stopped working and I get an error on bootup.
 
Old 01-10-2007, 10:23 AM   #2
pusrob
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 463

Rep: Reputation: 35
Dear Ashrack!

This is how menu.lst (it is in /boot/grub/) look like in Mepis
Code:
 title Mepis
 root (hd0,7)
 kernel /boot/vmlinuz-2.6.xyz root=/dev/hda8 nomce quiet vga=791
 boot
Of course the xyz means your full kernel version (I have 2.6.15-27-686). Your kernel version can differ from mine, so search for it (the vmlinuz-2.6. file in /boot). Of course the "nomce quiet vga=791" might not work for you, becouse you have another distro. In SuSE for example the menu.lst looks like this:

Code:
 title openSuSE
 root (hd0,7)
 kernel /boot/vmlinuz-2.6.xyz vga=0x31a resume=/dev/hda7 splash=silent showopts
 initrd /boot/initrd
The point is: you cannot use the chainloader +1 command with linux, and the menu.lst isn't alwasy the same in distros.
So: I don't know how exaclty menu.lst look like in gentoo, so try googling it, or ask a gentoo using forum member.
 
Old 01-10-2007, 11:39 AM   #3
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Original Poster
Rep: Reputation: 30
Well actually I am booting from an UBUNTU GRUB which should then chainload to GENTOO GRUB. And that is why I put the CHAINLOADER +1 command. Which used to work but now it doesnt.

I copy of the whole menu.lst

Code:

# 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 change this entry to 'saved' 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		1

## 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=07a3dbbc-a412-4e1e-b572-6723431c8d97 ro
# kopt_2_6=root=/dev/hda6 ro

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

## 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=splash

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

## 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 vga=0x317

## 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

## ## End Default Options ##

title		Ubuntu, kernel 2.6.19.1-vanilla
root		(hd0,0)
kernel		/vmlinuz-2.6.19.1-vanilla root=/dev/hda6 ro splash
quiet
savedefault
boot

title		Ubuntu, kernel 2.6.19.1-vanilla (recovery mode)
root		(hd0,0)
kernel		/vmlinuz-2.6.19.1-vanilla root=/dev/hda6 ro single vga=0x317
boot

title		Ubuntu, kernel 2.6.17.13-ubuntu1-blue
root		(hd0,0)
kernel		/vmlinuz-2.6.17.13-ubuntu1-blue root=/dev/hda6 ro splash
quiet
savedefault
boot

title		Ubuntu, kernel 2.6.17.13-ubuntu1-blue (recovery mode)
root		(hd0,0)
kernel		/vmlinuz-2.6.17.13-ubuntu1-blue root=/dev/hda6 ro single vga=0x317
boot

title		Ubuntu, kernel 2.6.17-10-generic
root		(hd0,0)
kernel		/vmlinuz-2.6.17-10-generic root=/dev/hda6 ro splash
initrd		/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title		Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root		(hd0,0)
kernel		/vmlinuz-2.6.17-10-generic root=/dev/hda6 ro single vga=0x317
initrd		/initrd.img-2.6.17-10-generic
boot

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

### END DEBIAN AUTOMAGIC KERNELS LIST
 title		###OTHER OPERATING SYSTEMS###
 root		(hd0,0)

 title		GENTOO
 root		(hd0,7)
 chainloader	+1

 title		Windows XP SP2
 root		(hd0,2)
 makeactive
 chainloader	+1
 
Old 01-10-2007, 07:24 PM   #4
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
There is absolutely no reason why you can't chainload Linux distros. I have multiple distros installed, and that is exactly how I set it up. It is, I believe, the most flexible and scalable option. In fact, one of the members here (Saikee) uses GRUB to boot 145 Linux distros, using the chainloading method. See Here. I do not know where people get this idea that you can't chainload Linux.

Now, back to your problem:
1) Can you still boot into Ubuntu like normal? If so, then the problem is with Gentoo's GRUB installation.

2) If you can't get into Gentoo's GRUB, then press "c" at Ubuntu's GRUB screen. Then enter the following commands to directly boot Gentoo (tab completion will work, so use it to fill in the correct names)
Code:
root (hd0,7)
kernel /boot/vmlinuz<press tab to get the full name> root=/dev/hda6 ro
initrd /boot/initrd.img<press tab to get the full name>
boot
Hopefully, Gentoo should boot up. If it doesn't then trial and error should help . Then reinstall Gentoo's GRUB to /dev/hda6 like before, and hopefully it should all work correctly. Note that the commands that you entered above are the same that appear in the menu.lst. If you can get into Ubuntu, then mount the Gentoo root partition, and have a look at its menu.lst to make sure that I am right.

I hope this helps
--Ian
 
Old 01-12-2007, 06:19 AM   #5
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Original Poster
Rep: Reputation: 30
IBALL
Thank U! U got me the idea what was wrong. I had to recreate the GRUB in GENTOO install. Now it chainloading works again.
For others interested this is how I recreated it:
Code:
grub
grub> root (hd0,7)    (Specify where your /boot partition resides)
grub> setup (hd0,7)     (Install GRUB)
grub> quit            (Exit the GRUB shell)
 
Old 01-20-2007, 01:50 AM   #6
scribble
LQ Newbie
 
Registered: Jul 2004
Location: Perth, W.A
Distribution: Slackware Current
Posts: 17

Rep: Reputation: 0
Im hoping someone might have encountered my troubles before.

Ok i have setup my partitions on a new HDD, hda1 = where grub will go, hda2 = swap, hda3-7 = logical partitions to install other OS's. When i load grub in a terminal from an xubuntu live cd, and type root (hd0,0) i get Error 21: Selected disk does not exist. Have tried geometry (hd0) and get the same thing, it's like grub cant see my HDD.

I have 2 identical drives, set to cable select on an UltraATA IDE ribbon. I can mount the drives and edit there partion tables in xubuntu live cd but grub doesnt want to know.

Can anyone give me some pointers??





Thanks for your time!
Joel
 
Old 01-20-2007, 08:01 PM   #7
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
Just a stab in the dark - perhaps try setting the jumpers on the drive to master and slave instead of cable-select. This shouldn't work, but you never know...

Have you copied the GRUB files across to /dev/hda1 ?

I have some info on this Here.

--Ian
 
Old 01-22-2007, 01:47 AM   #8
scribble
LQ Newbie
 
Registered: Jul 2004
Location: Perth, W.A
Distribution: Slackware Current
Posts: 17

Rep: Reputation: 0
Sorry for the late reply, work sometimes gets the better of me.

I read on my hard drives to put them onto cable select so ultraATA is enabled, is this the truth? That's why i was a bit hesitant to put them on master/slave.

Also i do have the grub files copied across to the partition (hda1).

I have tried to do it the "lazy" way as described here: http://forums.pcper.com/showthread.php?t=401513

But that also doesn't work and gives me error's. Funnily enough when i installed zen linux and vector linux, on the install of vector lilo scanned and added zen to it's list. So lilo is looking better in my books at the moment

Is there a similar thing to try for GRUB?




Thanks for your time!
 
Old 01-22-2007, 02:47 AM   #9
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
GRUB should work fine. What errors are you getting?

--ian
 
Old 01-23-2007, 07:14 AM   #10
scribble
LQ Newbie
 
Registered: Jul 2004
Location: Perth, W.A
Distribution: Slackware Current
Posts: 17

Rep: Reputation: 0
Sorry cant recall off hand. But think it was an error: 21. Something about the partition.

I have moved on to try xubuntu and scraped the multiple boot idea for now. Many thanks for your help anyway!





Thanks for your time,
Joel
 
  


Reply


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



All times are GMT -5. The time now is 03:00 PM.

Main Menu
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