LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 04-06-2004, 10:53 PM   #1
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Rep: Reputation: 15
Question Two distros, two hard disks - boot scheme


Well, I've been thru the man pages and howtos, googled, and searched this site... i am at a loss

My setup:

1 hard disk is HDA - this is going to have Gentoo installed onto it

1 hard disk is HDD - this has Mandrake 10.1 on it, along with my data archives

1 cd-rw is HDC and is ide-scsi

My situation:

I am preparing to install Gentoo onto the (larger) HDA drive and I have moved the Mandrake system to the HDD drive. I have updated the fstab in MDK to account for the move. I assume this will allow MDK to bring itself up if I can manage to boot the MDK kernel.

Here is the clincher:

I am hoping to install a bootloader to the MBR of HDA and somehow boot the MDK system on HDD in such a manner that I can fdisk HDA to prepare for the Gentoo installation. This means I cannot have files stored on HDA that are depended upon by the bootloader. I plan to leave the MBR untouched until after the Gentoo install is complete.

Is it possible to install, say, LILO to the MBR of HDA and have it hand off to another copy of LILO installed on HDD somewhere? I am not familiar enough with bootloader ins-and-outs to grasp (yet) what configuration options or whatnot I would need to set to make this happen.

BTW, the original copy of the MDK system is still on HDA until this gets figured out

Thanks for any help!!!!
 
Old 04-06-2004, 11:03 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
One version of the bootloader is enough (you only have one MBR), just set lilo.conf, to match the options you want, infact Gentoo might detect the Mandrake install and add it itself.

Note down the current options in the Mandrake lilo.conf, changing the disks from hda to hdd. Then install Gentoo, and add the lilo.conf info for Mandrake into the Gentoo lilo.conf

You can test the new moved system first, by doing these changes to the current lilo.conf (copy rather then replace, so you have both options to boot ), and trying to boot the copied mandrake.

remember to run /sbin/lilo when you change lilo.conf.
 
Old 04-06-2004, 11:34 PM   #3
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Original Poster
Rep: Reputation: 15
I am not quite clear what variable you wanted me to change.

My partitions are: (i just did a 'df')
Code:
Filesystem            Size  Used Avail Use% Mounted on

/dev/hda6             6.8G  143M  6.6G   3% /
/dev/hda1              51M  2.7M   48M   6% /boot
/dev/hda7             4.3G  150M  4.1G   4% /home
/dev/hda8             7.7G  2.1G  5.6G  28% /usr

/dev/hdd1             4.7G  3.9G  882M  82% /mnt/mdk
/dev/hdd8              46M  2.6M   44M   6% /mnt/mdk/boot
/dev/hdd5             2.0G  153M  1.8G   8% /mnt/mdk/home
/dev/hdd6             4.4G  2.1G  2.3G  48% /mnt/mdk/usr
/dev/hdd7             1.4G   94M  1.3G   7% /mnt/mdk/var

This is my current /etc/lilo.conf on /dev/hda6:
Code:
boot=/dev/hda
map=/boot/map
vga=normal
default="Moo"
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
disk=/dev/hdd bios=0x80
image=/boot/vmlinuz
        label="Moo"
        root=/dev/hda6
        initrd=/boot/initrd.img
        append="hdc=ide-scsi devfs=mount"
        read-only
image=/boot/vmlinuz
        label="Rescue"
        root=/dev/hda6
        initrd=/boot/initrd.img
        append="failsafe devfs=mount"
        read-only
Am i to understand that i am to create a new 'image=' entry and that would take care of it?

I am not clear as to which variables are used by /sbin/lilo to build the bootloader and which ones are needed by the bootloader at boot time.

An example being 'map=', what variables have to exist after you run /sbin/lilo?

For the life of me, i've tried to understand the docs.
But I have obviously missed some critical concept that prevents me from 'getting it'.

A bit more insight would be appreciated!!

Last edited by rabidundead; 04-06-2004 at 11:38 PM.
 
Old 04-06-2004, 11:50 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
I presume from this you run Moo for Mandrake?

So you would copy

Code:
image=/boot/vmlinuz
        label="Moo"
        root=/dev/hdd1
        initrd=/mnt/mdk/boot/initrd.img
        append="hdc=ide-scsi devfs=mount"
        read-only
Into the new lilo.conf. ( notice the change of hda ), I dont think hdd needs to be set as disk.

The other options either refer to how lilo displays, or where it should install.
 
Old 04-07-2004, 12:06 AM   #5
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by leonscape

Code:
image=/boot/vmlinuz
        ...
        ...
        initrd=/mnt/mdk/boot/initrd.img
        ...
About the above filesystem paths...

Are the files these paths refer to built into the bootloader somehow when it is installed on the MBR?

Or do these files have to exist every time you boot the machine?

This is the part that prevents me from proceeding!

if I wipe out everything on HDA using fdisk and format the partitions -- won't that break those paths.. since e.g. there will no longer be a /boot or /mnt/... on HDA?

 
Old 04-07-2004, 12:18 AM   #6
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Ahh, these are labels, they are set in the filesystem with the command e2label.

to set the new disks boot partition label too boot2 you'd type

e2label /dev/hdd8 /boot2

Don't clash labels, keep the all diffrent.

so

initrd=/boot2/initrd.img

would work for the Mandrake on hdd.
 
Old 04-07-2004, 01:11 AM   #7
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Original Poster
Rep: Reputation: 15
i got a kernel panic using the entry you proposed.. couldn't find vfs.

Hmm..

Would it not stand to reason that 'image=/boot/vmlinuz' points to a kernel image on HDA? Such a scenario would not seem feasible, since i am formatting HDA. Am I mistaken in this thinking?

Further, how would the bootloader or kernel see '/mnt/mdk/...' prior to accessing /etc/fstab and doing a 'mount -a', at which point the proper device linked to the mount point?

I don't see how this approach could work when using filesystem paths instead of device names.. especially given a situation whereby i would have *nothing* on HDA at all except the MBR containing the bootloader.

I thought there was a way to boot lilo (or maybe it was grub) from the MBR and have it 'trigger' or 'chainload' another copy of a bootloader on another disk to continue the boot process...


I read examples of how to do this with non-linux bootloaders on other disks by using a chainloader or something. But the examples seem to explicitly exclude using this method to boot another linux disk. In fact, i tried to install another lilo on HDD through a chroot'd environment and point to it from an entry in the MBR lilo - to no avail.

Am I making sense anymore?
 
Old 04-07-2004, 11:46 AM   #8
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Linux systems expect to be booted from a bootloader, so they do not need to be chainloaded.

Did you set the labels? and did you alter the lilo.conf to match?
 
Old 04-07-2004, 02:05 PM   #9
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Original Poster
Rep: Reputation: 15
Actually, all my filesystems are JFS, so i don't think the ext2fs tools will work for setting the labels. This also seems to point out that this method is dependant upon a filesystem existing on the first hard disk.. am I to assume that the bootloader is dependant upon a filesystem existing on HDA (beyond just the MBR itself)?

I may not have been very clear. I will need to be able to boot to the second hard disk in the complete absence of filesystems on the first disk. This is why i believed a solution to be on order of this scheme:

BIOS ==> LILO/MBR ==> LILO/HDD ==> KERNEL ==> ROOT

I had come across a brief reference to this sort of successive loading of LILO. The example, however, booted another copy of LILO within a different partition of the same disk. I cannot seem to get it to boot LILO accross disk bounds though.

The method used the 'other=/dev/hda1' to point to a boot sector of a particular partition (which contained a second LILO).

It would seem bootloading is also a pastime similar to banging one's head against a wall
 
Old 04-07-2004, 02:28 PM   #10
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
the LILO bootloader, does not require anything else to work. It doesn't acces anything but the kernel its about to boot.

so BIOS ==> LILO/MBR ==>KERNEL on HDD

Will work fine.
 
Old 04-07-2004, 03:12 PM   #11
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Original Poster
Rep: Reputation: 15
well, i did this:

Code:
boot=/dev/hda
map=/boot/map
vga=normal
default="Moo"
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
disk=/dev/hdd bios=0x80
image=/boot/vmlinuz
        label="Moo"
        root=/dev/hda6
        initrd=/boot/initrd.img
        append="hdc=ide-scsi devfs=mount"
        read-only
image=/boot/vmlinuz
        label="Rescue"
        root=/dev/hda6
        initrd=/boot/initrd.img
        append="failsafe devfs=mount"
        read-only
image=/mnt/mdk/boot/vmlinuz
        label="Mandrake"
        root=/dev/hdd1
        initrd=/mnt/mdk/boot/initrd.img
        append="dc=ide-scsi devfs=mount"
        read-only
and, of course, /sbin/lilo

rebooted, selected Mandrake...

and got this:

Code:
Booting MandrakeEBDA too big . . .


um, now i'm overlapping memory... either its a LILO bug or LILO is too big, since its the same kernel as the HDA boot... i wouldn't think it's the kernel... hmm.. too many images defined?

In the immortal words of Scooby Doo... "Yelp!"
 
Old 04-07-2004, 04:30 PM   #12
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
You still haven't set the labels. for a jfs file system use

Code:
jfs_tune -L /boot2 /dev/hdd8
( check the docs for your version of jfs_tune ). If you don't have jfs_tune download the jfs utils from your distro. Then

Code:
image=/boot2/vmlinuz
        label="Mandrake"
        root=/dev/hdd1
        initrd=/boot2/initrd.img
        append="dc=ide-scsi devfs=mount"
        read-only
Will get things working.
 
Old 04-07-2004, 05:28 PM   #13
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Original Poster
Rep: Reputation: 15
ok, trying it now
 
Old 04-07-2004, 05:51 PM   #14
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Original Poster
Rep: Reputation: 15
ssdd

did the label thing and made the change to lilo.conf and ran lilo... same error EBDA too big

i tried some other things and the only other error i've managed is bios 0x07 at one point... i am looking onto the bios setup at the moment..
 
Old 04-07-2004, 06:20 PM   #15
rabidundead
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Trying to get GENTOO 2004.2 INSTALLED... Weeeee!!!!
Posts: 67

Original Poster
Rep: Reputation: 15
um, looks like the bios doesn't see HDD.

PRIMARY MASTER: [size value]
PRIMARY SLAVE : [none]

SECONDARY MASTER: [CDROM]
SECONDARY SLAVE : [none]

d'olooks like i need to hand-input the geometry of the HDD disk
.. its a Western Digital 13GB that the bios couldn't see when i (way back) was fdisk'ing the hard disks to dual boot WinME/MDK7.2 ...
I had to use EZBIOS to get the BIOS to see it then... and it didn't display geometry info after EZBIOS, but it did *work*... so i don;t think i should mess with it...

grr *throws up arms* I'm at a loss now...
 
  


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
want to run 2 Linux distros and winXP from two hard disks anoopsinha Linux - General 3 03-23-2005 09:32 PM
Two hard disks better for dual boot? zigzago Linux - Hardware 5 03-18-2005 03:29 AM
dual boot xp and mandrake 10.0 on two different hard disks bmxpunk Mandriva 9 04-25-2004 09:04 AM
how to install two distros on one hard disks? piraxter Linux - Distributions 2 03-07-2003 07:34 PM
Two boot loaders in two hard disks qnguyendang Linux - General 1 02-06-2003 08:01 PM


All times are GMT -5. The time now is 03:13 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