Partitioning-EN
Introduction
Every Hard Disk can hold more than one partition. This because you may want to separate data from Operating system files, or you may want to install several operating systems on the same hard drive. The disk partitioning is very important, especially if want to install Linux. The PC/BIOS system standard is very old, so you can also consider the new GPT layout.
Master Boot Record
PC/BIOS standard based disks start with the MBR (Master Boot Record) that it's written on the first disk sector. The MBR contains two important things:
- Boot code
- Partition table
The boot code is where are saved the instructions executed during the boot process. These instructions are needed to load and execute the instructions saved in different disk sectors, so that the Operating system can be started.
The partition table is where are saved the primary partitions definitions. Unfortunately this table can contain maximum 4 partitions. If you need more than 4 partitions, one of these primary partitions must be an extended partition. This kind of partition can hold secondary partitions called Logical Units. It's possible to create an extended partition also if you have less the 4 primary partitions. The problem of extended partitions is that they are more complicated and more fragile than primary partitions.
If the MBR is overwritten you'll lose all the partitions, so you can't boot the system and get the data again. For this reason you should be very careful when modifing the MBR.
Luckily there are tools like testdisk that can scan the disk and try to restore the original partitions, if the MBR is damaged/lost.
Every partition has an identifier written in the partition table. This identifier is used to identify the type of filesystem inside the partition. Sometimes it can not be coherent with the data really written inside the partition: a Linux partition can have the windows identifier. For this reason it's important to check the partition file system.
Windows can be installed only on primary partitions. Luckily it's possible to use logic units for data. Linux can be installed on every kind of partition, also logic units.
The PC/BIOS standard allows only addresses until 2Tb. It can be also used on bigger disks, but the addiotional space will be inaccessible. To manage more than 2Tb use GPT (gptfdisk).
Partitions and file system
It's very important distinguish the partition from the file system. A partition is a group of continuous disk sectors. The file system is the system that organizes the storage of data inside the partition and is responsible of file and folder management, access control, and other tasks.
A partition is defined by the first sector on the disk, the last sector on the disk, identifiers and attributes. Following there is an example of a partition table on the disk:
Boot Device Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 81922047 40857600 7 HPFS/NTFS/exFAT /dev/sda3 81922048 130750463 24414208 83 Linux /dev/sda4 130750464 976773167 423011352 5 Extended /dev/sda5 130752512 970004479 419625984 83 Linux /dev/sda6 970006528 976773119 3383296 82 Linux swap / Solaris
The most popular filesystems are FAT and NTFS for Windows and ext3, ext4, reiserfs for Linux. Every operating system has its own native filesystems. For example windows can be installed only on FAT or NTFS, Linux gives a wider choice for native filesystem (ext3, ext4, reiserfs, xfs, jfs, btrfs, ...), and can also read and write windows' filesytems.
When you create a partition with low level tools, like fdisk, you can create only empty partitions (without filesystem). This partition will be unreadable until the creation of a valid filesystem.
How to create partitions
If the disk is empty, there are several ways to create new partitions. The installation programs of Windows and Linux allow to create and destroy the partitions. In other words, if you want to install an operating system on a new disk, it's not needed a further partitioning tool, because the installation program can do it. However can be necessary to select the advanced options.
Luckily there are advanced partitioning programs that allows to modify the partition without lose data, using tools that can understand the filesystem used on a partition. So it's possible move and resize the existing partitions. It's also possible to modify the labels and the settings (visible, hidden, etc.).
PoliArch has Gparted, a graphical tool that supports all Windows and Linux filesystems, and allows to resize/create/modify/delete partitions.
Altre Pagine: · Home Page · Documentazione · Downloads · Screenshots · Contatti