View Full Version : Wrong MBR for Lilo when using koppix 3.7 HD installer script

12-28-2004, 02:15 PM
I've used the script "sudo knoppix-installer" to install beginner version of Knoppix 3.7 on my second harddisk (hdb).
My first harddisk (hda) is completely used for Win2k.

My Problem: the script didn't ask me which MBR it shall use - it just used the MBR of hda :(
But I wanted to completely seperate Win2k on hda and Linux on hdb.

What can i do to move Lilo-MBR from hda to hdb, and restore Win2k-MBR on hda?

Thanks in advance for any help.

12-28-2004, 05:32 PM
I think lilo uses the mbr of whichever drive is set to be the primary boot drive, so you should be able to make lilo install on the other HD by first setting it to be the primary boot the running 'sudo lilo'. If the entire hdb is the linux partition, you could accomplish the same thing by setting lilo to install on the partition instead of the mbr. Lilo configuration setting are are in /etc/lilo.conf.

You would have to restore hda's mbr from windows.

But, knoppix needs linux to boot. If you have hda set as your primary boot & do not have lilo on the mbr for hda, your boot process will not see lilo therefore you will not be able to boot knoppix unless you use a boot disk.

12-29-2004, 02:16 AM
Haven't try it yet.

Boot into knoppix, edit /etc/lilo.conf:
boot=/dev/hda **change this line where you want lilo to boot from.
in your case:
boot=/dev/hdb*x **x= linux partition

Then remove lilo from mbr, run command from root konsole:
lilo -u /dev/hda

Install lilo to your selected partition after editing lilo.conf:

Next, is to prepare for your pc to dual boot linux and Win2K:

1) Let pc boot directly to lilo.
Use qtparted, and change active partition to hdb.

2) Use Win2k as bootloader
Open root konsole and run:
dd if=/dev/hdb*x of=/bootsect.lnx bs=512 count=1 **x=your knoppix partition
Copy this bootsect.lnx to a floppy....and use it to transfer that file to your win2k root, C:\

Now, to repair hda mbr.
Use your w2k rescue disk and run : fdisk /mbr
or use W2K cd to boot and choose Recovery console and run: fixmbr
Once you're able to boot W2K, you can choose to dual boot either by using procedure 1) or 2)
If you choose to 2) use win2k as bootloader:
You need to copy file bootsect.lnx to C:\
Then edit boot.ini:
Add the following syntax to the end of the boot.ini file

[boot loader]
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows 2000" /fastdetect

Good luck