> For the complete documentation index, see [llms.txt](https://101110.gitbook.io/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://101110.gitbook.io/workspace/creating-the-usb-installer.md).

# Creating the USB installer

Before we can start with making the actual installer we will need to prepare the 8+ GB USB drive. You need to make sure your drive is set up in the following way:

* GUID Partition Map (GPT)
* 1 Data partition
* OSX Extended (Journaled) (jHFS+)

We are going to execute some commands in the terminal to achieve this. To open the terminal you need to do the following:

1. Open Finder
2. go to *Applications*
3. go to *Utilities*
4. double click on *Terminal*

Now that you have Terminal open run `diskutil list`, this command will list all the drives connected to your machine and their partitions. Note down the identifier for your USB drive, this will be needed later.

***DO NOT GUESS, WE ARE ABOUT TO ERASE THAT DRIVE.***

Run the following command with `disk#` replaced by your identifier.

```bash
diskutil partitionDisk /dev/disk# GPT JHFS+ "USB" 100%
```

* `diskutil`- This is the program we are executing, short for Disk Utility
* `partitionDisk`- Pretty selfexplanatory, tells diskutil that we are want to partition a disk.
* `/dev/disk#`- The drive we want to edit.
* `GPT`- Use GUID partition map.
* `JHFS+ "USB" 100%`- Make a partition called *USB* using the entirety of the disk and format it as JHFS+.

We will be using the High Sierra command in this case as Mojave isn't yet supported by the AMD kernel. \
The following command assumes you have your BaseSystem.dmg on your desktop. Adjust if needed.

&#x20;***Replace the # with your disk's identifier***

```bash
sudo asr restore -source ~/Desktop/BaseSystem.dmg -target /dev/disk#s2 --erase
```

*This takes a lot of time and doesn't create a lot of output*. It can take a good 30-40 minutes on a weaker machine, so just because it doesn't change anything on screen don't assume it froze. Grab a cup of good coffee, talk with your family, watch an episode of your favourite show and come back after that, it should be done.

When this is all done you will have a USB drive that can boot network recovery on a real mac. You only need to add a few hackintosh specific things and you will be ready to go.&#x20;

At some point in the future I might write a script that does this for you. For the  lazy and/or easily scared by the command line.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://101110.gitbook.io/workspace/creating-the-usb-installer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
