Linux partitions explained, and find out how to dual-boot with Windows
Linux partitioning
In Microsoft Windows, each partition the operating system can read receives a
drive letter (such as C: or D:). These are fairly arbitrary and can change if
you add or remove new hardware. They are also mixed in with network drives and
other hardware. Any file system that isn’t readable won’t receive a drive letter
at all.
In Linux, the situation is totally different. Every partition is referenced by a device name, which refers directly to the partition number on the hard drive. Primary partitions are numbered one to four, and logical partitions are five and up. Since any hard drive can have up to four primary partitions, the first four numbers are reserved, whether they’re in use or not. In other words, if you have two primary partitions and three logical partitions, these will count as partitions 1, 2, 5, 6 and 7.
The device name starts with a prefix of ‘hd’ for IDE hard drives and ‘sd’ for any other – such as SCSI, serial ATA (Sata) or USB – hard drives. This is followed by a letter to distinguish one physical drive from another. See box on previous page for a list of common device names.
The sum of all partitions
Combined together, this gives a device name that refers directly to a specific
partition – hda2 would be the second primary partition on an IDE drive, hda5 the
first logical partition, and sda3 would be the third primary partition on the
first Sata or USB drive.
It is the first Sata hard drive, so the device is /dev/sda. The drive has a 42GB primary partition (sda1), and the rest of the drive is an extended partition (sda2), represented with a cyan border. This is subdivided into five logical partitions (sda5 to sda9). Note that the first partition is marked with the ‘boot’ flag. This means the partition is active, which in turn means a Dos MBR would boot this partition directly.
Related articles
Q.Why are some of the keys on my keyboard doing strange...
Q.Is my phone’s Bluetooth any use?
Q.Can I switch boot drives so that I can work on older...
Old Street roundabout is being touted by the Government as the UK's answer to Silicon Valley, but it seems our best innovations are coming from all over the UK
|
|
|
|
|
Computeractive Excel (2010) Online tutorialPrice: £19.99 |
Computeractive Word (2010) Online TutorialPrice: £19.99 |
Computeractive Powerpoint (2010) Online TutorialPrice: £19.99 |
Angry BirdsPrice: £9.99 |
Back Issue CD-Rom 14 (2011)Price: £15.99 |