MS-Windows/NT has it's own boot loader that likes to be in charge. That's okay. One solution is to simply tell the MS-Windows/NT boot loader what to do if you want to boot into GNU/Linux. This means copying the GNU/Linux boot code into a file, transferring that file to a MS-Windows/NT partition, and then adding a menu item for the MS-Windows/NT boot loader to select the GNU/Linux boot if required. Using grub we don't need to do this as grub supports chain loaders that allows you to choose to load up the MS-Windows/NT boot loader.
If you wish MS-Windows/NT to remain in control, the do the following:
Boot from floppy disk into GNU/Linux. Log in as the root user. Check where the boot sector of your GNU/Linux partition is:
So on this particular machine the boot sector is on the second hard drive (/dev/hdc).
When installing don't let lilo install a boot loader over the existing master boot record on your hard drive (usually /dev/hda) unless you wish to wipe out the original NT - For dual boot using the MS-Windows/NT boot loader see the http://www.tldp.org/HOWTO/Linux+NT-Loader.html Linux with NT Loader mini HOWTO, but I detail the steps below. Use LILO You then copy the Linux boot sector to floppy disk, reboot to NT, and copy the Linux boot sector onto the NT hard disk. The NT boot loader is then told where to find the file (edit C:boot.ini). It is all very clearly documented in the above mini HOWTO. On bootup you can then choose between GNU/Linux and Windows NT.
# editor /etc/lilo.conf root=/dev/hdc boot=/dev/hdc append="hdc=13424,15,63" # /sbin/lilo Warning: /dev/hdc1 is not on the first disk Added Linux * # dd if=/dev/hdc1 of=/root/bootsect.lnx bs=512 count=1 # mcopy /root/bootsect.lnx a: # reboot (into NT) C:\>copy a:\bootsect.lnx c:\bootsect.lnx C:\>attrib -s -r c:\boot.ini C:\>notepad c:\boot.ini [boot loader] timeout=30 default=C:\bootsect.lnx [operating systems] C:\bootsect.lnx="Linux" multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ... multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ... C:\>attrib +s +r c:\boot.ini C:\>reboot (into Linux)
Note the inclusion of the append line above in my lilo.conf. This ensures /dev/hdc is found. Otherwise, sometimes it is not.
After you install a new kernel under Linux (either from a kernel-image package on the Debian archive or else your own compiled kernel-image) you will need to rerun LILO. By default lilo.conf identifies the image to boot as "/vmlinuz". This is a symbolic link to, for example, /boot/vmlinuz-2.0.36.