People often say that Linux is difficult to install. One reason for that view is that most lack experience installing operating systems. As those of us who have tried can testify, every operating system is difficult to install — including Microsoft Windows. Today, few people actually install Windows, as it comes pre-installed. If most computers had Linux pre-installed, then people would complain about the difficulty of installing Windows.
Nevertheless, it is difficult to install Linux. It’s particularly difficult to install Linux alongside Windows in a so-called dual-boot configuration, which is perhaps the most common configuration. One of the most challenging problems facing the would-be Linux user is properly preparing the disk drive to leave space for both operating systems. In this column, we hope to explain why this is such a difficult problem and tell you how to overcome it. Let’s start by looking at how disk drives are organized.
Disk Drive Boot Camp
To comprehend a disk drive, first try visualizing a tree — this would be the botanical variety rather than the computer science variety. If you cut a thin cross-section of a tree trunk, the result resembles a very large CD-ROM. If you look closely at the cross-section, then you would notice concentric annular growth rings resulting from the seasonal cycle.
A disk drive contains several specially coated metal platters, each resembling such a cross section. The tree’s growth rings are analogous to cylinders of the disk drive. In a disk drive, each cylinder is divided into sectors, each of which has a fixed size, often 512 bytes. When data is written to, or read from, the disk drive, it is generally written or read one sector at a time.
The cylinders of a disk drive and the sectors within a cylinder are each numbered from 0. Therefore, the location of any sector on the drive can be designated simply by the number of the containing cylinder and the number of the sector itself.
Disk drives are divided into units known as partitions, which occupy a contiguous range of cylinders. You can think of partitions as the watertight compartments of a ship, which help contain flooding that might otherwise result in the loss of the ship. If data in one partition become corrupt, other partitions are not affected. But, if the corrupt partition contains important operating system files, the system itself may be unbootable. A disk drive can contain as many as four ordinary partitions, which are referred to as primary partitions.
To overcome the four-partition limit, it’s possible to designate one partition as an extended partition. An extended partition can contain many logical partitions, which can generally be used in the same way as primary partitions; however, it’s rare for an extended partition to contain more than a dozen logical partitions.
Linux Magazine /
December 2001 / NEWBIES
Getting Your Disk Drive Ready for Linux