LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 05-24-2004, 02:39 PM   #1
unholy
Member
 
Registered: Sep 2003
Location: Eire
Distribution: Ubuntu 7.10
Posts: 344

Rep: Reputation: 30
Lilo to boot OS that uses grub by default


I want to use lilo to boot an OS that uses grub as default.

The reason for this is that I want to dual boot Mandrake (grub) and DamnSmallLinux (lilo). DSL will be putting lilo in the MBR.

Mandrake currrntly has Grub in the MBR, and I have the grub.conf file, but have no idea how to convert one to the other.

Can anyone help?

Thanks in advance,

unholy
 
Old 05-24-2004, 05:35 PM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Can you post your lilo.conf and your grub.conf here. It would help a lot. I am not familiar with lilo, but know a lot about grub. Probably there is a pattern you should follow in both. Just post them here and we'll work from there on.

Peace!
 
Old 05-30-2004, 06:31 AM   #3
unholy
Member
 
Registered: Sep 2003
Location: Eire
Distribution: Ubuntu 7.10
Posts: 344

Original Poster
Rep: Reputation: 30
Thanks marghorp,

Sorry for the late reply, but internet access for me isnt as good as id like!

Heres my grub.conf (menu.lst)
Code:
timeout 10
color black/cyan yellow/cyan
default 0

title linux
kernel (hd0,0)/vmlinuz root=/dev/hda5 devfs=mount acpi=ht resume=/dev/hda6 splash=silent vga=788
initrd (hd0,0)/initrd.img

title linux-nonfb
kernel (hd0,0)/vmlinuz root=/dev/hda5 devfs=mount acpi=ht resume=/dev/hda6
initrd (hd0,0)/initrd.img

title failsafe
kernel (hd0,0)/vmlinuz root=/dev/hda5 failsafe acpi=ht resume=/dev/hda6 devfs=nomount
initrd (hd0,0)/initrd.img
 
Old 05-31-2004, 03:27 AM   #4
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Well, the first thing you have to ask yourself is, Why do you want LILO and GRUB. You can just have one. Right? If you install DSL, yes it will overwrite MBR, but you can rescue MBR from mandrake, and just put in the line to your grub.conf file, that would point to the DSL, and thus you would be using grub for both LILO and GRUB are just loaders, they can do the same stuff, so why not use only one?

Examine the lines in your grub.conf file:

kernel /vmlinu....

you find the file vmlinu... in your /boot directory. And you can find the initrd.img file in your /boot directory. So there must be some pattern in DSL also. It comes from knoppix, so maybe the knoppix page would help you a little. However, there should be a vmlinuz file in DSL also. Just install DSL, and boot into DSL and find where the file is. Probably it will be in /boot directory. So all you have to do next is rescue Mandrake and install GRUB into the MBR and change grub.conf so that another entry points to DSL.

But let's work one step at a time.

Install DSL.
 
Old 06-01-2004, 10:50 AM   #5
unholy
Member
 
Registered: Sep 2003
Location: Eire
Distribution: Ubuntu 7.10
Posts: 344

Original Poster
Rep: Reputation: 30
thanks marghorp,

I guess I misphrased my original question. I only want to use grub or lilo, not both (and preferrably grub). But the actual distos use different ones, so I want to tell grub to boot DSL.

I have installed DSL and I will use the advice you have given me. Thanks a lot - and I'll let you know how I get on!

unholy
 
Old 06-05-2004, 07:01 AM   #6
unholy
Member
 
Registered: Sep 2003
Location: Eire
Distribution: Ubuntu 7.10
Posts: 344

Original Poster
Rep: Reputation: 30
I;ve had no luck so far I'm afraid marghorp. Grub gives me this error for the entry I added to grub.conf

Code:
Booting 'DSL'

kernel (hd0,4)/vmlinuz root=/dev/hda4 failsafe acpi=ht resume=/dev/hda6

Error 15: File not found

Press any key to continue...
the root folder for DSL is on hda3, while / is on hda4

There was no vmlinuz executable in /boot, so I copied it from /. Probably a bad idea

initrd is on /

Can you help?
 
Old 06-05-2004, 07:34 AM   #7
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
So you are trying to start DSL from GRUB. Boot from the DSL bootdisk and once in DSL try to find the files (vmlinuz-xxxxx and initrd-xxxx.img) These are the two files you must find. Once you know where they are, it is simple to point at them.

The entry should look like:

title DSL
root (hd0,0)
where 0 and 0 are the numbers of your harddrive and the partition on that harddrive, where DSL is on. You can get those in MDK in console if you type as root: fdisk -l
kernel /vmlinuz-xxxx ro root=/dev/hda1
where vmlinuz-xxxx is the name of the file you found and /dev/hda1 is the name of your harddrive and the partition that DSL is on
initrd /initrd-xxxxx.img
This is optional, DSL should boot even without this.

Try this. Or try experimenting at GRUB console, until you get it right. Eventually you will:

The commands in GRUB command line you need are:

find filename (outputs (hd0,0) or something like it)
root (hd0,0) (or what you got from find command)
kernel /pathtovmlinuzfile ro root=/dev/hda1 (what you get from find /pathtovmlinuzfile)
boot (this boots the system, do this only if all the other commands did not return any errors, because otherwise you will just have to reboot once again)

Good luck!

Peace!
 
Old 06-05-2004, 08:37 AM   #8
unholy
Member
 
Registered: Sep 2003
Location: Eire
Distribution: Ubuntu 7.10
Posts: 344

Original Poster
Rep: Reputation: 30
Hey I got it I didnt realise that the initrd@ was just a soft link to the initrd.img-......

That fixed it.

Thanks for all the info marghorp!
 
Old 06-05-2004, 08:46 AM   #9
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
No problem, glad to see you make it.

Peace!
 
  


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
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
lilo.conf and linux as default boot whitshade Slackware 7 04-26-2005 08:47 PM
changing Lilo default boot devide Cheechi Mandriva 1 07-12-2004 08:39 PM
Why does LILO boot Linux by default? Kramer Linux - Hardware 4 11-11-2003 07:03 PM
lilo changing default boot pilotncontrol Linux - Software 2 04-02-2002 02:17 PM

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

All times are GMT -5. The time now is 11:10 PM.

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