Dual Booting Fedora and Windows XP

Sometimes it's handy to have a Windows system able to dual boot to Linux. This whitepaper explains how to modify a Windows XP system to boot to Fedora Core 4. The Windows NTFS partition will be reduced in size, and a Linux partition will be added. This assumes a hard drive size of at LEAST 10 GB, 15 or 20 is better. The tools required are the Fedora Core disks, and a Knoppix 4.0 Live CD. You can find Fedora here, and Knoppix here.

Danger! Will Robinson! There are, of course, risks to mucking about with the boot partitions on your laptop. Make sure critical information is backed up before you start. No one can guarantee your environment will work like ours did. Proceed at your own risk.

Before you start, it's a good idea to defragment the partition on the disk on which you will be installing Linux.

Boot your system to Knoppix. That normally just means to turn the computer off, put in the Knoppix CD, and turn the computer back on. The computer will boot to a fully functional version of Knoppix. In Knoppix, you need to create a partition on the hard drive so that Fedora can install itself.

Open a shell in Knoppix, and become root. From the K Menu in the lower left corner, choose System->Shells->Bash to open a bash shell. In that shell, type "su" to become root, and "qtparted &" to open the qtparted partition tool.

Qtparted pops up a window. Inside the window, your CD and your hard drives should be listed. Determine which one is your hard drive (often /dev/had, sometimes /dev/hdc or something else). So select your hard drive, and select the Windows XP NTFS partition. Right click on it and select "Resize." Give it a new size of about half the disk. Then you must choose Devices->Commit to implement the changed size.

This is a good time to reboot, and make sure you Windows partition is good. My Windows came up and complained that I needed to check the disk for integrity. I did this, and rebooted, and all was good.

Now reboot with the Fedora Disk 1 in, and install Fedora.

The initial screen will come up, hit Enter to boot from CD. You can choose to verify the CD or skip. I know my disks are good, so I hit tab to Skip the verification, and hit Enter. I chose graphical mode for the install, and hit Next for the English language, and Next for a US English keyboard.

The next screen is the Disk Partition Setup. Make sure the Automatically Partition button is checked, and hit Next. On the Automatic Partition screen, check the bottom selection, Keep All Partitions And Use Free Space, then hit Next. On the Boot Loader Configuration screen, keep the default boot loader configuration and hit Next. The following screen is the Network Configuration screen. Leave DHCP checked for most applications, and make sure your favorite interface is active on startup. If you want to hard code in an IP address, this is the place.

The next screen will ask whether to enable the firewall. This is probably a good idea, so leave Enable checked. You can open up certain services here as you need to. The next screen is the time zone, set it for your local area.

This brings up the Set Root Password screen. Choose a good root password, 8 characters or better, with letters, numbers, and caps. Extra points for special characters! Hit Next.

This brings you to the package selection dialog. You can play around here for hours, but we're going to set up yum to make it easy to install things, so pick Personal Desktop or Workstation, and hit Next. Now you get the About To Install screen. Hit next, and it will throw up a popup telling you what CDs you will need. Accept that, and it begins to load Fedora onto your system. You may need to swap the disks in, the install took about 30 minutes on a 2 Ghz laptop.

When it's through installing, you get a screen that says "Congratulations, the installation is complete." Click the Reboot button on the lower right to reboot the machine, and run Fedora for the first time. It will come up to a Welcome screen. You'll have to agree to the license, set the time, and set the display resolution. Hitting Next, Next, Next will work. It then queries you about the soundcard, and asks if you have additional CDs. Hit Next, and Next, and you should be ready to login.

After login, right click on an empty part of the screen, and select Terminal to open a shell. Type "ifconfig -a" to see what interfaces you have. Your primary interface is probably called eth0. It should have an IP address associated with it. If it doesn't, you'll need to configure it with the Network Device Control screen, reached by Applications->System->Network Device Control. You may need to select your interface, and hit the Activate button if for some reason it's not active. If you've selected DHCP as the way to assign an IP address to this interface, this is where you will find out if your new Linux laptop is correctly connected to the network.

Assuming you have an IP address, Congratulations! You're in Great Shape. You're now ready to update the installed packages on your system and begin collecting the fun pieces of software that will make your life better. The automatic package update utility on Fedora is called yum. Bring the packages on your system up to date by typing

yum update

This will take a while, because even if you have fresh CDs, packages out there update all the time. It will probably find a couple of hundred packages it wants to update for you. Then it will politely tell you how many it has found, and how big they are, and ask whether you want to do the update. Tell it yes with a "y" and watch it start kerchunking through them. Go have a cup of coffee, or take a walk. Your new laptop should be ready in a few minutes.

When that's complete, you can now install packages with the command:

yum install snort

Fedora and yum will then go find the packages, figure out the dependencies, and install all the needed packages for you. Yummie!

And you're on your way! Have fun.

Jim Hurst is a Senior Network Engineer with Sage InfoSec, Inc.