Formatting a U Disk with Diskutil on Mac

Formatting a U Disk with Diskutil on Mac

Introduction

If you’re familiar with Win32DiskImage, you might have encountered the issue of a mirrored disk becoming multiple partitions, some of which cannot be mounted. Mac’s built-in disk management tools may struggle to handle this situation. Fortunately, there’s a reliable partitioning tool available for Mac users. If you’re looking for an alternative, I’ve used fdisk under Linux and DiskGenius under Windows, but for Mac users, I recommend using diskutil.

Formatting a U Disk using Diskutil

To begin, let’s take a look at the current system disk configuration using the diskutil command:

$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme * 121.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 121.1 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +121.1 GB disk1
1: Physical Store disk0s21 91.8 GB disk1s1
2: APFS Volume Preboot 44.9 MB disk1s2
3: APFS Volume Recovery 522.8 MB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme * 124.2 GB disk2
1: Microsoft Basic Data 243.7 KB disk2s1
2: EFI NO NAME 2.9 MB disk2s2
3: Apple_HFS PVE 683.5 MB disk2s3
4: Microsoft Basic Data 307.2 KB disk2s4

As you can see, there are three disks in the system, with the last one being our U disk. To format it, we’ll use the following command:

$ diskutil partitionDisk /dev/disk2 MBR FAT32 UNTITLED 0b

This command will format the U disk into a FAT32 format.

Tips and Recommendations

When working with disk management tools, it’s essential to exercise caution to avoid data loss or corruption. Always make sure to back up your important files and data before attempting any disk formatting or partitioning operations.

By using diskutil to format your U disk, you’ll be able to ensure that it’s properly configured for use on your Mac system. If you have any questions or concerns about disk management or formatting, feel free to ask in the comments below.