How to Format a Hard Drive in Ubuntu

Table of contents:

How to Format a Hard Drive in Ubuntu
How to Format a Hard Drive in Ubuntu
Anonim

To format the disk drives of an Ubuntu system you can use the "Disks" utility which is an integral part of the operating system. If this tool generates an error message or if there are damaged partitions, you can resort to using "GParted" to perform the formatting. It is also possible to use the latter tool to resize existing partitions, with the possibility of creating new ones using only the disk space that is still free.

Steps

Method 1 of 2: Perform a Quick Format

Format a Hard Drive Using Ubuntu Step 1
Format a Hard Drive Using Ubuntu Step 1

Step 1. Start the "Disks" program

You can do this quickly by opening the Ubuntu "Dash" and typing the keyword disks. In the left part of the window that appears, the list of all disks installed in the system will be shown.

Format a Hard Drive Using Ubuntu Step 2
Format a Hard Drive Using Ubuntu Step 2

Step 2. Select the drive you want to format

All storage media installed on your computer will be listed in the panel on the left of the "Disks" window. Pay close attention to the drive you select as all stored data will be permanently deleted by the formatting process.

Format a Hard Drive Using Ubuntu Step 3
Format a Hard Drive Using Ubuntu Step 3

Step 3. Press the gear button, then choose the "Format Partition" option

A new window will open where you can choose the new file system.

Format a Hard Drive Using Ubuntu Step 4
Format a Hard Drive Using Ubuntu Step 4

Step 4. Select the file system you want to use for formatting

Open the "Type" drop-down menu to choose the file system to use.

  • If you intend to use the volume in question to transfer data between Linux, OS X and Windows computers and to make it compatible with most devices that support removable USB storage drives, choose the "FAT" option.
  • If you want to use the memory drive only with the Linux operating system, choose the "Ext4."
  • If you plan to use it with a Windows system, choose the "NTFS" file system.
Format a Hard Drive Using Ubuntu Step 5
Format a Hard Drive Using Ubuntu Step 5

Step 5. Name the new volume

To do this, you can use the blank text field in which you will have to type the name you have chosen to assign to the drive after formatting. This will make it easier for you to recognize the different volumes connected to your computer and the data they contain.

Format a Hard Drive Using Ubuntu Step 6
Format a Hard Drive Using Ubuntu Step 6

Step 6. Choose whether to use secure format or not

By default, the formatting process simply erases the data on the drive without overwriting it. If you want to be sure that the information stored on the disk is erased, choose the "Overwrite existing data with zeros" option from the "Erase" menu; this will cause the formatting process to take longer to complete, but the data on the drive will actually be erased.

Format a Hard Drive Using Ubuntu Step 7
Format a Hard Drive Using Ubuntu Step 7

Step 7. Hit the "Format" button to start formatting

Before the procedure begins, you will be asked to confirm your willingness to proceed. Formatting very large volumes, partitions or disks takes longer, especially if you have chosen to format them by overwriting the contained data.

If you encounter difficulties using the "Dischi" program, try using the "GParted" tool described in the next section of the article

Format a Hard Drive Using Ubuntu Step 8
Format a Hard Drive Using Ubuntu Step 8

Step 8. Mount the formatted drive

After the formatting process has finished, press the "Mount" button located under the graphic for the volumes on the selected disk. This will cause the chosen partition to be "mounted" to the task system which gives it access to its file system. To access the contents of the partition, click the link that appeared or start the Ubuntu file manager ("Nautilus"), then select the drive in question from the list in the left pane of the window.

Method 2 of 2: Use GParted

Format a Hard Drive Using Ubuntu Step 9
Format a Hard Drive Using Ubuntu Step 9

Step 1. Start the "Terminal" program

You can do this directly from the Ubuntu "Dash" or by pressing the key combination Ctrl + Alt + T.

Format a Hard Drive Using Ubuntu Step 10
Format a Hard Drive Using Ubuntu Step 10

Step 2. Install "GParted"

To install this tool, type the following command. Remember that you will be asked to enter the system administrator password and that this will not be visible as you type:

  • sudo apt-get install gparted;
  • When prompted, press the Y key to continue.
Format a Hard Drive Using Ubuntu Step 11
Format a Hard Drive Using Ubuntu Step 11

Step 3. Launch the "GParted" program using the Ubuntu "Dash"

Access the "Dash", then type in the keyword "gparted" to locate the "GParted Partition Editor" program. Inside the program window, you will see a bar relating to the partitions of the currently selected disk together with the free space still available.

Format a Hard Drive Using Ubuntu Step 12
Format a Hard Drive Using Ubuntu Step 12

Step 4. Select the drive you want to format

To do this, open the drop-down menu in the upper right corner of the "GParted" window, then choose the disk to format. If you are not sure which volume you need to format, use the size information to help you choose.

Format a Hard Drive Using Ubuntu Step 13
Format a Hard Drive Using Ubuntu Step 13

Step 5. Unmount the partition you wish to modify or delete

Using "GParted", before being able to make any changes, the partition must be unmounted. Select the latter with the right mouse button from the list of existing partitions or directly from the graphic bar, then choose the "Unmount" option from the context menu that appeared.

Format a Hard Drive Using Ubuntu Step 14
Format a Hard Drive Using Ubuntu Step 14

Step 6. Delete the existing partition

This step removes the selected partition and turns it into unallocated storage space for use. At this point, you can create a new partition using that space and format it with the desired file system.

Select the partition you want to remove with the right mouse button, then choose the "Delete" option

Format a Hard Drive Using Ubuntu Step 15
Format a Hard Drive Using Ubuntu Step 15

Step 7. Create a new partition

After removing the previous one, right-click the unallocated memory space resulting from this operation, then choose the "New" option from the context menu that appeared. This will start the procedure for creating a new partition.

Format a Hard Drive Using Ubuntu Step 16
Format a Hard Drive Using Ubuntu Step 16

Step 8. Choose the size of the new partition

When creating a new partition, you can use the graphic slider located at the top of the "Create new partition" window to select its size.

Format a Hard Drive Using Ubuntu Step 17
Format a Hard Drive Using Ubuntu Step 17

Step 9. Choose the file system to use

To do this, go to the "File system" drop-down menu, then choose the option that suits your needs. If you plan to use the new partition with multiple operating systems and devices, choose the "FAT32" file system. If you intend to use it only on Linux systems, choose the "ext4" option instead.

Format a Hard Drive Using Ubuntu Step 18
Format a Hard Drive Using Ubuntu Step 18

Step 10. Name the new partition

This step makes it easier to identify it within your Linux system. To name the partition, use the "Label" field.

Format a Hard Drive Using Ubuntu Step 19
Format a Hard Drive Using Ubuntu Step 19

Step 11. When you have finished configuring the parameters of the new partition, press the "Add" button

The partition in question will be added to the "GParted" queue of operations to be performed at the bottom of its window.

Format a Hard Drive Using Ubuntu Step 20
Format a Hard Drive Using Ubuntu Step 20

Step 12. Resize a partition (optional step)

One of the features offered by "GParted" is the ability to resize existing partitions. You can resize an existing partition so that the new one is created using the resulting free space. On balance, this operation allows you to split a single hard drive into multiple independent volumes. The resizing process does not change the data stored on the disk in any way.

  • Select the partition you want to resize with the right mouse button, then choose the "Resize / Move" option.
  • Drag the partition boundaries on the bar graph to resize it and thus create unallocated free space.
  • Press the "Resize / Move" button to confirm the changes. With the unallocated free space resulting from this operation, you can create a new partition by following the directions described in the previous steps.
Format a Hard Drive Using Ubuntu Step 21
Format a Hard Drive Using Ubuntu Step 21

Step 13. Press the green check mark button to apply the new changes

None of the required changes will be applied to the selected disk before this button is pressed. After clicking the button in question, any partition selected for deletion will be deleted, thus losing all the data contained therein. Make absolutely sure that you have selected the correct settings before proceeding to apply the changes.

All required operations may take some time to complete, especially in the case of a long sequence of operations or a very large hard drive

Format a Hard Drive Using Ubuntu Step 22
Format a Hard Drive Using Ubuntu Step 22

Step 14. Locate the new partition

Once the formatting process is complete, you can close the "GParted" window and start using the new drive. The latter will be listed in the list of drives present in the system located in the left pane of the Ubuntu file manager window ("Nautilus").

Recommended: