126 |
|
|
127 |
<H3><a name="partitions-extended"></a>What is the difference between primary, extended and logical partitions? <span class="hideprint">[<a href="#partitions-top" title="go to top of the page">^</a>]</span></H3> |
<H3><a name="partitions-extended"></a>What is the difference between primary, extended and logical partitions? <span class="hideprint">[<a href="#partitions-top" title="go to top of the page">^</a>]</span></H3> |
128 |
|
|
129 |
<p>Information about partitions is saved in so-called partition table in Master Boot Record. MBR itself is only 512 bytes in size, and only 64 bytes are reserved for partition table. That's not enough, and there are many workarounds to bypass limitations caused by the size, for example <a href="http://en.wikipedia.org/wiki/Logical_block_addressing#LBA.2C_ATA_devices_and_Enhanced_BIOS" target="_blank">logical block addressing</a>. Extended partitions are another workaround.</p> |
<p>Information about partitions is saved in so-called partition table in Master Boot Record. MBR itself is only 512 bytes in size, and only 64 bytes are reserved for partition table. That's not enough, and there are many workarounds to bypass limitations caused by the size, for example <a href="http://en.wikipedia.org/wiki/Logical_block_addressing#Enhanced_BIOS" target="_blank">logical block addressing</a>. Extended partitions are another workaround.</p> |
130 |
|
|
131 |
<p>Partition table can only store information about four partitions. If one has, for example, two GNU/Linux distributions on the same disk, both of them having separate root partitions, shared /home and shared swap, the partition number limit has been hit already.</p> |
<p>Partition table can only store information about four partitions. If one has, for example, two GNU/Linux distributions on the same disk, both of them having separate root partitions, shared /home and shared swap, the partition number limit has been hit already.</p> |
132 |
|
|
289 |
|
|
290 |
<p>FAT32 was first introduced with Windows 95 OSR2. Windows 98, Windows Me, Windows 2000 and newer support FAT32 too. Linux kernel has supported FAT32 almost as long as Windows, but booting GNU/Linux from FAT32 partition is difficult and actually requires DOS to be installed in the partition as well. (<a href="http://en.wikipedia.org/wiki/FAT_filesystem_and_Linux#Installing_Linux_on_and_booting_it_from_FAT_volumes_using_umsdos" target="_blank">more information</a>)</p> |
<p>FAT32 was first introduced with Windows 95 OSR2. Windows 98, Windows Me, Windows 2000 and newer support FAT32 too. Linux kernel has supported FAT32 almost as long as Windows, but booting GNU/Linux from FAT32 partition is difficult and actually requires DOS to be installed in the partition as well. (<a href="http://en.wikipedia.org/wiki/FAT_filesystem_and_Linux#Installing_Linux_on_and_booting_it_from_FAT_volumes_using_umsdos" target="_blank">more information</a>)</p> |
291 |
|
|
292 |
<p>FAT32 partition can be up to two terabytes in size. As of now (July 2010), there are hard drives that hit the limit, but don't exceed it. A single file within FAT32 partition can be up to four gigabytes in size.</p> |
<p>FAT32 partition can be up to two terabytes in size. There are already hard drives that exceed the limit. A single file within FAT32 partition can be up to four gigabytes in size.</p> |
293 |
|
|
294 |
<p>Because FAT32 is, in the end, based on FAT12, it has very few features. It doesn't support file permissions, hard/symbolic links, encryption, compression, alternative data streams, journaling... It lacks support for nearly anything that defines a modern filesystem. However, due to very few features, FAT32 is very fast filesystem if it's not fragmented or on a Flash-based drive. Mind you, FAT32 fragments very fast.</p> |
<p>Because FAT32 is, in the end, based on FAT12, it has very few features. It doesn't support file permissions, hard/symbolic links, encryption, compression, alternative data streams, journaling... It lacks support for nearly anything that defines a modern filesystem. However, due to very few features, FAT32 is very fast filesystem if it's not fragmented or on a Flash-based drive. Mind you, FAT32 fragments very fast.</p> |
295 |
|
|
453 |
|
|
454 |
<p>This section contains a partitioning example. I simulate the following situation in a virtual machine:</p> |
<p>This section contains a partitioning example. I simulate the following situation in a virtual machine:</p> |
455 |
|
|
456 |
<p>I have two partitions in my disk: <b>/dev/sda1</b> that contains a GNU/Linux distribution, and <b>/dev/sda2</b> that is a swap partition. Here we can see the output of <b>fdisk</b>:</p> |
<p>I have two partitions in my disk: <b>/dev/sda1</b> that contains a GNU/Linux distribution, and <b>/dev/sda2</b> that is a swap partition. Here we can see the output of <b>parted</b>:</p> |
457 |
|
|
458 |
<p class="newcode">root@sysresccd /root % fdisk -l<br> |
<p class="newcode">root@sysresccd /root % parted -l<br> |
459 |
|
Model: ATA VBOX HARDDISK (scsi)<br> |
460 |
|
Disk /dev/sda: 2097MB<br> |
461 |
|
Sector size (logical/physical): 512B/512B<br> |
462 |
|
Partition Table: msdos<br> |
463 |
<br> |
<br> |
464 |
Disk /dev/sda: 2097 MB, 2097152000 bytes<br> |
Number Start End Size Type File system Flags<br> |
465 |
64 heads, 63 sectors/track, 1015 cylinders<br> |
1 32.3kB 1679MB 1679MB primary ext4 boot<br> |
466 |
Units = cylinders of 4032 * 512 = 2064384 bytes<br> |
2 1679MB 2097MB 418MB primary linux-swap(v1)<br> |
|
Disk identifier: 0x00058a4a<br> |
|
467 |
<br> |
<br> |
468 |
Device Boot Start End Blocks Id System<br> |
<br> |
469 |
/dev/sda1 * 1 812 1636960+ 83 Linux<br> |
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.<br> |
470 |
/dev/sda2 813 1015 409248 82 Linux swap / Solaris</p> |
Error: /dev/sr0: unrecognised disk label<br> |
471 |
|
<br> |
472 |
|
Error: /dev/fd0: unrecognised disk label</p> |
473 |
|
|
474 |
<p>Now I'm going to install another distribution on the same disk. First of all, I need one more partition, because only one distro can be installed on one partition. In addition, I want to separate /home to its own partition in order to be able to share it between distributions.</p> |
<p>Now I'm going to install another distribution on the same disk. First of all, I need one more partition, because only one distro can be installed on one partition. In addition, I want to separate /home to its own partition in order to be able to share it between distributions.</p> |
475 |
|
|