PDA

View Full Version : Install XP after Knoppix - LILO problem



ackelley
02-02-2005, 04:02 PM
I am a new user to Knoppix. I have been running Windows XP for a couple of years now, but I started having so much trouble with updates and such that I decided to try Linux. My brother, who is also semi-new to Linux helped me install Knoppix and Lilo so that I could boot Windows XP or Knoppix. I have two a 40GB hard drive that has 4 partitions (each 10GB). The first partition is Windows XP and the second is Knoppix. The third and fourth are just storage.

I've pretty much been using Knoppix full time, but I have a couple of programs in Windows that I need to use and I haven't found replacements for them in Knoppix, so when my Windows XP load ended up having several bugs, I decided to reformat that partition and reload XP.

Of course, when I did that, the MBR got messed up and now I can't get back in to Linux. I used the Live CD to boot into Knoppix and I used a terminal window to bring Lilo back up. Now Lilo is coming up properly and I can select either system, but Linux won't boot properly. It seems to have trouble finding the right place to load from. It starts to mount the drives, but then throws a "kernel panic" error and says something about failing to find the init file.

I read another forum discussion where someone said you could reload LILO from the HD install by using the Live CD and booting with the following code:

Knoppix lang=us root=/dev/hdaX noinit ro

I tried this, but it said:

fsck.ext3: Invalid argument while trying to open /dev/hda8

Now, it is probably important to mention that before my Windows reload, Knoppix was mounted in such a way that it was on hda8. After my windows reload, when I booted with the Live CD, I could see that Knoppix was on hda6. So when I restored Lilo I used root=/dev/hda6.

Could the drive numbering be the problem? It used to be hda8 and now it is hda6? I don't know how to fix it. Can someone help me?

Thanks

Markus
02-02-2005, 05:40 PM
Did you change /etc/fstab on the hdinstall to mount / at the new partition?

ackelley
02-02-2005, 08:22 PM
No, can you explain?

Markus
02-02-2005, 09:52 PM
Well, for instance the following line in my /etc/fstab tells my system to find and mount the root partition on hdb1:
/dev/hdb1 / ext3 defaults,errors=remount-ro 0 1
If you have / and under it /boot on hda8 and it's looking for them in hda6 the kernel nor any system file for that matter is found. If you have more partitions like /home you will need to change them also.
This page is better at explaining fstab: http://en.wikipedia.org/wiki/Fstab

ackelley
02-03-2005, 12:37 AM
I managed to edit fstab and get LILO back to working! Now my only problem is that the partition file structure seems to be messed up. I can read everything in Linux, but I can't run qtparted because it throws errors in analyzing hda. Also, I noticed under disk management in Windows XP that the partition structure is messed up and I can only read 2 out of 3 logical drives. Is there a way to rebuild that system? I already tried running gpart and it threw errors while trying to guess the structure.

Markus
02-03-2005, 08:42 AM
How exactly did you remove 2 partitions. Or did you remove them or did they just disappear?

ackelley
02-03-2005, 07:49 PM
I didn't remove 2 partitions. They just got screwed up somehow.

** Original drive partitons
Active - Disk1Part1
Logical - Disk1Part2
Logical - Disk1Part3
Logical - Disk1Part4

** Before XP Install:

XP Disk Management showed (40GB)
Active - Disk1Part1 10GB (Healthy, FAT32) - This was Windows
Logical - 512MB (Healthy, Unknown) - This was my swap partition for Linux
Logical - 9GB (Healthy, Unknown) - Knoppix HD Install
Logical - Disk1Part3 10GB (Healthy, FAT32)
Logical - Disk1Part4 10GB (Healthy, FAT32)

Linux had the following:
hda1 - Windows
hda5 - Swap? (can't remember)
hda6
hda7
hda8 - Knoppix HD Install

** After XP reload

Windows disk management shows:
Active - Disk1Part1 10GB (Healthy, FAT32) - New XP load
Logical - 512MB (Healthy, Unknown) - This was my swap partition for Linux
Logical - 9GB (Healthy, Unknown) - Knoppix HD Install
Logical - 10GB (Free Space) - don't know where this came from
Active - 10GB (Healthy, Unknown) - don't know why 3rd partition disappeared
Logical - Disk1Part4 10GB(Healthy, FAT32)
Logical - 10GB (Unallocated) - don't know where this came from

Linux had the following:
hda1 - Windows
hda3
hda6 - Knoppix HD Install
hda7


As you can see, it's pretty messed up. Windows disk management shows a total of almost 60GB, but it's only a 40GB hard drive.

ackelley
02-03-2005, 07:57 PM
Believe it or not, I can actually read all of my drives in Linux now, but when I run qtparted it says:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
qtparted: cannot connect to X server :0.0

Windows XP disk management still shows the same thing I described above.

Markus
02-03-2005, 08:48 PM
I know way too little about XP's partitioning tools to tell you how to fix it.

The Xlib thingy I can OTOH fix. You probably tried to run qtparted as root when you got the error. A couple of ways to avoid it:
-As user do in a konsole kdesu qtparted
-As root do in a konsole export DISPLAY=:0.0 and then run qtparted
-Run qtparted from the menu, it should ask for a root pass.
This of course requires you to be running X in the first place.

benjamin1254
03-13-2005, 12:12 AM
*bump*

its best if u install xp first then knoppix. It is always gana be windows first then other Os's such as knoppix. windows hates to be second best so it gets angry when u deside it needs to be second in line... just my 2 cents

foamrotreturns
03-15-2005, 08:06 PM
*bump*

its best if u install xp first then knoppix. It is always gana be windows first then other Os's such as knoppix. windows hates to be second best so it gets angry when u deside it needs to be second in line... just my 2 cents
Windows doesn't hate to be second best to other OSs, it's just designed to be the only OS on a machine. You can't tell it not to modify your MBR when it installs. You know that you can install them in any order though. If you happen to install linux first, make sure you partition the HDD so you have space for windows on another partition. When you install Windows, tell it to install on that partition. Then after it installs, the MBR will of course only boot windows. But you can just reinstall LILO or GRUB from a LiveCD. They usually autoconfigure themselves to include the Windows partition.