-   Linux - Newbie (
-   -   Re-installing Lilo with Knoppix (

E-ball 09-12-2004 06:09 PM

Re-installing Lilo with Knoppix
I posted below about my problems with booting Mandrake, and a member posted saying to using a Knoppix Live CD to re-install Lilo. I'm now in Knoppix, and have yet to figure out how to re-install Lilo with Knoppix. Forgive my ignorance, but I'm completely new to Linux, and am totaly lost here. Can someone post the procedure to re-install Lilo as to not interfere with my pre-existing Windows installs?



irfanhab 09-12-2004 08:56 PM

Ok Follow these steps

1. Boot Knoppix with the following parameters

knoppix 3
To go to 'run' level three, which will show you a command line, this all we need, we dont need a graphical env.

2. type

chroot /dev/drive
where driver stands for your root partition drive, where your Mandrake is installed, on mine slackware 10.0 is installed in hda7 so I would go
chroot /dev/hda7

3. When chrooted, than possible edit your /etc/lilo.conf file. With your favorite editor, emacs, vi, pico etc.

when done say


E-ball 09-13-2004 11:34 AM

Thanks, that did the trick. Everything's working now, even my Windows.
Thanks again,


Zychior 09-13-2004 06:30 PM

I have run into a similar problem but the chroot command does not work saying that /dev/hda1 is not directory. This is what I have done that messed my system up. I had RH running fine but thought I would install Lindows DE. Well that was a mistake, Lindows boot manager comes up and only show Lindows. When I choose Lindows it only goes about 1/5 of the way then locks. I no longer see RH as a choice. (I installed Lindows on /dev/hda4 and RH uses /dev/hda1-3.

I want my old LILO back but the chroot does not work. Do I need to do a chroot /dev/hda/ or should the chroot /dev/hda work?



jschiwal 09-13-2004 07:19 PM


When you boot up, the partition that had the Red Hats root partition may not be mounted. Also, if you made any partition changes or added a drive, your device references may be different now. Which partition(s) are mounted for Lindows. If the first hard drive was reformatted and re-partitioned during install, then your old Red Hat installation is gone. If
the old red hat partition still exists, first check the /etc/mtab file to locate where it is mounted.
Otherwise, if it exists but isn't mounted, create a directory on the Lindows file system and mount it there. After this the chroot should work.
After chroot'ing to the old Red Hat partition, you will need to fix up your /etc/lilo.conf to reflect any changes and then re-run lilo as root.

Zychior 09-13-2004 07:36 PM

I forgot completely about the mounting part. Since Lindows will not even finish loading I was using Knoppix. I would imagine it has some mount points I could use. I will go try it now.



Zychior 09-13-2004 08:09 PM

Does RH 9 use LILO? I was able to mount hda2 in the Knoppix /mnt/hda2 directory. I could then chroot to it and go to the etc directory. I could not find the lilo.conf file instead there is a lilo.conf.anaconda file. Is this correct? It looks like it has everything in it I need but typing lilo at the prompt gave me an error. I am new to Linux but I thought I read somewhere that something was replacing LILO. If RH does not use LILO then can somebody point me in the right direction?



Zychior 09-13-2004 09:00 PM

I think that RH may have used grub but I think I am going to switch to lilo. I am pretty sure I know what is causing me problems now I just need some advice on how to fix. When I set up RH9 I setup three partitions. /dev/hda1 is boot /dev/hda2 I think is root and /dev/hda3 is swap. When I chroot into /mnt/hda2 and run lilo or lilo -v it gives me an error saying it can not find boot.b boot.b is on /dev/hda1. What I need to know is where to mount /dev/hda1 so that when I chroot into hda2 it will see boot.b directory. does anybody know where this mount point is?



Zychior 09-14-2004 01:26 PM

OK, I figured this out. What I did, in case this will help anybody, is:
1.) Mounted /dev/hda2 with Knoppix (Using Knoppix 3 to go to command line) under /mnt/hda2
2.) Went to /mnt/hda2/etc and typed "more fstab" this listed the default mount points.
3.) With fstab I saw that /dev/hda1 was mounted at /boot in the hda2 drive
4.) I mounted /dev/hda1 to /mnt/hda2/boot (In my case I tried to run grub so it made a directory here I needed to clean out before mounting.)
5.) Went to the /mnt/hda2/etc directory and copied the file lilo.conf.anaconda to lilo.conf (I did this since it was using grub before and had no lilo.conf file.)
6.) Ran "lilo -v"
7.) Rebooted and everything worked. It's boot up is not as nice as grub so I may switch over to this again but it works!

This has been a great learning experience even though I was a little frustrated for awhile. Now it's time to learn vim and grub.

- Zych

All times are GMT -5. The time now is 01:33 PM.