Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Script formatting of drive #2

@davidje13

Description

@davidje13

Setting up a new USB stick requires the following manual process (quoted in the readme):

Plug your drive into your computer and open Disk Utility. Eject the volume by clicking the icon in the list on the left, then select the disk (not the volume) on the left and navigate to the "Erase" tab. You'll want to name the volume something simple (such as "keys") to make it easier to access on the command line.

Depending on the format of your USB key's partition table, then the partition table is MBR, which doesn't support encryption, and you won't see encrypted partitions as options in the "Format" dropdown. In that case, you'll have to do a two-step dance, formatting the drive twice:

Once as OS X Extended (Journaled) using the GUID Partition Map, then..
Again, using Mac OS Extended (Case-sensitive, Journaled, Encrypted). Note that you may need to re-eject the volume before doing this.
If you see the encrypted options in the dropdown, then just jump straight to #2 above.

This could be completed using a few commands which would be simpler to follow when setting up. See for example: http://www.theinstructional.com/guides/disk-management-from-the-command-line-part-1

Formatting can be done with:

diskutil eraseVolume jhfsx New /Volumes/MyMemoryStick

Need to find out how to apply encryption (and if necessary, how to change partition table type). Also need to ensure safety checks are applied to avoid accidentally reformatting the wrong drive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions