On Sun, Dec 08, 2002 at 11:18:28AM -0800, Dexter Graphic wrote:
> I'm trying to consolidate three different Linux systems I've got going
> (Debian 3.0, Mandrake 8.2, and RedHat 8.0) so they will all boot from
> the same harddrive using Lilo to pick which one.
> 
> Previously each distributions was on its own hard disk (which I swapped
> out when I wanted to switch distros) so they all know the same hardware.
> 
> I'm started with the Mandrake drive (because it was the biggest) and
> copied Debian onto it in a new partition. I used "cp -a <debian /> <new
> partition>". It appears that everything was copied successfully; it all
> appears to be there.
> 
> Next I configured Lilo to include the new boot option. Here is my
> lilo.conf file:
> 
> 
> boot=/dev/hda         # Where to install the Lilo bootloader.
> map=/boot/map         # I'm not sure what this does???
> # Where to copy the Lilo boot record from.
> install=/boot/boot.b          # From Mandrake 8.2
> # install=/boot/boot-menu.b   # From Debian 3.0
> vga=0x0f06
> default=Mandrake
> keytable=/boot/us.klt
> lba32         # Use Logical Block Addressing to talk to BIOS.
> prompt
> nowarn
> timeout=100           # Wait for response (in tenths of a second).
> menu-title=" Dexter's Computer Startup "
> # text:highlight:border:title
> menu-scheme=wk:Wk:wk:Wk  
> other=/dev/fd0
>       label=floppy
>       unsafe
> image=/boot/vmlinuz
>       label=Mandrake
>       root=/dev/hda1
>       initrd=/boot/initrd.img
>       append="devfs=mount hdc=ide-scsi hdd=ide-scsi"
>       read-only
> image=/boot/vmlinuz
>       label=failsafe
>       root=/dev/hda1
>       initrd=/boot/initrd.img
>       append="failsafe devfs=nomount hdd=ide-scsi"
>       read-only
> image=/boot/vmlinuz   # Actually /vmlinux but I made a symlink.
>       label=Debian
>       root=/dev/hda7
>       append="hdc=ide-scsi hdd=ide-scsi"
>       read-only
> 
> The above lilo configuration works fine for booting into Mandrake, but
> when I try to boot into Debian it gets really ugly. From what I can tell
> by reading between the error messages, it's booting the Mandrake kernel
> not the Debian version. The last message before it gives up is about the
> swap file. But then it allows me login at a console, and when I poke
> around I can see that /dev/hda7 is indeed mounted at / and all the
> Debian files are accessible.
> 
> So my questions are: 
> 1.) Is what I am trying to do possible? 
Yes, it's easy but requires requisite knowledge, which you are learning.
Once you get it going, the next time will be easier.

> 2.) What do I have to do get lilo to load the right kernel image?
Where is /boot?  Is it a separate partition or is it in mandrakes root
partition?

You can have three separate /boot folders, one on each partition.  Then
you'd setup lilo from mandrake (ie the first).  You'd make changes to
lilo only in mandrake.  You would then have only one image:
image=/boot/vmlinuz -- mandrake kernel
        options...
other=/dev/hda7   
    label=Debian
other=/dev/hda8
    label=Redhat

Other means the bootsector will be at the beginning of that partition.
You'd use other if you had a dual boot with windows, or any other
operating system.  As far as lilo is concerned you have only one linux
install (mandrake) and two "other" operating systems.  In order to get
those other partitions working, you'll need to first boot into that
partition (easy with a boot disk.  At the boot: prompt type 'linux
root=/dev/hda7', assuming linux is the name of the image.)  Then you'll
setup lilo for each of those partitions and specify boot=/dev/hda7 and
root=/dev/hda7.  Your current boot= says /dev/hda, which means at the
beginning of the drive instead of a particular partition.  This is fine
for your mandrake partition, but NOT for debian or redhat.  If you do so
for the 2nd and 3rd OS, you'll overwrite the bootsector for the drive.
You'll then have to boot off of a floppy with linux root=/dev/hda1 to
get in to mandrake, then run lilo.  Also, you won't have many options in
your debian and redhat lilos.  You don't want menus, all you are using
lilo for is to set the partition boot sector.

Another alternative is to have a separate /boot partition that all of
the distros mount and boot from.  Lilo.conf will look pretty much the
same on all three partitions.  Any changes should be copied to all three
so you can modify lilo from all three.  You'll use a standard linux
kernel.  The map and image files will be in /boot.  You'll have to
install the modules in to each distribution.  You probably want the
first method though.

> 3.) What is the map file reference for and do I need to worry about it?
For this don't worry about any specific files in /boot.  Just make sure
you have either three separate /boots as described above, or one
standard one.


Finally, the problems you are running in to with debian are in part
because you forgot a step.  This will occur with redhat as well.  You
have a debian harddrive with boot=/dev/hda or hda1 and root=/dev/hda1.
If you look in /etc/fstab you'll see something like:
# <file system> <mount point>   <type>  <options>
/dev/hda1       /               ext2fs  defaults  
/dev/hda2       none            swap    sw         

You then copied this along with all of the other files to the new drive
(/dev/hda7).  When you boot off of it, it is expecting to find the root
partition in /dev/hda1 and the swap in /dev/hda2.  Fortunately for you,
linux is smart and figures out that things are wrong.  It gives you some
error messages to let you know this.  Windows simply would not boot, and
if you had an NTFS partition you'd be screwed unless you'ved worked with
NT for a while and know it well.

So figure out your /boot strategy.  Then change the /etc/fstab entries
for both the debian and redhat drives.  This is something you'd do right
after the 'cp -a debroot /mnt/hda7' command.

One more note, the easiest method is to just use one distribution.  If
you have one foot in each of two boats, you'll never get to the other
side of the lake.  I recommend choosing one distribution and learning
with it.  As you grow you'll see its defficiencies and strengths.
You'll then have a firmer grasp as to what you want in a distribution
and that is the time to switch if need be.  I promise you, Dex, what you
learn in one distro will be applicable to the others.

Cory
_______________________________________________
Eug-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to