LinuxQuestions.org
Review your favorite Linux distribution.
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 01-26-2007, 03:39 AM   #1
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
How to add another Linux Distro in Lilo


hey,
I have Slackware installed with lilo on MBR of hdb. /dev/hdb2 is the Slackware root and /dev/hdb3 is swap. Just for fun (as I had it lyin around) I installed Fedora Core 6 on /dev/hdb8. I refused when the installer asked if I wanted grub as I had lilo. My question is : How do I add the FC6 to lilo?

My lilo.conf is :

Quote:
# Linux bootable partition config begins
image = /boot/vmlinuz-custom-2.6
root = /dev/hdb2
label = LinuxNew #Slackware
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
append ="apm=off acpi=on acpi=power-off"
# Linux bootable partition config ends
#the part below is wat I added , copying from above.
image=/boot/vmlinuz
root = /dev/hdb8
label = FedoraCore6
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
But this doesn't work. /sbin/lilo installs lilo correctly but when I restart and select FC6 it shows something a lot like Slackware and then restarts! Any ideas?

Thanks,
dUrYodhan
 
Old 01-26-2007, 04:06 AM   #2
The Headacher
Member
 
Registered: Jan 2007
Distribution: Vector Linux
Posts: 90

Rep: Reputation: 15
You'll want to copy fedora's vmlinuz and put that in /boot/tamu/vmlinuz-fedora or something like that, and edit your lilo.conf accordingly. Right now, you're using the slack kernel to boot fedora.

[edit]
I'm not sure Slackware uses /boot/tamu, but my distro is derived from Slackware and uses that.
[/edit]

Last edited by The Headacher; 01-26-2007 at 04:08 AM.
 
Old 01-26-2007, 04:19 AM   #3
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
You might be (other poster says you are) beginning to load Slack 2.4 kernel.

I *suspect* you need to

can? point to:

image=/dev/hdb8/whatever_kernel

no, I guess not. needs to be mounted as in /boot is mounted

FWIW (2 of 2.6 kernels), not dual OS's to boot:

al@AB60R:~$ cat /etc/lilo.conf
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# append="hdd=ide-scsi"
boot = /dev/sda
message = /boot/boot_message.txt
prompt
timeout = 50
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
<snipped>
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz-sl_ac-2.6.16.20
root = /dev/sda3
label = nx_ac26_16_20
read-only
image = /boot/vmlinuz-generic-2.6.16.16
initrd = /boot/initrd.gz
root = /dev/sda3
label = nx26_16_16
read-only
# Linux bootable partition config ends
al@AB60R:~$
 
Old 01-26-2007, 05:40 AM   #4
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
So I just copy /dev/hdb8/boot/vmlinuz-2.6.18-1.2798.fc6xen to my Slack /boot and then change lilo appropriately?
 
Old 01-26-2007, 06:28 AM   #5
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
I think you just need the correct path. If the root = is /dev/hdb8, then the image = is /boot/vmlinuz-2.6.18-1.2798.fc6xen. I don't think you need to give the partition again. You shouldn't need to copy anything to Slack /boot. Fedora and Slackware should be completely seperate. You just need to tell lilo the correct paths for the kernel image. So:

# Linux bootable partition config begins
image = /boot/vmlinuz-custom-2.6
root = /dev/hdb2
label = Slackware
read-only
append ="apm=off acpi=on acpi=power-off"

image= /boot/vmlinuz-2.6.18-1.2798.fc6xen
root = /dev/hdb8
label = FedoraCore6
read-only
# Linux bootable partition config ends

Two points. First, the append="acpi=off" stuff can go at the top of lilo.conf in the global section, if you want it for all your kernels.

Second, after you've made the above changes to lilo.conf, you must mount /dev/hdb8 before running lilo, otherwise it won't be able to see it.
 
Old 01-26-2007, 06:33 AM   #6
cmk77
Member
 
Registered: May 2006
Location: netherlands
Distribution: slackware, centos, scientificlinux
Posts: 119

Rep: Reputation: 24
I find it much easier to use grub for multiple distro's (I have four on my home box). You install it only once, each time you add a distro all you have to do is edit the menu.lst by adding something like:

title Newdistro
root (hd1,7)
kernel /vmlinuz root=/dev/hdb8

You don't need to rerun grub or anything, even if you change the kernel.
 
Old 01-26-2007, 06:48 AM   #7
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
That is a choice ... but the thing is I don't knw how to use Grub. Right now, I could chroot to the FC6 root and then install it.If you could just tell me the commands I need to make from commandline to install grub, it would be a great help. Please tell me first how to put Slackware and then FC6 (in grub menu). Cos I don't want to miss my Slackware install!
 
Old 01-26-2007, 06:59 AM   #8
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
SimcOx : That didn't work, It says /boot/vmlinuz-...-fc6xen not found.
 
Old 01-26-2007, 07:10 AM   #9
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
So Fedora core 6 is installed on /dev/hdb8, and in the fedora /boot directory you have a kernel called vmlinuz-2.6.18-1.2798.fc6xen? Assuming that is correct, did you first mount /dev/hdb8 before running /sbin/lilo? I'm assuming also that you're doing this from your Slackware install.
 
Old 01-26-2007, 07:18 AM   #10
cmk77
Member
 
Registered: May 2006
Location: netherlands
Distribution: slackware, centos, scientificlinux
Posts: 119

Rep: Reputation: 24
There are many grub tutorials here on linux questions:

http://www.linuxquestions.org/linux/...p_Grub_by_hand

http://www.linuxquestions.org/linux/...ROUBLE_SHOOTER

I think its worth learning.
 
Old 01-26-2007, 07:20 AM   #11
The Headacher
Member
 
Registered: Jan 2007
Distribution: Vector Linux
Posts: 90

Rep: Reputation: 15
I told you how to do it... The Fedora vmlinuz has to be on the same partition that you boot your Slackware from AFAIK.
 
Old 01-26-2007, 09:16 AM   #12
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
simcox : Yeah , I tried doing that .... it was mounted on /win_in (some random directory I had) and then I did lilo. It didn't work ... it couldn't find /boot/vmlin...FC6

Headacher:That doesn't work either .. gives :
Quote:
Fatal: Setup length exceeds 31 maximum; kernel setup will overwrite boot loader
cmk77 : don't mind but I will try for lilo first ... its my first Boot Loader ... won't like to leave it so easily.

Last edited by duryodhan; 01-26-2007 at 09:19 AM.
 
Old 01-26-2007, 11:15 AM   #13
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
cmk77 : installing grub by chrooting doesn't seem to work. I did
Quote:
#>chroot /win_in
#> grub
then
Quote:
grub> root (hd1,8) #to keep root on /dev/hdb8
and it gives error : device doesn't exist!
 
Old 01-26-2007, 12:51 PM   #14
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 801

Rep: Reputation: 247Reputation: 247Reputation: 247
Here is the difference between GRUB and LILO.
GRUB performs filesystem interpretation at boot time so the information in the configuration file has to reflect the way GRUB will see things at boot time.

LILO performs filesystem interpretation at install time (when you run the lilo command). Everything that you tell LILO about file paths has to be from the perspective of the currently booted system.

To boot from a second operating system you first have to mount that operating system's filesystem. The currently booted system has to be able to understand the filesystem (have that filesystem in the kernel or a loaded module). Suppose you mounted the Fedora system on /mnt/fedora.

Code:
mount -t ext3 /dev/hdb8 /mnt/fedora
To install lilo and boot that operating system you would use this entry for "lilo.conf".

Code:
image = /mnt/fedora/boot/vmlinuz-2.6.18-1.2798.fc6xen
root = /dev/hdb8
label = FedoraCore6
read-only
Here is the confusing thing. The "root =" option is passed to Linux at boot time, and should be from the perspective of the system being booted, not the currently booted system. LILO doesn't actually use the information from "root =" to find the kernel.

LILO finds the location of the kernel by checking which filesystem contains the "image =" file and where that is mounted. LILO uses that information to find the correct BIOS drive ID for the drive to put in the boot sector information used to load the kernel. It doesn't matter if the device name is different between the two operating systems (installing LILO versus being booted). LILO uses the BIOS to load the kernel and so it uses a drive ID not a Linux device name.

So the "image =" line should always be based on the system installing lilo (where the lilo command is used). Whatever file you refer to in that line also has to be accessible (EG on a mounted filesystem).

A nicety that I've seen some people use is to put two backslashes where the "real" root will be at boot time.

Code:
image = /mnt/fedora//boot/vmlinuz-2.6.18-1.2798.fc6xen
In some cases LILO doesn't correctly determine the BIOS drive ID. In that case you have to specify the correct BIOS drive ID for the disk device used to access the image while installing lilo. The system that you are booting may use a completely different disk device name, which is not important (except in root=).

Code:
disk = /dev/hdc bios=0x80
...
root = /dev/hda
In the above example, the second OS to be booted is currently mounted on device "/dev/hdc" which probably has BIOS drive ID 0x82 at the moment. When the second OS is actually booted, the BIOS drive ID for that disk will be 0x80. The operating system being booted will see that disk drive as device "/dev/hda". This is a possible scenario when you swap the Primary and Secondary controller IDE controller addresses to choose which one is booted.

The "disk =" line is confusing because the device name is from the perspective of what is booted NOW. And the BIOS ID is from the perspective of what will be booted LATER. The other options either apply entirely to NOW (image=) or entirely to LATER (root=).

I prefer to use GRUB mainly because I like to create a boot sector file for Windows XP and don't want to change it every time I change my boot configuration. I also find GRUB less confusing because it reads the configuration file at boot time, not at install time.

Last edited by Erik_FL; 01-26-2007 at 01:09 PM.
 
Old 01-26-2007, 01:03 PM   #15
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
Thanks a lot Eric.
I did as you said ...
But lilo still gives error ..
Quote:
Added Slackware *
Fatal: Setup length exceeds 31 maximum; kernel setup will overwrite boot loader
my lilo.conf:
Quote:
image = /boot/vmlinuz-custom-2.6
root = /dev/hdb2
label = Slackware
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
append ="apm=off acpi=on acpi=power-off"
# Linux bootable partition config ends
image=/win_installs/boot/vmlinuz-2.6.18-1.2798.fc6xen
root = /dev/hdb8
label = FedoraCore6
read-only
And contents of Fedora boot directory:
Quote:
System.map-2.6.18-1.2798.fc6xen
initrd-2.6.18-1.2798.fc6xen.img
vmlinuz-2.6.18-1.2798.fc6xen
config-2.6.18-1.2798.fc6xen
symvers-2.6.18-1.2798.fc6xen.gz
xen-syms-2.6.18-1.2798.fc6*
grub/
xen.gz-2.6.18-1.2798.fc6

Last edited by duryodhan; 01-26-2007 at 01:04 PM.
 
  


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
LILO in Linux Distro dolphs Linux - General 5 02-26-2006 03:59 PM
GRUB or LILO won't boot linux!!! for ANY distro stelmate Linux - Hardware 12 05-27-2005 07:42 PM
appending grub - add other linux distro machiner Fedora 2 10-10-2004 03:38 PM
how to add windows to lilo? mrgrieves Linux - Software 9 06-27-2004 03:09 PM
How to add LILO to existing Linux? Freederick Linux - Newbie 9 03-28-2004 06:05 PM


All times are GMT -5. The time now is 01:22 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration