--- trunk/www/partitions.html 2011/03/10 18:22:49 158 +++ trunk/www/partitions.html 2011/03/10 18:35:48 159 @@ -92,7 +92,7 @@

Documentation: Managing partitions

30/09/2010 - v 3.2.0

-

Last update: 11/12/2010

+

Last update: 10/03/2011

@@ -147,7 +147,7 @@

What is the difference between primary, extended and logical partitions? [^]

-

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 logical block addressing. Extended partitions are another workaround.

+

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 logical block addressing. Extended partitions are another workaround.

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.

@@ -251,7 +251,7 @@ ext4 - No*** + 3rd party driver Native 16 GB-16 TB* Yes @@ -271,8 +271,7 @@

* Depends on cluster size
-** This update adds exFAT support to Windows XP
-*** Ext2read makes accessing ext4 partitions possible, but it's not a driver and the access is read-only

+** This update adds exFAT support to Windows XP

Operating system support:

@@ -280,8 +279,7 @@
  • "Native" means that the kernel supports the filesystem and the OS can boot from a partition using that FS.
  • "Built-in" means that the kernel supports the filesystem, but booting from a partition containing such FS is very difficult.
  • "Driver included" means that ntfs-3g (the driver that adds NTFS support to Linux) comes with most GNU/Linux distributions.
  • -
  • "3rd party driver" means that drivers to add filesystem support are available, but must be downloaded and installed separately. The ext2/3 drivers are Ext2 IFS and Ext2fsd and the exFAT driver is exfat.
  • -
  • "No" means that there is no way to get read-write filesystem support.
  • +
  • "3rd party driver" means that a driver to add filesystem support is available, but must be downloaded and installed separately. The ext2/3/4 driver is Ext2fsd and the exFAT driver is exfat.
  • Filesystems [^]

    @@ -296,7 +294,7 @@

    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. (more information)

    -

    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.

    +

    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.

    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.

    @@ -308,7 +306,7 @@

    Ext2 was developed in January 1993, earlier than any other filesystem mentioned in this page.

    -

    Because ext2 is designed for GNU/Linux, support in Linux kernel was implemented immediately. The first Windows driver supporting ext2, Ext2fsd 0.01, was released on 25 January 2002. Both Windows drivers for ext2 work only on Windows NT operating systems (NT 4.0 up to Vista, 7 isn't supported yet).

    +

    Because ext2 is designed for GNU/Linux, support in Linux kernel was implemented immediately. The first Windows driver supporting ext2, Ext2fsd 0.01, was released on 25 January 2002. Ext2fsd works only on Windows NT operating systems starting from Windows 2000.

    The best property of ext2 is extensibility. The superblock contains information about which version the filesystem is (ext2, ext3 or ext4) and which extensions and features are in use. By using these pieces of information, the operating system or driver can decide whether or not mounting the partition is safe. That's the most important reason why most GNU/Linux distributions still use successors of ext2 as default filesystems.

    @@ -316,19 +314,17 @@

    Ext2 supports file permissions, both hard and symbolic links and extended file attributes. Encryption, compression and journaling are unsupported.

    -

    Due to lack of journaling support and existence of Windows drivers, I recommend using ext2 if you're going to install GNU/Linux on a SSD drive and want to be able to access files within Windows too.

    - -

    However, lack of journaling support is the worst limitation of ext2. And what was done in order to get rid of the limitation?

    +

    Lack of journaling support is the worst limitation of ext2. What was done in order to get rid of the limitation?

    ext3 [^]

    Ext3, the successor of ext2, was introduced in Linux kernel on November 2001. It supports journaling, can be grown online and optionally indexes large directories.

    -

    Ext2 IFS and Ext2fsd can mount ext3 partition as ext2 if the journal is empty. (If it's not, something is wrong - journal is always emptied when the partition is unmounted or the computer is shut down.) Thus, ext3 support under Windows is just as good/bad as ext2 support.

    +

    Ext2fsd can mount ext3 partition as ext2. Thus, ext3 support under Windows is just as good/bad as ext2 support.

    Partition and file size limits are the same as in ext2: partition size limit is 2-32 TB and file size limit 16 GB-2 TB, depending on cluster size.

    -

    Due to journaling support and existence of Windows drivers, ext3 is a good choice if you're going to install GNU/Linux on a mechanical hard drive and want to be able to access files within Windows.

    +

    Ext3 is becoming obsolete because there is...

    ext4 [^]

    @@ -338,9 +334,9 @@

    Another important improvement is larger partition size limit: an ext4 partition can be even one exabyte in size. (An exabyte is a million terabytes.) In addition, a directory within an ext4 partition can contain up to 64 000 subdirectories (instead of 32 000, as in ext2/3) and timestamps are much more accurate. The file size limit is 16 GB-16 TB, depending on cluster size.

    -

    Unfortunately, Ext2 IFS and Ext2Fsd don't support ext4 and are unable to mount ext4 partition if extents are enabled. They can be disabled, but other improvements of ext4 aren't that important for most people - using ext2 or ext3 is just easier. It is also possible to keep extents enabled and browse the partition using Ext2read, but Ext2read doesn't allow the user to write to the partition.

    +

    Ext2fsd 0.50, released on 5 February 2011, supports ext4 and is able to mount ext4 partition even if extents are enabled. Thus, ext4 support under Windows is just as good/bad as ext2 support.

    -

    Due to its features, ext4 is a good filesystem on computers that only have GNU/Linux installed. Because journaling can be disabled, it is suitable for Solid State Drives and thumb drives too.

    +

    Due to availability of Ext2fsd 0.50 and additional features, ext4 has become the de-facto GNU/Linux filesystem. Because journaling can be disabled, it is suitable for Solid State Drives and thumb drives too.

    NTFS [^]

    @@ -460,18 +456,23 @@

    This section contains a partitioning example. I simulate the following situation in a virtual machine:

    -

    I have two partitions in my disk: /dev/sda1 that contains a GNU/Linux distribution, and /dev/sda2 that is a swap partition. Here we can see the output of fdisk:

    +

    I have two partitions in my disk: /dev/sda1 that contains a GNU/Linux distribution, and /dev/sda2 that is a swap partition. Here we can see the output of parted:

    -

    root@sysresccd /root % fdisk -l
    +

    root@sysresccd /root % parted -l
    +Model: ATA VBOX HARDDISK (scsi)
    +Disk /dev/sda: 2097MB
    +Sector size (logical/physical): 512B/512B
    +Partition Table: msdos
    +
    +Number  Start   End     Size    Type     File system     Flags
    + 1      32.3kB  1679MB  1679MB  primary  ext4            boot
    + 2      1679MB  2097MB  418MB   primary  linux-swap(v1)
    +

    -Disk /dev/sda: 2097 MB, 2097152000 bytes
    -64 heads, 63 sectors/track, 1015 cylinders
    -Units = cylinders of 4032 * 512 = 2064384 bytes
    -Disk identifier: 0x00058a4a
    +Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
    +Error: /dev/sr0: unrecognised disk label

    -   Device Boot     Start        End     Blocks   Id  System
    -/dev/sda1   *          1        812    1636960+  83  Linux
    -/dev/sda2            813       1015     409248   82  Linux swap / Solaris

    +Error: /dev/fd0: unrecognised disk label

    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.