LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 05-03-2004, 12:36 AM   #1
Gates1026
Member
 
Registered: Sep 2003
Location: Iowa
Distribution: Slackware 9.1
Posts: 155

Rep: Reputation: 30
just installed Gentoo on separate hard drive, dual boot question


I have slack 9.1 up and running beautifully on my primary hard drive (/dev/hda). I am trying to install gentoo on my second crap hard drive (/dev/hdb), and have a question of how to dual boot the two OS's. What would I need to edit and put into my lilo.conf file on my slackware hard drive to get it to be able to point to the boot partition /dev/hdb1 and the correct kernel? Any suggestions would be very helpful
 
Old 05-03-2004, 12:45 AM   #2
mbegovic
Member
 
Registered: Nov 2003
Location: Vancouver, Canada
Distribution: Currently FC3
Posts: 342

Rep: Reputation: 30
I am dual-booting Gentoo and Slackware 9.1 at the moment. There is no problem with it. You can actually share the swap and maybe the /home partitions between the two OS's. When you get to the bootloader installation part in the Gentoo installation, go with grub and simply follow the instruction handbook. Grub is a bit easier to configure, and Gentoo instructions on it are really very thorough. I don't think it will be very hard to figure out how to add Slackware to grub.conf, but if you have problems, post it here and we'll help.
 
Old 05-03-2004, 07:34 AM   #3
drowstar
Member
 
Registered: Apr 2004
Location: Germany
Distribution: Slackware, Gentoo, Fedora
Posts: 205

Rep: Reputation: 30
Hi Gates1026,
I agree with mbegovic, it would be better to use GRUB from gentoo than lilo from slackware. I further agree that it would be best for your linux knowledge, if you figure it out for yourself.
If you dont want to, or for some reason have trouble, I have hacked together a possible grub.conf file. Don't forget to put in the correct value for your kernel. Also, try info grub.

Code:
default=0
timeout=10
title Slackware (2.6.1)
        root (hd0,0)
        kernel /kernel/location

title Gentoo (2.6.5)
        root (hd1,0)
        kernel /again/kernel/location
If you dont want to go with grub (I highly recommend doing so though), here is what you would probably need to add to lilo.conf:
Code:
image=/kernel/location
	label=Gentoo
	read-only
	root=/dev/hdb1
Dont forget to run lilo after you made these changes.

I cant be perfectly sure that this works for you. Make sure first.
I hope it helps.
- drowstar
 
Old 05-03-2004, 11:09 AM   #4
Gates1026
Member
 
Registered: Sep 2003
Location: Iowa
Distribution: Slackware 9.1
Posts: 155

Original Poster
Rep: Reputation: 30
I am trying to add it to lilo right now and see if I can hack that up, but the problem I am having is this:

my boot partition is on /dev/hdb1 for my second hard drive. When trying to add a boot option to lilo and try adding my kernel location (ex: image = /boot/kernel-2.6.5-gentoo) it says that it cannot find the path to the kernel, it is looking on /dev/hda and not /dev/hdb. How can I direct it to the correct boot partition? Here is my entry to /etc/lilo.conf....

image = /boot/kernel-2.6.5-gentoo
root = /dev/hdb3
label = Gentoo
read-only

Thanks for any help you can give me Right now I am trying to make it work from lilo b/c to get grub to fire up I will have to unplug my primary hard drive and let the secondary one boot. If you have the code that I would need for grub, I would be greatful also (but first I would like to try lilo)
 
Old 05-03-2004, 12:07 PM   #5
mbegovic
Member
 
Registered: Nov 2003
Location: Vancouver, Canada
Distribution: Currently FC3
Posts: 342

Rep: Reputation: 30
Unfortunately, I can't help you with lilo. I had trouble trying to get something like that to work in Slackware lilo. It just never gave me the Gentoo option at boot. You don't need to unplug your primary drive in order to set up grub. You just need to boot into Slackware go:
Code:
mkdir /mnt/gentoo
mount /dev/hdb3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/whatever /mnt/gentoo/boot
cd /mnt/gentoo/boot/grub
grub
      > setup(hd0)
      > root(hd1,2)
      > quit
Then simply add what drowstar wrote for you.
 
Old 05-03-2004, 12:26 PM   #6
mbegovic
Member
 
Registered: Nov 2003
Location: Vancouver, Canada
Distribution: Currently FC3
Posts: 342

Rep: Reputation: 30
Sorry, just checked and my syntax was wrong. It should be:
Code:
> root (hd1,2)
> setup (hd0)
>quit
 
Old 05-03-2004, 12:28 PM   #7
Gates1026
Member
 
Registered: Sep 2003
Location: Iowa
Distribution: Slackware 9.1
Posts: 155

Original Poster
Rep: Reputation: 30
Ok I tried your advice, but I dont think I know grub well enough to make this work by myself Here is my grub.conf file. I then switched the boot order of my hard drives so that the secondary hard drive holding gentoo would boot first. It said that it was loading grub but then just went to a blank screen and did nothing. Here is my grub.conf file:

timeout 30
# By default, boot the first entry.
default 0
# Fallback to the second entry.
fallback 1

splashimage=(hd1,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.5
root (hd1,0)
kernel /kernel-2.6.5-gentoo root=/dev/hdb3

title=Slackware 9.1
root (hd0,0)
kernel /boot/vmlinuz-ide-2.4.26

Does this look correct?
 
Old 05-03-2004, 02:22 PM   #8
mbegovic
Member
 
Registered: Nov 2003
Location: Vancouver, Canada
Distribution: Currently FC3
Posts: 342

Rep: Reputation: 30
You'll have to wait 'till I get home, and see how I have it set up there. Grub's aming scheme for partitions is as follows:

hda1 = h0,0
hda2 = h0,1
hdb1 = h1,0
hdb2 = h1,1

And so on. If your Gentoo system is on hdb3, as you stated somewhere above, then you should have h1,2 for root in grub.conf.

You could also add this line below default 0:

splashimage=(hd0,0)/grub/splash.xpm.gz

Also, you need to add this below the kernel line for Gentoo:

initrd /initrd-2.6.5-gentoo (only check the name of the file on your system).

I'll check it when I get home.
 
Old 05-03-2004, 03:44 PM   #9
Gates1026
Member
 
Registered: Sep 2003
Location: Iowa
Distribution: Slackware 9.1
Posts: 155

Original Poster
Rep: Reputation: 30
First I want to say thanks for all the help......and second I want to appologize if I am a pain in the arse I am pretty linux knowledgeable but I just found one thing that I really need to learn about . I showed you the grub.conf file in a post above, I did try to start up my computer by booting from the second hard drive first (the one with gentoo) and what I got was a blank screen. When I press enter it comes up with and "error 15, file not found". This makes me think that my path is set wrong to the kernel. Here is what is under my /boot directory:

Code:
root@Ryan:/mnt/gentoo/boot# ls -l
total 3106
-rw-r--r--  1 root root  959182 May  2 22:54 System.map-2.6.5-gentoo
lrwxrwxrwx  1 root root       1 May  2 19:48 boot -> .
-rw-r--r--  1 root root   27931 May  2 22:55 config-2.6.5-gentoo
drwxr-xr-x  2 root root     560 May  3 15:35 grub
-rw-r--r--  1 root root 2185736 May  2 22:54 kernel-2.6.5-gentoo
and then the grub folder:

Code:
root@Ryan:/mnt/gentoo/boot/grub# ls -l
total 889
-rw-r--r--  1 root root  11264 May  3 00:11 e2fs_stage1_5
-rw-r--r--  1 root root  10256 May  3 00:11 fat_stage1_5
-rw-r--r--  1 root root   9248 May  3 00:11 ffs_stage1_5
-rw-r--r--  1 root root    328 May  3 15:26 grub.conf
-rw-r--r--  1 root root   1495 May  3 00:11 grub.conf.sample
-rw-r--r--  1 root root  11488 May  3 00:11 jfs_stage1_5
lrwxrwxrwx  1 root root      9 May  3 00:11 menu.lst -> grub.conf
-rw-r--r--  1 root root   9632 May  3 00:11 minix_stage1_5
-rwxr-xr-x  1 root root 201636 May  3 00:11 nbgrub
-rwxr-xr-x  1 root root 202660 May  3 00:11 pxegrub
-rw-r--r--  1 root root  12896 May  3 00:11 reiserfs_stage1_5
-rw-r--r--  1 root root  33856 May  3 00:11 splash.xpm.gz
-rw-r--r--  1 root root    512 May  3 00:11 stage1
-rw-r--r--  1 root root 136972 May  3 00:11 stage2
-rwxr-xr-x  1 root root 201732 May  3 00:11 stage2.netboot
-rw-r--r--  1 root root   8896 May  3 00:11 vstafs_stage1_5
-rw-r--r--  1 root root  12840 May  3 00:11 xfs_stage1_5
I dont know why the boot splash screen is not showing, the file is there? Also I dont have the file initrd /initrd-2.6.5-gentoo you were talking about. did I miss a step or not copy a file that I needed to?

Thanks so much for your patience and all your help!
 
Old 05-03-2004, 07:05 PM   #10
mbegovic
Member
 
Registered: Nov 2003
Location: Vancouver, Canada
Distribution: Currently FC3
Posts: 342

Rep: Reputation: 30
Three things:
(1) You should have the initrd if you followed the Gentoo installation instructions to the letter. I'm not sure how come you don't have it, and I don't think the Gentoo system can boot without the init image.
(2) Other than that, the only thing that could be wrong in your grub setup are the partitions. Could you check the partitions in grub against the partition layout in /etc/fstab?
(3) I'm not to sure about this, but you may have to pass the root=/dev/hda1 parameter to the kernel line for Slackware. You probably also pass the read-only parameter to it.

That's all I can see here. Let me know how it goes.
 
Old 05-04-2004, 03:11 AM   #11
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
If you set the bios to boot from hdb then it becomes hd0, so this is what you should do:

set the bios to boot from hda
reinstall GRUB into the MBR of hda
Code:
GRUB> root (hd1,0)
GRUB> setup (hd0)
Initrd is not mandatory as long as ide/scsi chipset and filesytem support can be compiled in, though it can be useful when you compile a kernel for general distribution. I only use it for framebuffer bootsplash.
If your root partition isn't the same one when you compiled the kernel then you need to pass root= option, or you can modify the parameter in the kernel image using "rdev".
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best method for dual boot with dual hard drive? aidano Linux - Software 2 11-16-2006 12:04 PM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 09:34 AM
Dual boot with 2 separate hard drives and OS lfierro Linux - Newbie 8 12-11-2004 02:37 PM
Dual Boot on Separate Hard Drives? theonlylivinggo Linux - Newbie 6 02-26-2004 04:15 PM
dual boot w/ separate hard drives? aveach Linux - General 2 09-15-2003 03:33 PM


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

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