JustToThePoint English Website Version
JustToThePoint en español
JustToThePoint in Thai

How to create, format, and manage partitions

Disk management tools are utility software that is used to manage data on disk by performing various functions on it, such as partitioning devices, manage drives, disk checking, disk formatting, etc.

Partition managers

Partition management software programs let you create, delete, shrink, expand, split, or merge partitions on your hard drives or other storage devices.

Create and format new partitions

  1. First, you need to download a copy of GParted. Launch your favorite browser, go to the donwload section and download it.
  2. Create a bootable GParted USB flash drive with Rufus or Ventoy.
  3. Now you need to reboot your system, go into boot selection mode (F12), and select your GParted USB flash drive.
  4. Select the GParted Live (Default settings) option and just press Enter.
  5. Select the Don’t touch keymap option and press Enter. Then, you need to select your language, too. Next, use the drop-down menu in the top-right corner to select the storage device or drive that you want to work with (e.g., /dev/sdb).
  6. If you are partitioning a new drive, before starting to create partitions, you need to create a partition table, so click on Device, Create Partition Table on the Menu bar, and select your desired partition table type, it will likely be gpt (it is an enhancement of MBR. This is because MBR can only support a partition size of less than 2 TB).
  7. To create a new partition, click on Partition, New on the Menu bar or the New button on the toolbar in the top-left corner. GParted, Create new partitions

    GParted, Create new partitions

     
  8. A new window should appear. Change the File system combo box to NTFS (Windows), FAT32 (USB flash drives) or ext4 (GNU/Linux). Type a name for the drive on the Label input box, e.g., main. Click the Add and the Apply✔️ (it commits all changes) buttons. Are you sure you want to apply the pending operations? Apply.

    You can move the slider back and forth to change the size of the partition or type it directly in the New size (MiB) textbox.

    GParted, Create new partitions

    GParted, Create new partitions

     
  9. Once it’s done, just click on the Close button and your new partition has already been created.

Resizing partitions

  1. In order to shrink a partition, make a right-click on the desired partition first. Then, click on Resize/Move.  
  2. Move the slider to the left to shrink the partition or just type its size directly on the New size (MiB) textbox. GParted, Resizing partitions

    GParted, Resizing partitions

  3. Finally, click on the Resize/Move, and the Apply✔️ (it confirms the operation) buttons. As you can see in the screenshot below, the partition has been resized.

Deleting and merging partitions

  1. To delete a partition (e.g., /dev/sdb2), make a right-click on the partition first, then click on Delete. As always, you have to save or commit the changes and confirm your choice by clicking on the Apply✔️ button.
  2. To merge two partitions, you have to delete the second partition (and lose all its data, so you should back it up) as we have shown in the previous step. Next, you right-click the first partition (e.g., /dev/sdb1) and select Resize/Move.
  3. Now, you can drag the slider to the right and add all the unallocated space left behind when deleting the second partition. Finally, click on the Resize/Move button, and commit the operation by clicking on the Apply✔️ button.

To manually create and format new partitions in GNU/Linux, read our article Programming in Linux. Installing Arch from Scratch 

Add an external disk (/dev/sdb1) formatted in ext4 (GNU/Linux)

  1. sudo chown -R $USER:$USER /mnt/discoExterno.
  2. sudo vi /etc/fstab: /dev/sdb1 (it describes the file system) /mnt/discoExterno (it describes the mount point) ext4 (the file system type) defaults 0 0. C)
  3. systemctl daemon-reload -It automatically reloads systemd configuration on config files changes.
❯ lsblk -f # Output info about file systems
NAME        FSTYPE FSVER LABEL   UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
└─sda1      ext4   1.0   mydisk1 bd753b26-a4ec-4063-8d36-5215c358ed00  692.3G    70% /media/mydisk1
sdb
└─sdb1      ext4   1.0   mydisk2 cb8ee0c2-6afe-4853-ae39-0cc1dce73ef0    1.1T    33% /media/mydisk2
sdc
├─sdc1      exfat  1.0   Ventoy  B941-1CAD
└─sdc2      vfat   FAT16 VTOYEFI 1B11-976A
nvme0n1
├─nvme0n1p1 vfat   FAT12         29E2-81C1                               702K    30% /boot/efi
├─nvme0n1p2 ext4   1.0           c5e135cd-f8b9-4226-a08c-0a0df899d656   17.4G    36% /
├─nvme0n1p3 swap   1             f581d4da-70e2-4894-8a47-d0d4f3c37e94                [SWAP]
└─nvme0n1p4 ext4   1.0           cf630845-b11e-4ef1-8a94-5771185aef30   99.3G    46% /home
# Static information about the filesystems.
# /dev/nvme0n1p2
UUID=c5e135cd-f8b9-4226-a08c-0a0df899d656	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p1
UUID=29E2-81C1      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/nvme0n1p4
UUID=cf630845-b11e-4ef1-8a94-5771185aef30	/home     	ext4      	rw,relatime	0 2

# /dev/nvme0n1p3
UUID=f581d4da-70e2-4894-8a47-d0d4f3c37e94	none      	swap      	defaults  	0 0

sd is a mass storage driver, sda is the first registered device on the driver and sdb is the second. Finally sda1 is a block device file that corresponds to the first drive partition on the first registered device.

# /dev/disk/by-uuid/bd753b26-a4ec-4063-8d36-5215c358ed00 or /dev/sda1. 
/dev/disk/by-uuid/cb8ee0c2-6afe-4853-ae39-0cc1dce73ef0 /media/mydisk2 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/bd753b26-a4ec-4063-8d36-5215c358ed00 /media/mydisk1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
Bitcoin donation

JustToThePoint Copyright © 2011 - 2022 PhD. Máximo Núñez Alarcón, Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.