One limitation of Disk Utility is that the graphical interface can only partition a disk with up to 16 partitions. Then, select each one and name it while making sure we specify the size required. If we tried to perform the same task within Disk Utility, we'd first need to specify the number of partitions from the drop down menu. If the total size of all volumes is less than the space on the hard disk you're wanting to partition, the remaining space will be left as free. diskutil partitionDisk /dev/disk2 GPT JHFS+ First 10g JHFS+ Second 10g JHFS+ Third 10g JHFS+ Fourth 10g JHFS+ Fifth 0bįor each additional partition you wish to add, the usage convention is as follows: Volume1Format Volume1Name Volume1Size Volume2Format Volume2Name Volume2Size Volume3Format Volume3Name Volume3Size. Using the same command, we partition a hard disk with multiple partitions and formatting them as useable volumes. So the command to run will repartition a hard disk identified as disk2 with GUID Partition Table containing a single volume called New that spans the entire disk. Specifying 0b tells the command to just use all available free space. You can specify any size you wish, up to the maximum size of the free space available, using b (bytes), m (megabytes), g (gigabytes) and so-on. This represents the size of the partition to create. Partition SizeĪt the end of the command is the argument 0b. Intel Macs can only boot from GUID partitions. Unless you intend to boot a PowerPC-based Mac or Windows PC with your hard disk, there's no reason to select anything other than GPT. GPT is an option for the Partition Scheme. You'll also recognise JHFS+ as the filesystem, followed by the label to give the newly-created volume. The first three parts of the command are self explanatory, there's the actual diskutil command followed by the option partitionDisk and the disk's identifier /dev/disk(n). To partition a disk, we use: diskutil partitionDisk /dev/disk2 GPT JHFS+ New 0b This level of automation is simply not possible with Disk Utility, demonstrating how the command-line can be more useful. To automate the process and guarantee that each drive created was exactly the same, a shell script would automatically split a drive into the desired number of partitions then restore various versions of OS X and diagnostic software automatically. We'd usually need at least 5-10 of these drives at any one time and they all had to be identical, so every month each drive would be reset. Real World Usageīack in my days on the Genius Bar, we would use the command-line to create external diagnostic drives that contained multiple volumes. Next, we'll see how we can perform disk partitioning as well as how to split, merge and erase ones created. In the first part of this series, we explored the basics of disk and partition management via the command-line.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |