PDA

View Full Version : Windows and Linux on one Hard Disk



sunpascal
12-02-2004, 03:04 PM
hi,

i have knoppix installed to hard disk. After turning on the computer LiLo prompts for the os that I want to boot. This works fine. However, I am planning to install another windows version. As I experienced before, windows overwrites the MBR in which I have installed LiLo. Then I will have no way to boot knoppix from hard disk (I can't create a boot disk on a floppy, since my floppy drive doesn't work). How can I prevent Windows from overwriting the MBR? Or how can I restore Lilo afterwards?


pascal

rcook
12-02-2004, 05:17 PM
After installing windows boot Knoppix or the distro you have installed from CD to a command line. Do a chroot to the partition on which linux is installed (C:\chroot /mnt/hda? ) and then execute lilo. It will pick up your old lilo configuration and use it.

Hit ctl-D to exit from the chroot and then shut it all down.

OErjan
12-02-2004, 05:22 PM
you could boot with the knoppix cd
then chroot into your mounted linux "/" (chroot /mnt/hdXY)
edit the /etc/lilo.conf (adding your new win aswell)
then run lilo.
exit chroot (by typing exit)
reboot your computer.

firebyrd10
12-03-2004, 12:28 AM
or back up your mbr with knoppix.

su
dd if=/dev/hda1 bs=512 count=1 of=/mnt/hdaX

Of course you know to make where your saving it writable.

CrashedAgain
12-03-2004, 01:37 AM
Or use your CD to boot into your HD install. Boot with:
knoppix root=/dev/hda5 noinitrd ro
Then reinstall lilo. You will probably have to manually add an entry to /etc/lilo.conf for the new windows install.

sunpascal
12-04-2004, 07:30 AM
ok, thanks
it works now

pascal

alex52
12-26-2004, 11:37 AM
My experience shows that better way to co-exist Windows and Linux is:

1. Do lilo to partition where Linux is located and copy its boot sector:

dd if=/dev/hdx of=/b-hdx bs=512 count=1
(bs= 446 for mbr only)

2. Copy file b-hdx to c:\ b-hdx; add to c:\boot.ini: c:\b-hdx="Knoppix" .

Do it every time after run lilo .

In such away I boot Win-xp, dos, and Linux.

When you'll boot a PC boot.ini menu will be presented to choose from.
In this case if something going rong with Linux you still will be able to boot Windows and dos; and to boot your Linux from dos to fix problems .

Best, Alex
:!: :!: :!:

bfree
12-27-2004, 05:06 AM
My experience shows that better way to co-exist Windows and Linux is:

1. Do lilo to partition where Linux is located and copy its boot sector:

dd if=/dev/hdx of=/b-hdx bs=512 count=1
(bs= 446 for mbr only)

2. Copy file b-hdx to c:\ b-hdx; add to c:\boot.ini: c:\b-hdx="Knoppix" .

Do it every time after run lilo .

And there in lies the disaster area of this techinique (you can't boot if you forget to copy the file across after running lilo)! If you want the "advantage" of your method (your windows boot is unmolested) you should look at the thread on iso booting with grub (http://www.knoppix.net/forum/viewtopic.php?t=11796&start=150) where you will find instructions on setting up grub to work from boot.ini. You can store your grub menu.lst on any partition you want (or even have multiple copies) and you can edit your command lines as you boot (using command line completion).

alex52
01-02-2005, 10:16 AM
Now I use more better way to boot any partition or device

You can find detailed and updated information about winxp and knoppix here:

http://www.knoppix.net/forum/viewtopic.php?t=17024

=======================