Disk partitions are logical storage units or slices of a disk drive. Disk Partitioning is the process of dividing the disk into partitions or slices. Partitions can be created, resized, deleted and manipulated on a disk using a partition editor application.
By default in Windows 8, two partitions are created when performing a generic install of the operating system. One is called System Reserved, which is hidden and the other is the C: drive of the installed Windows operating system. The system Reserved partition holds the files needed to boot Windows and in the case of Windows 8, it is 350 MiB in size and holds the Windows Recovery Environment. The OEM may create more partitions for Hardware Diagnostics like in this case shown below, and OEM Recovery which has the Factory Image of the disk drive.
In the case of Ubuntu’s installation, by default only a root filesystem partition and a swap partition are created. However the partitions can be set manually. The /boot directory contains the bootloader files and the kernel(s), The /home directory contains the users’ home folders, their saved files, personal settings etc. These and some of the other directories can be within the same partition under the filesystem root or as separate partitions and formatted as different filesystems. For example the /home directory can be a separate partition. The /boot directory can also be a separate partition. Separating the Linux filesystem into multiple partitions can be very advantageous. Using separate partitions for various directories, the Linux filesystem can be spanned out over multiple disk drives. Multiple partitions are useful if the some data must be kept separate, such as the separation of the operating system (OS) and program files from user files.
Various filesystems can be used for different Linux partitions. For example the /boot directory may be formatted as an ext4 partition but the root filesystem may be a brtfs partition and the /home directory may be formatted as something else. In Linux and other Unix-like systems, the user interface abstracts the partitions in the disk(s) into a virtual filesystem. A user may not even know that his/her files are stored on a separate disk drive. In some circumstances, even a network share may be mounted and used as a normal directory. In such a situation one may not even know that their files are actually being saved on another computer.
The use of separate partitions is quite useful. For example in a multi-boot environment where there are two Linux distributions installed, the /home directory may be shared between the two or the /boot directory may house both kernels. Image backups can be easily made when the data is kept separate. Also disk security is enhanced as separate keys/passphrases can be used to encrypt the different directories of the filesystem, even if it may be inconvenient for an end user. Separate partitions also protect or isolate files, making it easier to recover a corrupted file system or operating system installation. If one partition is corrupted, others may not be affected.
The use of separate partitions may increase complexity of the boot process as many drives have to be mounted at boot time, however the user interface abstracts the partitions and their mount points. The users need not know about the internal partitioning. Indeed in Android smartphones, the internal memory is abstracted and hidden from the user interface. Only a certain part of the internal disk is shown to the user, which in most Android smartphones is a separate partition and is equivalent to the user’s home directory.
More in my next post.