Reinstalling Lilo using Knoppix CD without reinstalling Knoppix?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
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.
Reinstalling Lilo using Knoppix CD without reinstalling Knoppix?
I installed Windows XP Pro this time and it replaced the Lilo Boot Manager, so I can no longer boot to the Knoppix I installed to my HD. Obviously, I wouldn't think there would be a Windows Installer for it, so I want to know if it is possible to re-install it using the Knoppix CD without re-installling Knoppix itself?
Assuming from your question that Windows XP is on hda1 and Knoppix is on hda2, then do:
1. Boot with Knoppix CD
2. Open a root terminal (ctrl-alt-F2) and do the following at the #prompt:
# PS1='\u@\h:\w\$ '
This shows the full path on your root prompt.
# mount /mnt/hda2
# chroot /mnt/hda2
The chroot command changes the root to /mnt/hda2, your Knoppix partition on the hard-disk
# cd /etc
Once you're in /etc, then edit lilo.conf (e.g. vi lilo.conf) and add the appropriate boot options for Knoppix and for Windows XP. Your lilo.conf should still have the correct settings for your existing Knoppix installation. However, I don't use Windows XP, so I can't offer any help with that; try searching this site or googling "lilo.conf Windows XP". Once you've saved your lilo.conf and exited your text editor, then:
That's nearly correct spurious, but it won't work. You will get an error when you run lilo like that. And that's because the way you mount your knoppix partition.
You see, I have used knoppix to install my LFS system and I pulled my hear out trying to get lilo on the mbr after I had succesfully installed my system.
This is what you need to do in addition to what spurious has said. Before issuing the command "mount /dev/hda2", edit the file "/etc/fstab". In that file, change the line with the entery "/dev/hda2" to
"/dev/hda2 / ext3 defaults 1 1"
The thing you must change is the "defaults" bit. I don't know what there is right now, but the fourth option should be "defaults". Never mind the rest.
For the rest, do what spurious has told you.
D'oh, forgot about the fstab... I actually do this chroot/lilo trick on a regular basis. I keep two Knoppix partitions: the first one is for my "good" (ie. don't mess around with it) Knoppix 3.2 2003-07-26 install, and the second one is for testing the latest Knoppix release (3.3 has apm problems so I keep it on "testing"), or for trying out new apt-get installs (I learned the hard way that sometimes new software can bork your system).
When trying to mount it after changing fstab, it starts whining about /dev/root already being mounted to /. Unmounting it of course kills everything. I guess I'm probably missing something, else it should work, right?
Oh so I guess your root is alraidy mounted. What boot options are you giving?
If hda2 is alraidy mounted as root, I guess all you need to do is run lilo and reboot.
"When trying to mount it after changing fstab, it starts whining about /dev/root already being mounted to /. Unmounting it of course kills everything." In your last post, you indicate that your Knoppix hard-disk partition is hda5.
You need to break this down step-by-step. Please indicate at which step your error occurs:
1. Boot with Knoppix CD
2. as root, edit /etc/fstab (this is the fstab on the Knoppix CD RAM filesystem, not the fstab on your Knoppix hard-disk partition), with schatoor's instructions so you have /dev/hda5 ext3 defaults 1 1
3. mount -t ext3 /dev/hda5 /mnt/hda5
4. chroot /mnt/hda2: now /mnt/hda2 should be / (if you set the prompt environment variable PS1 as I suggested in my above post, then you will see the change in your prompt path)
5. cd /etc and edit lilo.conf. After editing lilo.conf to taste, then run lilo. Re-boot.
Ok, following it totally as you said (changing ext3 to ext2 (is ext3 better?)) it seems to have worked. My problem was, I tried to mount hda5 as / instead of /mnt/hda5. Thanks for clearing that up. Soory for being all "n00bish'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.