diskutil
is a Mac OS native utility that can be used to modify, verify and repair local disks by manipulating their structure.
Terminologies
A partition is a logical storage unit located on a hard disk. A hard disk can contain a single partition, using all the space it contains, or it can be split into multiple partitions.
To store data on a partition, it needs a filesystem. Once a partition has been formatted, this combination of partition and filesystem is known as a volume.
There are three Partition Schemes you can use:
- GPT: GUID Partition Table
- APM: Apple Partition Map
- MBR: Master Boot Records
Unless you intend to boot a PowerPC-based Mac or Windows PC before Windows 7 32-bit with your hard disk, there’s no reason to select anything other than GPT. Intel Macs only boot from GUID partitions. Linux supports both MBR and GPT.
diskutil
- The Tool
The diskutil
command provides many of the features of Mac OS X Disk Utility, from verifying and repairing volumes to changing partition information.
diskutil list
Should you have a number of disks and only want to view information about a specific one, you can append the disk identifier to the command:
The first number represents the physical disk identifier. The number following the letter “s” represents the partition number. If a disk has three partitions, it would follow this convention:
- disk2s1
- disk2s2
- disk2s3
diskutil info
In addition to list, you can also use info with the corresponding identifier to display even further information, like so:
Verifying and repairing volumes
You can verify and repaire the file system data structures of a volume
Erasing disks
You can either erase a whole disk which will remove any partitions stored upon it, or individual volumes without affecting others.
To erase an entire disk, you’ll need the disk identifier, enter the following, adjusting the disk identifier to suit:
Utilities
Back up SD Card or USB Storage
Restore Backup Images (NDF/ISO) to SD Card or USB Drive
Reference - Respberry Pi documentation
Create Bootable Linux USB Stick
-
Convert ISO
-
Unmount USB stick
-
Write image to USB stick
-
Check progress with
Ctrl + t
{.verbatim}