Partitioning a disk

In this post we are going to make partitions in a disk. We are using an old computer because when doing this process, all data is lost.

For this purpose we are using the Linux-based OS Parted Magic, and the program GParted.

The internal disk in this computer is called /dev/sda. This computer has BIOS so we can oly create up to 4 physical partitions.

First Configuration: One partition

1

To start we have done an easy configuration: only one partition in NTFS with the total size of the disk (111.8GiB), with bootable flag activated. As the disk is named as /dev/sda this partition is called /dev/sda1

Second configuration: A primary partition and an extended one

2

This configuration has one primary bootable partition of 24.4GiB called /dev/sda1 and its filesystem is NTFS, so it can be used to boot from Windows. It also has a extended partition called /dev/sda2 that contains a logical volume of 87.4GiB in FAT32 used to store our data. It’s called /dev/sda5 because from /sda1 to /sda4 are reserved for physical partitions.

Third configuration: A primary partition and a Linux Swap

3

In this configuration we have one primary bootable partition of 110.8GiB in ext4 file system called /dev/sda2 and a Linux swap primary partition of 1GiB (Double the size of the RAM), called /dev/sda1. This type of partition is used to “enlarge” the RAM. What it really does is “save” the process you aren’t using in this partition until you use them another time when they are moved back to the RAM. As the filesystem is a Linux one we can use this configuration to install a Linux distribution.

Fourth configuration: Two primary partitions and an extended one

4

This configuration has one primary bootable partition of 24.41 GiB in ext4 called /dev/sda1 and another primary partition of the same size in NTFS for a different OS (Windows), called /dev/sda2. Then we have an extended partition called /dev/sda3 that contains two logical volumes. /dev/sda6 is format on FAT32 with a size 61.9GiB used to store data in both OS and the other is a Linux Swap partition of 1GiB called /dev/sda5. We could use this configuration to install Windows and Linux onto the same computer.


Conclusion

Probably, most of us won’t use this process because our computer is pre-partitioned when we buy it and also we don’t want to lose our data, but it’s an easy process that can be useful in many situations: new hard disk, you make your own computer, restore your PC…


Leave a comment