Ubuntu 20.04 Essentials
上QQ阅读APP看书,第一时间看更新

6.6 Using the GNOME Disks Utility

The gnome-disks utility provides a user-friendly graphical alternative to reclaiming the Windows partitions from the command-line. Since the example used here will convert the Windows NTFS partitions to XFS format, the first step us to install the xfsprogs package as follows:

# apt install xfsprogs

Once the package has been installed, open a terminal window and launch the gnome-disks utility:

# gnome-disks

After a short delay, the gnome-disks tool will appear as shown in Figure 6-1:

Figure 6-1

In the above example, the disk contains two Windows NTFS partitions which will need to be deleted. Any NTFS partitions with a star shown in the disk map (as is the case for the highlighted partition in the above figure) will need to be unmounted before they can be deleted. This can be achieved by selecting the partition and clicking on the unmount button as indicated in Figure 6-2 below:

Figure 6-2

With all the NTFS partitions unmounted, the next step is to delete them. Select the left-most partition in the disk map and click on the Delete button as shown in Figure 6-3:

Figure 6-3

Review the information in the confirmation dialog before clicking on the Delete button to commit the change. Once the first partition has been deleted, repeat this step for any remaining NTFS partitions.

Once the NTFS partitions have been removed, the space should now be shown as being free within the disk map.

A new partition now needs to be created to make use of this free space. With the space selected, click on the new partition button (indicated by the arrow in Figure 6-4):

Figure 6-4

In the Create Partition dialog, choose whether the partition is to occupy all of the available space, or reduce the size if you plan to use the space for more than one partition:

Figure 6-5

Click next and, on the subsequent screen, enter a name for the new partition and choose whether the partition should be erased during creation. This causes the creation process to take more time but is a recommended option. Finally, choose a filesystem type for the partition. This will typically be either ext4 or XFS. Given the benefits of XFS, select Other before clicking the Next button:

Figure 6-6

On the next screen, select the XFS option before clicking on the Create button:

Figure 6-7

If the XFS option is disabled, exit from gnome-disks and install the xfsprogs package before trying again:

# apt install xfsprogs

The gnome-disks utility will begin the formatting process and display the status of the process:

Figure 6-8

Once the partition is ready, it can be mounted either from the command-line or using the gnome-disks utility. To configure a mount point, select the partition and click on the settings button as shown in Figure 6-9:

Figure 6-9

From the settings menu, select the Edit Mount Options... item to display the dialog shown in Figure 6-10.

Figure 6-10

Turn off the User Session Defaults switch and configure the mount point to your requirements. In the above figure, the partition is mounted at /data at system startup and is configured to be identified by the label “Data”.

Once the settings are complete, click on OK. The volume is now mounted and ready for use:

$ df -h /mnt/Data

Filesystem Size Used Avail Use% Mounted on

/dev/sda1 29G 62M 29G 1% /data

Finally, update the boot menu to remove the Windows option using the steps outlined in section 6.5 above.