LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 09-12-2004, 06:09 PM   #1
E-ball
LQ Newbie
 
Registered: Sep 2004
Distribution: Mandrake 10.0
Posts: 6

Rep: Reputation: 0
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?

Thanks,

E-ball
 
Old 09-12-2004, 08:56 PM   #2
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
Ok Follow these steps

1. Boot Knoppix with the following parameters
Code:
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
Code:
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
Code:
lilo
 
Old 09-13-2004, 11:34 AM   #3
E-ball
LQ Newbie
 
Registered: Sep 2004
Distribution: Mandrake 10.0
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks, that did the trick. Everything's working now, even my Windows.
Thanks again,

E-ball
 
Old 09-13-2004, 06:30 PM   #4
Zychior
Member
 
Registered: Jan 2002
Location: Northern Virginia
Distribution: Mandrake 8.1
Posts: 41

Rep: Reputation: 15
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?

Thanks,

Zych
 
Old 09-13-2004, 07:19 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Zychior,

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.
 
Old 09-13-2004, 07:36 PM   #6
Zychior
Member
 
Registered: Jan 2002
Location: Northern Virginia
Distribution: Mandrake 8.1
Posts: 41

Rep: Reputation: 15
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.

Thanks,

Zych
 
Old 09-13-2004, 08:09 PM   #7
Zychior
Member
 
Registered: Jan 2002
Location: Northern Virginia
Distribution: Mandrake 8.1
Posts: 41

Rep: Reputation: 15
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?

Thanks,

Zych
 
Old 09-13-2004, 09:00 PM   #8
Zychior
Member
 
Registered: Jan 2002
Location: Northern Virginia
Distribution: Mandrake 8.1
Posts: 41

Rep: Reputation: 15
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?

Thanks,

Zych

Last edited by Zychior; 09-14-2004 at 07:54 AM.
 
Old 09-14-2004, 01:26 PM   #9
Zychior
Member
 
Registered: Jan 2002
Location: Northern Virginia
Distribution: Mandrake 8.1
Posts: 41

Rep: Reputation: 15
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
 
  


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
Switching from grub to lilo, messed up Lilo.conf, rescuing via Knoppix. SonicGT Debian 2 08-21-2005 02:15 PM
How to install lilo from knoppix JediMasterTux Linux - Newbie 3 12-19-2004 04:58 PM
HELP! how to lilo in knoppix?? provkitir Linux - Newbie 4 11-07-2004 09:17 PM
Remove LILO and Knoppix/Debian go4java Linux - Newbie 2 10-12-2004 04:34 AM
Installing Lilo bootloader from knoppix CD for LFS nmares Linux - Software 3 10-07-2004 09:45 AM


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