Linux - General This 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.
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.
|
 |
11-01-2003, 05:38 PM
|
#1
|
Member
Registered: Oct 2003
Distribution: Gentoo, Knoppix
Posts: 62
Rep:
|
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?
|
|
|
11-01-2003, 06:21 PM
|
#2
|
Member
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558
Rep:
|
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:
# lilo
This writes your new lilo settings
# exit
Get out of chroot
# shutdown -r now
And reboot.
Last edited by spurious; 11-01-2003 at 06:22 PM.
|
|
|
11-01-2003, 07:35 PM
|
#3
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Rep:
|
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.
Last edited by qanopus; 11-01-2003 at 07:37 PM.
|
|
|
11-01-2003, 08:43 PM
|
#4
|
Member
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558
Rep:
|
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).
|
|
|
11-01-2003, 08:49 PM
|
#5
|
Member
Registered: Oct 2003
Distribution: Gentoo, Knoppix
Posts: 62
Original Poster
Rep:
|
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?
|
|
|
11-02-2003, 07:45 AM
|
#6
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Rep:
|
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.
|
|
|
11-02-2003, 09:07 AM
|
#7
|
Member
Registered: Oct 2003
Distribution: Gentoo, Knoppix
Posts: 62
Original Poster
Rep:
|
It says /dev/root is mounted as /. My Knoppix partition is not mounted as root. Otherwise, this would be so much easier.
Is there a boot option to mount hda5 as / automatically?
Last edited by squall14716; 11-02-2003 at 09:12 AM.
|
|
|
11-02-2003, 09:50 AM
|
#8
|
Member
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558
Rep:
|
"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.
|
|
|
11-02-2003, 10:04 AM
|
#9
|
Member
Registered: Oct 2003
Distribution: Gentoo, Knoppix
Posts: 62
Original Poster
Rep:
|
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'.
Thanks for all your help. 
|
|
|
11-02-2003, 10:05 AM
|
#10
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Rep:
|
Don't you mean :"chroot /mnt/hda5: now /mnt/hda5" spurious?
|
|
|
11-02-2003, 10:46 AM
|
#11
|
Member
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558
Rep:
|
schatoor: oops, typo... but it seems like our work is done here. High-Five!
|
|
|
All times are GMT -5. The time now is 05:24 PM.
|
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
|
|