Can't configure Lilo to boot multiple Linux partitions
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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?
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.