252Part IIIChoosing and Installing a Linux DistributionDefragmenting your (Web site counters)
Friday, November 30th, 2007252Part IIIChoosing and Installing a Linux DistributionDefragmenting your disk can be a fairly long process. The result of defragmenta- tion is that all the data on your disk are contiguous, creating a lot of contiguousfree space at the end of the partition. There are cases where you will have todo the following special tasks to make this true: If the Windows swap file is not moved during defragmentation, you mustremove it. Then, after you defragment your disk again and resize it, youwill need to restore the swap file. To remove the swap file, open theControl Panel, open the System icon, and then click the Performance taband select Virtual Memory. To disable the swap file, click Disable VirtualMemory. If your DOS partition has hidden files that are on the space you are try- ing to free up, you need to find them. In some cases, you won t be able todelete them. In other cases, such as swap files created by a program, youcan safely delete those files. This is a bit tricky because some files shouldnot be deleted, such as DOS system files. You can use the attrib -s -hcommand from the root directory to deal with hidden files. Once your disk is defragmented, you can use commercial tools described earlier(Partition Magic or Acronis Disk Director) to repartition your hard disk to makespace for Linux. An open source alternative to those tools is QTParted. Boot KNOPPIX or any of several other bootable Linux distributions (particularlyrescue CDs) and run QTParted by selecting System Tools.QTParted from thedesktop main menu. From the QTParted window, select the hard disk you want toresize. Then choose Options.Configuration to open a window where you canselect the ntfsresize tool to resize your NTFS partition. After you have cleared enough disk space to install Linux (see disk space require- ments earlier in this chapter), you can choose your Linux distribution and install it. As you set up your boot loader during installation, you will be able to identify theWindows, Linux, and any other bootable partitions so that you can select whichone to boot when your start your computer. Using Installation Boot OptionsSometimes a Linux installation will fail because the computer has some nonfunc- tioning or nonsupported hardware. Sometimes you can get around those issues bypassing options to the install process when it boots up. Those options can do suchthings as disable selected hardware (nousb, noscsi, noide, and so on) or not probehardware when you need to select your own driver (noprobe). Although some of these options are distribution-specific, others are simply optionsthat can be passed to an installer environment that works from a Linux kernel. Chapter 11 includes a list of many boot options that can be used with KNOPPIXandother Linux systems.