Convert a Windows system to dual-boot Linux on a second drive
- 0
- Add a Comment
- No Related Post
I was recently assigned the task of converting a system running Windows XP to dual-boot Windows and Linux. The user needed to run Windows most of the time, but occasionally needed to boot Linux to run special applications. The one overriding requirement was to change the existing Windows setup as little as possible. In this case, that meant adding a second hard drive. Easy enough, right? Well, not so fast.
The computer in question was a standard white-box PC with Windows XP installed on its one hard drive. One option was to shrink the exiting Windows partition with NTFSresize and install Linux in the resulting free space. However, this was too intrusive. I did not have a backup of the data on the Windows machine, and didn’t want to take the time to make one, so I was loath to do anything that could wipe it out.
So I installed and set up a new second drive, then installed Fedora Core 3 in the standard manner. When the installer asked what drive to use, I chose the second IDE drive, hdb. The other key step was to make sure the installer did not install a Linux boot loader on the primary hard drive. While having the installed do this is generally the recommended method of installing a dual-boot Linux/Windows system, I didn’t want to do it because of my goal of minimizing changes to the Windows disk.
The Windows bootloader (NTLDR) can be configured to boot Linux partitions, so I decided to use it as the primary bootloader. The default boot option would remain Windows, so if the user took no action on boot, the system would go to Windows as it always had. However, if the user selected Linux in the NTLDR boot menu, it would hand off to the Linux bootloader (GRUB) on the second drive.
The Fedora installer gives you the option of placing GRUB in the master partition of the primary IDE drive (hda) or in the boot partition of the secondary IDE drive (hdb1). I instructed the installer to take the second option. Note that without extra configuration later, this setup will not boot to Linux, because whatever bootloader is on the primary drive — in this case Windows — will always be run.
Another option I considered was removing the primary Windows drive and placing the Linux drive in the system as the primary drive. I could then install GRUB on the Linux drive (the primary now) and configure it to also boot Windows on the secondary drive. One caveat here is you must configure GRUB to fool the Windows drive into thinking it is still the primary. Otherwise, Windows gets confused. I elected not do this type of install because it seemed more complicated than installing Linux on the second drive.
Rest of Article at Linux.com
