Windows® 2000 - Linux Dual-Boot Work-Around
Does this scenario sound familiar?
You have checked everything and thought it through. You made certain that your test PC was Windows® 2000 compliant, then you put two partitions on the hard drive so that you could install Microsoft's Windows® 2000 Professional and then Linux on the same machine. Everything is going according to plan and Windows® 2000 is up and running just great.
Next, you took your copy of Red Hat Linux and installed it on that special partition you created for it. Everything was was going so smoothly that when you got to the point in the installation where you were asked where to put LILO, the Linux loader, you just clicked through, allowing it to be put in the default partition and on the master boot record of the machine.
Here you are, already to give your new setup a test run, but when you reboot the machine after the Linux install, you find that you have no way to get to Windows 2000. That pretty graphic list shows up perfectly, however the only choice is Linux. Oh Oh!
Turning the clock back
This problem was caused by the fact that the NT boot loader must reside on the MBR of the machine to boot any version of NT, whether it's NT 4.0 or Windows 2000 Professional.
The good news: All you have to do is clear LILO out of the MBR, and you will have your Windows 2000 installation back running like a charm.
The bad news: The location of LILO needs to be set at installation time. If it is removed from the MBR, youre going to have to reinstall Linux to make it work correctly.
Clearing LILO out of the MBR: The easiest way to clear LILO out of the MBR is to find your old Windows 98 boot disk (you can get one here, just click to download).
Boot from the boot disk, and at the A: prompt, type:
fdisk /mbr and touch the enter key.
Now you can install Red Hat again, but this time, follow the workaround below!
Let's review what happened! There's little doubt that everything that was done was as recommended, except for the positioning of LILO during the Red Hat installation. Keep in mind that it is recommended that you always put whatever versions of Windows on the dual boot machine first, and then install the Linux.
When you get to the LILO installation screen during the Linux Red Hat installation procedure (See Figure A), you will have the option to install LILO on the first sector of the boot partition. Hopefully, when you partitioned your Linux partition, you made a boot partition (/boot) as is recommended during that part of the install.
Note: Make sure that you click the button to make a boot floppy, you will need this later to start Linux, as the NT boot loader is not going to show Linux in the NT Loader boot list until after you complete the workaround.
When you get to the end of the Linux installation, it will want to reboot the machine. At that point, insert the boot floppy you made so the machine will boot from that. If your CMOS is set to boot from the floppy disk before the hard drive, you should be able to boot into Linux. If you installed GNOME, then you will no doubt boot into the console mode. If you've installed KDE, you will probably boot into the KDE desktop. You can call up a terminal session from there though.
If you didnt log in as root, you will need to su to root and then run /usr/sbin/rdev/boot/vmlinuz to see the location of the boot sector of the Linux partition. If you get something other than an hd address, as in hda, you can just type mount (without the quotes) and you will see a line similar to:
/dev/hda2 on /boot type ext2 (rw)
Whatever the address for boot is, it goes in the dd command, which will look like:
dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1
This command line peels the bootsector from your Linux-root partition, and if the bootsect.lnx bs value is greater than 512, then something is wrong and the dual boot wont work.
Copy the bootsect.lnx file to a DOS-formatted floppy by either mounting the floppy and using the cp command or by not mounting the floppy and using the mcopy command, which reads: mcopy bootsect.lnx a:
Now, restart your machine without any boot floppy in the A: drive.
After the machine starts, copy the bootsect.lnx file onto your C: drive. Then get to the command line prompt and type:
C:\attrib s r c:\boot.ini
This will allow you to change the permissions on the boot.ini file. Then, with Notepad, open the boot.ini file.
Hint: You will need to actually type in the filename of the boot.ini file to open it.
Now add the following line below the last line of the file:
Save and close the file.
Next, you will need to restore the permissions to the boot.ini file by typing:
C:\attrib +s +r c:\boot.ini
Now when you reboot the computer without a floppy in the drive, you should get a screen that lists all the booting options for the computer, including one that says Linux.
Heres what to do if it all goes wrong!
If your PC doesnt boot properly, or you dont have your options to choose Linux, there are other ways to solve the problem.
The first thing to try is to redo everything beginning with the dd command and try it again. The next thing to try would be to go to the HowTo site and look for the instruction on installing and running a program called BootPart, which automates the last part of the installation. You might also want to read the Troubleshooting section on the HowTo site.
Notice: Windows® 95, Windows® 98, Windows® NT, Windows® 2000 and
Microsoft® Office are registered trademarks or trademarks of the Microsoft Corporation.
All other trademarks are the property of their respective owners.
Copyright ©1995-2001 DEW Associates Corporation. All rights reserved.