Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
03-28-2004, 04:13 PM
|
#1
|
LQ Newbie
Registered: Mar 2004
Posts: 6
Rep:
|
How to add LILO to existing Linux?
I have RedHat8 installed and coexisting with Wirus 98. After an Fdisk disaster I recovered all the partitions, but GRUB doesn't work anymore. I installed the XOSL bootloader to have a working system, but cannot access Linux, just Windoze.
I can see the correct Linux filesystem from a TestDisk program, so the data is still there -- I just can't boot to Linux. I need some of that data with the original configuration, (license manager links, etc.) so reinstalling RedHat is out of the question.
The XOSL manual says it can boot Linux, as long as there is LILO installed on the linux partition.
The question: How do I add LILO to an existing install without reinstalling the whole kit?
Note that there wasn't any LILO in the first place; I chose GRUB, but it is now dead. I have access to another linux system, and can create diskette images and the like, as long as the procedure is not to complex.
Freederick
|
|
|
03-28-2004, 04:33 PM
|
#2
|
LQ Guru
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141
Rep:
|
|
|
|
03-28-2004, 04:49 PM
|
#3
|
LQ Newbie
Registered: Mar 2004
Posts: 6
Original Poster
Rep:
|
OK, let's assume I can write a correct lilo.conf (based on samples from a working system and some reading). But step 2 is still going to be a problem -- how the heck can I run /sbin/lilo on a system that won't boot to linux? I sure can't run the thing under Windbag :-)
I'm thinking more along the lines of
1. Getting the stuff ready somewhere else and copying it onto the linux partition (assuming I can get into the filesystem somehow, maybe from Knoppix) or
2. Booting the linux from a diskette image -- the problem is, how do I point the boot loader from the diskette to the right partition? I would be creating the diskette on another system, with different configuration.
Freederick
|
|
|
03-28-2004, 05:02 PM
|
#4
|
LQ Guru
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141
Rep:
|
Can you boot rescue mode?
Red Hat 8.0 Rescue Mode
If not, can you boot the KNOPPIX live CD?
KNOPPIX Linux Live CD
Last edited by fancypiper; 03-28-2004 at 05:03 PM.
|
|
|
03-28-2004, 05:15 PM
|
#5
|
LQ Newbie
Registered: Mar 2004
Posts: 6
Original Poster
Rep:
|
Trying to boot in rescue mode gives me a lot of seemingly encouraging lines, the last, however, being:
Kernel panic: No init found.
And then the system freezes :-C
As for Knoppix, I don't have the CD at hand right now, but I assume it would boot. But then what?
Also, would loadlin.exe solve the problem? I just found out it exists.
Freederick
|
|
|
03-28-2004, 05:15 PM
|
#6
|
Member
Registered: Mar 2004
Location: Germany
Distribution: Slackware 14
Posts: 87
Rep:
|
Hello,
Quote:
how the heck can I run /sbin/lilo on a system that won't boot to linux?
|
oh, it's simple: boot with knoppix, mount the Linux partition in rw-mode, "chroot" to the mountpoint of the partition and you can work there as if you have booted this system!
cu
hp_tux
|
|
|
03-28-2004, 05:19 PM
|
#7
|
LQ Newbie
Registered: Mar 2004
Posts: 6
Original Poster
Rep:
|
Update: the kernel panic problem seems to occur because the dumb thing doesn't know where the linux partition is. I do know -- it's the second (primary) partition on the first hard disk -- but how do I translate this knowledge into a form comprehensible to the LILO?
|
|
|
03-28-2004, 05:25 PM
|
#8
|
LQ Newbie
Registered: Mar 2004
Posts: 6
Original Poster
Rep:
|
Thanks! This Knoppix trick should work. I didn't know I could boot from Knoppix and then pretend I booted from the original RedHat. I'll have to try this tomorrow, though, as I don't have the Knoppix CD with me.
My plan now (thanks to the help I got)
1. Boot with Knoppix as you said
2. edit lilo.conf
3 run /sbin/lilo
and then it should work, right?
Freederick
P.S. what do I specify in lilo.conf to make sure LILO installs on the linux partition, and not in the MBR or the first partition?
|
|
|
03-28-2004, 05:37 PM
|
#9
|
Member
Registered: Mar 2004
Location: Germany
Distribution: Slackware 14
Posts: 87
Rep:
|
Hello,
Quote:
1. Boot with Knoppix as you said
2. edit lilo.conf
3 run /sbin/lilo
and then it should work, right?
|
but don't forget the "chroot" step!
cu
hp_tux
|
|
|
03-28-2004, 06:05 PM
|
#10
|
LQ Newbie
Registered: Mar 2004
Posts: 6
Original Poster
Rep:
|
The dang thing worked, and without Knoppix!
I typed linux root=/dev/hda2 rw at the diskette LILO prompt. The thing has kept trying to boot from hda3, which is the swap partition. It took me a while to figure out the proper syntax, though.
What the problem was:
As I said, I recovered the partitions after an fdisk misuse (to put it mildly -- actually what I did was remove the partitions on the wrong drive :-O).
It appears the partitions were in different order previously, so what is now hda2 used to be hda3 -- and the boot diskette couldn't figure it out.
Now on to the next step: configuring and running LILO.
Freederick
P.S. But first I'll edit lilo.conf on the diskette, so that it points the right way. Shouldn't the darn thing be able to recognize which partition is the right one? There is only one disk, and only one ext3 partition on it. Oh well....
P.P.S. I still don't know how to make sure LILO installs on the linux partition only when it runs. I'll figure it out eventually.
Thanx, fancypiper and hp_tux!
|
|
|
All times are GMT -5. The time now is 08:36 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|