Copyright (C) 2000-2012 |
Whole document tree 2. Technical info2.1. DisksA hard disk is made of sectors numbered from 0 to the max. dmesg gives, for example:
CHS means Cylinders, Heads, Sectors. 523*255*63=8401995 sectors of 512 bytes, thus the 4103 Mbytes. This is only a logical map, it's not necessarily what is written on the disk cover (except for the total size). The true size of the sectors is of no interest for us given we don't want to modify anything but restore a previous state. For us, the default size given by fdisk is alright. The size seen by the system is directly dependent of the work of the BIOS (Basic Input/Output System - the PC's ROM). The mode of the hard disk indicated in the BIOS is essential. On a new disk, it's better to use BIOS automatic hard disk recognition and say “yes”. Anyway, any modification at this level may destroy all the data of the disk, so don't play with this without essential reason. This is probably what your disk use, so don't be afraid. 2.2. PartitionsDisk are now huge, 40 Gb are not rare, so that it's not really handy to have all this stuff packed in only one part. Only Windows do so, and if you use Linux, may be it's because you are aware of how inefficient the other is. So a hard disk is usually cut in some pieces called “partitions” (see the “partition HOWTO” for details, also read /usr/share/doc/package/util/README.fdisk) Let's get a look at (part of) my own print of fdisk -l :
This is my second hard disk, tied to guesses and tries (the first is too simple to be interesting). /dev/hdb is my second ide disk (slave on the primary interface), /dev/hdb1 is the first primary partition, running from the first (1) block to the block 153. There can be four of such primary partitions. If one wants more than 4, one of them must be an “extended” one (not necessarily the fourth) and all other partitions are named “logical” and are located inside the extended one. Notice that partition number 5 and partition number 4 have the same beginning. Number five is logical, number 4 extended. Logicals begin always at 5, even if there are not 4 primary ones. Here the fdisk -u -l listing of an other disk:
Don't worry for the french part, I'm french... look at your own disk listing. Of course numbers are bigger. 2.3. Why is there a problem ?Problem is all the installed Operating Systems must share the disks and as at start the BIOS only scan the first one, there must be a so called “partition table” in the very beginning of this disk. This partition table is located in the Master Boot Record (MBR) side by side with the boot loader. Any misuse of the MBR by any of the OS's leads to problems. When trying to install any system, yes answer at a question like “automatic partitioning?” is likely to give problems... This is specially true with Windows, especially with custom windows installation made by special makes PC's (when no true “Windows” CD is included, as with many laptops). But it's also true with new “smart” (not so smart!) Linux installation programs given with some recent distributions. |