Dual boot Fedora Linux and Windows XP, resizing NTFS
Howto resize Windows XP NTFS partition non-destructively, install Feodra Core and create a boot menu for both operating systems.
All tools used are free except Windows XP. Windows XP is a good platform for gaming and legacy software, for other purposes I recommend Linux. To follow this tutorial, you should be comfortable with installing operating systems, partitioning hard disks and burning cdroms from iso images.
(c) 2004 Tero Karvinen
Resize Windows XP NTFS parition
Backup your documents from NTFS partitition. If you are not administering the computer yourself, ask permission from IT-department for resizing hard disk partitions. If you want to be able to shring the partition to minimum possible size, you can optionally defragment the NTFS partition using Windows defragmenting tool included in Windows XP.
Ntfsresize can shrink Windows XP partition. It is included in Knoppix 2004. Download knoppix (KNOPPIX_V3.3-200?-??-??-EN.iso 700 MB iso image) and burn it to a cd. Boot computer from that cd.
Start qtparted. Select Main menu: Knoppix: Root shell. Type qtparted &
. Select your hard disk (/dev/hda), and select Windows XP NTFS partition, which probably takes almost the whole disk. From context menu (click right mouse button), select "Resize...". Make the partition about a half smaller, click Ok. Save by clicking disk icon from toolbar. Qtparted automatically does everything needed to resize the partition (runs ntfsresize and the actual partitioning program).
After the operation, your hard disk will have a Windows XP NTFS partition (about half a disk) and free, unpartitioned space (about the other half). Save by clicking the disk icon on top left, and choose yes to commit the changes. Repartitioning can take 10 minutes or more.
Install Fedora Core
Download Fedora Linux 1 "Yarrow" iso images (600+ MB each) disc 1 - disc 2 - disc 3 - and burn the images to cds.
(Fedora Core 1 download links don't work anymore. You might want to download the latest Fedora Core. Choose i386 for a typical PC computer. )
Boot from Fedora Core disc 1. Install Fedora Core normally. Installer detects Windows XP automatically, and creates a boot menu item for it. In bootloader configuration you can change the name of Windows XP menu item from "DOS" to "Windows XP". You can also choose which operating system is booted up by default.
- (Boot loader: enter).
- Media check: (Optional. All disks should say "PASSED. It is OK to install from this media).
- Language (during installation): English.
- Keyboard: Finnish.
- Mouse: (whatever is autodetected, usually ps2, ps2 wheel mouse or usb wheel mouse), emulate 3 buttons.
- Installation type: Workstation. (Only chooses the default set of software to be installed)
- Disk partitioning: Automatically partition, keep all partitions and use existing free space.
- Boot loader configuration (defaults ok, boot menu item for Windows XP is autogenerated, you can choose default operating system to boot and change menu item names).
- Network configuration: Automatically via DHCP.
- Firewall configuration: Enabled (Defaults ok. Client programs work automatically. Do not allow incoming traffic and do not trust any devices).
- Language support: (defaults ok: Default English, support English).
- Time Zone: Europe/Helsinki, System Clock Uses UTC.
- Root password: secret passphrase, unlimited length. Use big/small letters, numbers, special chars (!%/()=?_...) but not scandinavian characters like äö.
- Package Selection (defaults).
- About to install (nothing has been done yet, pressing Alt-Ctrl-Del would reboot and cancel install). Click next to proceed installing.
Installation of Fedora Core 1 takes about 40 minutes, and you must change cds twice.
Create Boot Disk: No. X Window System configuration: (defaults usually Ok). Machine reboots. Add user: Login: eight characters, no caps, eg: tkarvine. Type password twice. (use this user to log in later, not root). Date: add the date. Sounds: (defaults ok). Register: No. Install additional: No.
Now you can log in.
Check for both operating systems, Windows XP and Fedora Linux, that you can boot, browse web pages, write documents and (optionally) print them. Windows XP checks hard disk the first time you log in after repartitioning.
Congratulations, you have repartitioned your hard disk and installed Fedora Core dual boot! Read my articles to learn more about linux.
Fedora Core 2 and other Linux 2.6 distributions
Fedora Core 2 and other distributions using Linux kernel version 2.6 alter the partition table so that Windows no longer recognizes those partitions. This problem does not show with every installation of Fedora Core 2, and it never occurs with Fedora Core 1. The problem is annoying but fixable without data loss. This worked for me: boot to Knoppix 3.3 (Linux 2.4), sfdisk -l. Check the correct geometry: CHS Cylinders Heads Sectors. (There are also other sources to check the correct geometry, such as printings on hard disks and sometimes bios.) Rewrite the partition table to reflect the correct geometry, using your own values for /dev/hda, C H and S.
sfdisk -d /dev/hda |sfdisk --no-reread -C 16037 -H 255 -S 63 /dev/hda
Reboot computer. You should be able to boot both Windows and Linux. Windows will likely check hard disks on first boot.
See also: Kanat-Alexander 2004: Fedora Faq: "I installed Fedora Core 2, and now I can't boot into Windows!" and Aboutboul 2004 on fedora-devel-list atta redhat.com: "Prevention and Recovery of XP Dual Boot Problems"
About this document
Tested on 2004-04-02 with Fedora Core 1 Yarrow, Knoppix 2004-02-16, Windows XP Pro (ghost installed) and HP-Compaq d530 CMT. Also, all hardware worked in both operating systems in d530, including the integrated Broadcom Netextreme Gbit/s network adapter.
Todo: Screenshots of qtparted resizing ntfs, installing Fedora Core, boot menu. Photo of a computer running Linux. How to run WinhaPro (an old grading system) in Linux?
Copyright 2004-04-02 (initial release) 2004-04-29 (integrated comments from Chris) 2004-05-17 (fc install to a list, copyedit) 2004-08-24 (knoppix link fix, copyedit), 2004-09-19 (fc2 partitioning fix) Tero Karvinen. All rights reserved.