LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-07-2005, 11:27 PM   #1
SlackwareInAZ
Member
 
Registered: Apr 2005
Posts: 55

Rep: Reputation: 15
Can't configure Lilo to boot multiple Linux partitions


Can't seem to figure out how to get lilo to boot multiple linux operating systems.

Have 80Gb harddrive with 10gb primary partition hda1 formatted NTFS for WinXP SP2
extended partition for remaining 70gb of hard drive.

inside the extended partition have three logical partitions.
First is hda5 formatted with Reiser4 for Slackware 10.1 current
second is hda6 formatted with Reiser4 for Arch 0.7
third is hda7 formatted NTFS for WinXP backup

If I use lilo installed into the mbr I can boot WinXP, Slackware, or Arch. The problem is when Arch boots it is actually using the kernel inside the /boot folder from slackware installed in hda5.

Can't get lilo to boot Arch from it's own kernel inside /boot on hda6. When I installed lilo using lilo -v while running Slackware I had the Arch hda6 partition mounted on /hda6 so that lilo could see the kernel. Both linux systems use 2.6.12.5 kernels. In slackware I have a symlink to vmlinuz-2.6.12.5 called vmlinuz. In arch I just labeled the kernel vmlinuz-2.6.12.5

Here is my /etc/lilo.conf:

boot=/dev/hda
vga=771
prompt
timeout = 50

other = /dev/hda1
label = WinXP_SP2
table = /dev/hda

image = /boot/vmlinuz
root = /dev/hda5
label = Slackware
read-only

image = /boot/vmlinuz-2.6.12.5
root = /dev/hda6
label = Arch
read-only

If I use Grub 0.97 patched for reiser4, I can boot into both linux OS's using the proper kernels
with this menu.lst inside /boot/grub on the Slackware hda5 partition:

timeout 5
default 0

title WinXP SP2
root noverify (hd0,0)
makeactive
chainloader +1

title Slackware
root (hd0,4)
kernel /boot/vmlinuz root=/dev/hda5 vga=771 ro

title Arch
root (hd0,5)
kernel /boot/vmlinuz-2.6.12.5 root=/dev/hda6 vga=771 ro

As everything works fine with Grub, it is mostly a matter of curiosity whether lilo can boot using the proper kernel from the respective operating system. I know that I could put the arch kernel and system.map file inside the slackware /boot folder, but am I misconfiguring the lilo.conf or does lilo not have this native capability as does Grub?

Thanks for any assistance,
Gary
 
Old 09-07-2005, 11:35 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
The image= lines in lilo are relative to the booted system. If you booted arch and rewrote lilo from that config, I bet you'd find slack booting with arch's kernel!

While I use lilo myself, this may be one of those situations where grub excels.
 
Old 09-07-2005, 11:45 PM   #3
SlackwareInAZ
Member
 
Registered: Apr 2005
Posts: 55

Original Poster
Rep: Reputation: 15
Matir,

I'd be willing to bet money you're right, concerning how the kernel selected depends on which system you install lilo from.

So is that the inherent limitation of lilo--that is it only works right for one linux system? I thought that from a purely functional standpoint as lilo does not depend on the files needed inside /boot/grub that it was the better loader to use, but I guess not in my case.

Live and learn!!

I guess Grub it is.

Gary
 
Old 09-07-2005, 11:50 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Well, I believe you could mount your arch partition under /mnt/arch or similar, and then point lilo to image=/mnt/arch/boot/....

I'm not sure that would work, but I do know many people have managed to make lilo boot multiple distributions.
 
Old 09-07-2005, 11:56 PM   #5
SlackwareInAZ
Member
 
Registered: Apr 2005
Posts: 55

Original Poster
Rep: Reputation: 15
Matir,

I think I tried that trick previously, but lilo -v returns an error using that configuration for the image patch to vmlinuz.

I bet people running multiple linux os's using lilo never checked the booted kernel using uname -ra.

Just a guess.

Gary
 
Old 09-07-2005, 11:58 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Maybe. Or maybe they use a common /boot partition, but with like /boot/kernel-arch-2.4.31 and /boot/kernel-slack-2.4.31 or something?
 
Old 09-08-2005, 03:59 AM   #7
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Rep: Reputation: 30
This is my /etc/lilo.conf for booting XP plus two linux partitions with no discernible problems: (I keep my old Slack running until I am sure the new one is OK, as I have to install special modem and dri drivers for my laptop)

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
append="hdc=ide-scsi"
boot = /dev/hda
# compact # faster, but won't work on all systems.
prompt
timeout = 50
# bitmap=/boot/logo64a.bmp
# bitmap=/usr/doc/lilo-22.5.9/sample/ins64a.bmp
# Normal VGA console
vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0 # paranoia setting
# End LILO global section

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda6
label = Slack-10
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda9
label = Slack-9.1
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends

# Windows bootable partition config begins
other = /dev/hda1
label = Win-XP
table = /dev/hda
# Windows bootable partition config ends

----------------------------------------------

As was suggested by Matir I have my Slack-9.1 partition mounted in its own folder in Slack 10 and vice-versa. Each has its own /boot and /etc/lilo.conf configurations. Slack-9.1 /etc/lilo.conf is the same as above.

Can't remember how I initially set it up, but here it is. (Used Mandrake before and I think I just tweaked the Mandrake lilo.conf after installing Slack-9.1 onto a new partition. Had help from some forum - can't remember which.

PS Yes it does run the right kernel. I presume that on booting it simply opens the relevant /dev/hdax and looks for /boot.

PPS It is installed not in the MBR if that makes a difference.

John
 
Old 09-08-2005, 04:57 AM   #8
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Just out of interest I've never been able to get mandrake and slackware both running properly on the same disk. Mainly because the global options that mandriva sets up dont work for slackware. At least I assume that's why . I suppose what I need to do is put any info from the global section in the mandriva part of lilo. The only thing is different distros need different parameters, like hdd=ide-scsi for slackware, which mandriva doesn't need. Maybe that's been my problem.
 
Old 09-08-2005, 07:12 AM   #9
WilliamS
Member
 
Registered: Nov 2003
Location: 46N 76W
Distribution: Slackware 14.1
Posts: 380

Rep: Reputation: 31
In mbr is slackware 10.1 lilo.
This is how I triple boot, win98 and mandrake 10.1:

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda1
label = Slackware10.1
read-only
image = /mnt/mdk//boot/vmlinuz-2.6.8.1-12mdk
label = Mandrake10.1
root = /dev/hdb5
initrd = /mnt/mdk//boot/initrd-2.6.8.1-12mdk.img
append = "devfs=nomount"
read-only
# Linux bootable partition config ends
# Windows bootable partition config begins
other = /dev/hdb1
label = win98
table = /dev/hdb
map-drive = 0x80
to = 0x81
map-drive = 0x81
to = 0x80
# Windows bootable partition ends

The image and initrd in mandrake boot are needed to boot a different (2.6) kernel, as I'm using 2.4 in slack.
 
Old 09-08-2005, 08:40 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
There exists a simpler solution --- chain-loading.

Instead of calling the kernel up for each distro just boot it using the same two lines as booting a Windows

other=/dev/hda5
label=Slackware

other=/dev/hda6
label=arch

In order for chain-loading to work the target system must has a boot loader inside its root partition. This is accomplished while inside the Linux (assumed in hda5 say) replicate its boot loader by

lilo -b /dev/hda5

etc for Lilo. If the Linux uses Grub the corresponding command is

grub-install /dev/hda5

You need to do it inside every Linux you want to boot. This can be done by "chroot" to it from another Linux. For Lilo it should return with a message to confirm if the operation suceesfull or not.

This is the methods I boot 45+ system in the box.

Lilo can only boot up to 15 but Grub can do much more. The commands to chain load a system (irrespective of a DOS, Win3x/Win9x, Win2k/XP, *bsd, Solaris or any Linxu) in Grub are just

title this is my Linux in disk i partition j (Grub counts from 0)
root (hdi,j)
chainloader +1

One only need addressing the kernel directly if the distro is installed beyond the 137Gb barrier where most of the Lilo and Grub versions cannot suvive there and therefore not chain-loadable.

Also it is recommended any Linux user having a booting problem to make a bootable Grub floppy (documented in Grub Manual-reached by Google). That humbe floppy can boot any system manually with these 3 lines

root (hdi,j)
chainloader +1
boot

Again a boot loader is required at the root partition of partition to be boot.
 
Old 09-09-2005, 09:45 PM   #11
SlackwareInAZ
Member
 
Registered: Apr 2005
Posts: 55

Original Poster
Rep: Reputation: 15
Matir,

Finally tried your suggestion.

Altered the image path for Arch in lilo.conf. As Arch is installed on hda6 (with Slackware on hda5) I changed the Arch image patch from image = /boot/vmlinuz to /hda6/boot/vmlinuz (mounted Arch on /hda6 directory).

Made sure I had Arch mounted while running Slackware, used lilo -v, and sure enough lilo installed without any errors. Worked on reboot. Each linux os uses it's own kernel and modules.

I think I still prefer Grub, but it's nice to know I can use Lilo for multiple linux os's if I need to.

Thanks,
Gary
 
Old 09-10-2005, 01:04 PM   #12
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Yeah, I must admit, grub has some nice features. Since I single boot this box, and i've been using lilo forever, I stick with lilo mostly.
 
  


Reply



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
what partitions(mount points) can you reuse in a multiple boot linux system? scottk88 Linux - General 5 08-01-2005 11:49 AM
Software related boot problem affecting multiple ext2 partitions sindi Linux - Software 0 11-28-2004 02:29 PM
[SOLVED] lilo boot of two partitions frankzen Slackware 3 10-16-2004 11:30 PM
How do I configure LILO for 2 linux partitions? MasterOfTheWind Linux - Newbie 4 08-12-2004 01:58 PM
configure lilo to use two different /boot partitions TheOneAndOnlySM Linux - Software 4 05-23-2004 08:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:51 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration