Dual-boot Linux with WinNT/2k/XP Bootloader
Taken from PlugNPray :
In this article I will give you a simple step by step guide on adding an entry for linux on Windows NT/2000/XP bootloader. This method has been tried on Mandrake Linux 8.1, Red Hat Linux 7.0/7.1/7.2 and SuSE Linux 7.3, it will probably work on most distributions that allow you to choose where the bootloader is installed.
In order for this to work you must allready be using the Windows NT/2000/XP bootloader, and not the linux bootloader. If you are currently using something else to boot your system you must replace it with the Windows NT/2000/XP bootloader, ensuring you still have some way to boot linux e.g. a boot floppy.
The first step is to boot into linux, and login as root, when you have logged in your first task is to find out which partition your / filesystem is installed on. The easiest way is to type the following at the command prompt mount, linux will then provide you a list of all the mounted file sytems, you are looking for an entry that reads /dev/hdXY on / type ext2 (rw) (where X is a letter, and Y is a number) followed by some file system options. If you have a SCSI system the entry will be somthing like this /dev/sdXY on / type ext2 (rw). Make a note of this entry as this tells you what partition the linux file system lives on.
Your next step is to edit the LILO configuration file, which normally in /etc/lilo.conf .(note - if you are using somthing other than LILO to boot your linux system e.g. GRUB look in your documentation on how to change where it is installed). Any text editor will do for this task, my favourite tool for editing from the console is pico.
The section you need to change is the section which says boot=/dev/**** you need to change **** to be the same as the partition number we discovered earlier. Once you have made this change save the file, and make sure you have some other way of booting linux (e.g. a boot floppy). At a console type /sbin/lilo, when this has completed your bootloader has now been moved.
http://www.plugnpray.co.uk/linux/lilo-nt/images/pico.gif
The final step before rebooting into windows is to copy the bootsector somewhere else. First put a windows formatted floppy into the disk drive and mount it, then at the command prompt type dd if=/dev/**** of=/floppy/bootsect.lnx bs=512 count=1 where /floppy is where your floppy is mounted(this maybe /mnt/floppy on some systems), and **** is the pratition you have just installed LILO to.
Now reboot into windows after unmounting the floppy.
Now that we are back in windows the first thing to do is to copy the file bootsect.lnx of the floppy and onto C:\(or wherever your bootloader lives). Once you have copied the file you then need to edit your boot.ini file. If you can't see boot.ini on C:\ it may be beacuse you have set windows to hide system files, to make it appear do the following
* Windows NT: - Click on View->Folder Options and tick the checkbox that says Show All Files
* Windows 2000/XP: - Click on Tools->Folder Options->View click the radio button that says Show hidden files and folders and untick the Hide protected operating system files(recommended) checkbox
http://www.plugnpray.co.uk/linux/lilo-nt/images/folder-opt.gif
Now open boot.ini in notepad, on the last line add C:\bootsect.lnx="Linux" , save the file. The next time you reboot you should see an option for Linux on your bootloader, if you select this you will boot into linux.
http://www.plugnpray.co.uk/linux/lilo-nt/images/boot.gif