Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
229 changes: 176 additions & 53 deletions empty/samedisk.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,180 @@
# Dualbooting on the same disk

Basically, you only have one empty disk and you want to install multiple OSes to it, it *does not matter if there are other disks*, as this section will only take care of one disk.
# Dual-Booting on a Single Disk

## Precautions

- BACKUP YOUR DATA
- If possible, disconnect or disable any other disk/drive in your system, as it may interfere with the install procedure (especially windows')
- The drive isn't corrupted or have bad sectors
- Stable power input

## Situation this applies for

- You already have macOS installed
- You have an empty disk with no OS installed

---

To start, it is recommended to install the OSes on an empty drive with this order (although it will be noted later that it doesn't matter):

1. macOS
2. Any other OS

and make sure to:

1. Format the disk with macOS disk utility
2. NOT to format the second partitions with MSDOS
3. Have an OpenCore USB disk with you

Here is how it goes:
This section covers installing multiple operating systems onto a single physical drive. Even if you have multiple drives connected to your system, the instructions below focus exclusively on configuring a single target disk.

### While installing macOS

1. Format your whole disk to GPT, this will ensure that macOS installer will create the necessary 200MB EFI partition that macOS requires (otherwise, APFS/HFS will not format the partition)
![Disk Utility in macOS Installer, select View > All Drives](../images/disku1.png)
2. Once done, select "Partition", press "**+**" and choose the size of the other partition(s), "Format" MUST be `Mac OS Extended` or `APFS` (otherwise, macOS will convert the drive to hMBR which will break Windows installation).
![You can add as many partitions as you like, **Remember their sizes**](../images/disku2.png)
3. Hit Apply and let it do its thing:
* NOTE: on some macOS releases/setups, the disk utility may suddenly crash and send you back to the main menu, DO NOT PANIC (~~that sure helps~~), just wait for a minute or two then open disk utility back and check if the formatting is done.
4. Once done, you can install macOS on the partition of your choosing and continue along.

#### Note

* You can still do the above if you have macOS already installed, do NOT use bootcamp assistant.
* BootCamp assistant will add extra drivers to the Windows installer that we do not need.

### For the others

#### Windows

Windows can be a bit of a bitch when it comes to installing it as a second OS (like some kind of insult or just Microsoft doesn't realize that there are other OSes than Windows /s). Create your windows installer (on another computer with the windows creation disk utility or [Rufus](https://rufus.ie))

In case Windows has any issues while installing, boot back to the installer, remove the MSR/Recovery/Windows partitions that the installer made (there may be more, make sure you do not delete macOS or other OSes partitions), and follow [this guide over at TenForums](https://www.tenforums.com/tutorials/84331-apply-windows-image-using-dism-instead-clean-install.html) on how to install windows manually using the `dism` tool.

#### Linux
## Precautions

Linux can be straightforward, unlike Windows. Popular linux distros allow custom disk partitioning, just format the blank partition to EXT4 (or whatever other FS you prefer) and make sure you choose the same EFI partition for where the bootloader will be installed (this should NOT "delete" OpenCore in any shape or form) and install. Other distros (like Arch) would do that manually anyway, just follow the standard procedure from the beginner guide (without formatting the EFI, because it's already formatted to FAT32) and follow through. Personally, I would recommend not to install other bootloaders (like systemd-boot or grub) for the likes of arch because OpenCore can boot linux kernels that have EFISTUB support, if you do however like using a separate bootloader, you can have it your way, it doesn't change anything.
Before proceeding, please ensure you have taken the following safety measures:

- **Backup Critical Files:** Ensure your `EFI` folder and `com.apple.recovery.boot` are backed up to an external location for easy restoration if needed.

- **Isolate the Target Drive:** To prevent accidental data loss or bootloader conflicts (particularly with Windows installers), disconnect or disable all other drives in your system during the installation process.

- **Verify Drive Health:** Ensure the target HDD or SSD is in good condition, with no reported bad sectors or corruption.

- **Ensure Power Stability:** Connect your system to a stable power source, such as a UPS (Uninterruptible Power Supply) or an AVR with surge protection, to prevent shutdowns during partitioning or installation.


## Supported Scenarios

This configuration applies to the following starting states:

1. **Existing macOS Installation:** You already have macOS installed (typically on the first partition) and wish to add another OS.
2. You are starting with a completely empty disk containing no operating system.


## Preparation & Recommended Order

To start, it is recommended to install the OSes on an empty drive in the following order (although strict order is not mandatory):

1. **macOS**
2. **Any other OS**


**Crucial Steps:**

1. **Disk Formatting:** Format the disk **ONLY** using macOS Disk Utility.
2. **Partition Strategy:** Prepare your partitions within macOS Disk Utility to ensure the correct partition table (GPT) and EFI structure are created. Ensure your BIOS is set to **UEFI** (with CSM off) to allow the system to boot properly.
3. **Boot Media:** Ensure you have a functional OpenCore USB disk with you.


## Step 1: Partitioning the Drive (macOS Installer)

1. Prepare your whole disk to **GUID Partition Map (GPT)**. This ensures the macOS installer creates the necessary 200MB EFI partition.

2. Select **Partition**, press "**+**" and choose the size of the partition(s) for your other OSes.

- **Name:** Give it a clear name like "Windows" or "Linux" so you can easily identify it later.

- **Format:**
- **macOS Partition:** Must be **APFS** or HFS+ (Mac OS Extended) .
- **Windows Placeholder:** Format as **exFAT**.
- _Note: As long as the disk uses GPT and Windows installs in UEFI mode, using exFAT here is safe._

- **Linux Placeholder:** Format as **exFAT** or **Mac OS Extended**
- _Note: You will reformat this to your preferred filesystem (EXT4, Btrfs, etc.) during the Linux installation._
3. Hit Apply and let it process.
**NOTE:** On some macOS releases, Disk Utility may crash and return to the main menu. Do not panic; just wait a moment and reopen Disk Utility to check if the formatting completed.


## Step 2: Install macOS

1. Select the **APFS** or HFS+ (Mac OS Extended) partition you created for macOS.
2. Proceed with the installation normally.
3. After installation is complete, boot into macOS.


## Step 3: Inject OpenCore EFI

1. Mount the EFI partition on the disk (this ~200 MB partition was automatically created during the GPT format).
3. Enter to the terminal on macOS `sudo diskutil mount EFI`. This command will ask for your password.
2. Copy your working **OpenCore EFI** from your USB drive into the disk's **EFI partition (ESP)**. The structure should look like this:


```
EFI/
EFI/
BOOT/
BOOTx64.efi
OC/
OpenCore.efi
config.plist
Drivers/
Kexts/
ACPI/

```

_This ensures the firmware can load OpenCore from the drive and detect macOS._
_Make sure to copy the `EFI` folder and not the contents inside._


## Step 4: Install Windows

- Boot the Windows installer (ensure you boot in UEFI mode).
- When asked where to install, locate and select the **exFAT placeholder partition** you created earlier.
- **IMPORTANT:** Click **Format** in the Windows installer options.
- **Do NOT delete** the partition.
- **Do NOT create a new** partition.
- _Formatting the existing partition ensures Windows uses the existing EFI System Partition (ESP) without overwriting the OpenCore bootloader or changing the partition map._
- Proceed with the installation.



## Step 5: Verify EFI Partition

After Windows installation is complete, your EFI partition structure should contain both OpenCore and Windows boot files:

```
EFI/
EFI/
BOOT/
BOOTx64.efi ← OpenCore
OC/
OpenCore.efi
config.plist
(and other files)
Microsoft/
Boot/ ← Windows bootloader

```

- **Result:** OpenCore should now handle booting both macOS and Windows.


## Step 6: Boot and Test

1. Reboot your computer.
2. The **OpenCore BootPicker** should appear automatically.
3. You should see options to select either **macOS** or **Windows**.
4. You no longer need the USB drive to boot OpenCore if the EFI folder was correctly injected. The disk drive should handle the boot.


## Troubleshooting & Alternative Installation Methods

**Note:** The standard methods above usually yield the best results. The following guides are intended for scenarios where the standard installers fail or encounter errors.

### Windows: Manual Installation via DISM

#### Note regarding Boot Camp
- You can still perform the manual steps below if you have macOS already installed.
- **Do NOT use Boot Camp Assistant.**
- Boot Camp Assistant will add extra drivers to the Windows installer that we do not need, and it may interfere with the OpenCore partition structure.


The Windows installer can sometimes struggle with complex partition tables or multi-boot environments. If the standard installation fails:

1. **Preparation:** Ensure you have a Windows installer USB created using the Media Creation Tool or [Rufus](https://rufus.ie "null").

2. **Cleanup:** If a previous installation attempt failed, boot into the installer and carefully delete _only_ the Windows-related partitions (MSR, Recovery, or incomplete NTFS partitions) created by that attempt.

- **WARNING:** Do not delete your macOS partition or the main EFI System Partition.

3. **DISM Method:** Use the Deployment Image Servicing and Management (DISM) tool to manually apply the Windows image.

- Follow this detailed guide: [Apply Windows Image using DISM instead of Clean Install (TenForums)](https://www.tenforums.com/tutorials/84331-apply-windows-image-using-dism-instead-clean-install.html "null").

- This method bypasses the installer's strict partition logic and allows for more control.


### Linux: Manual Partitioning
Linux installation is generally more straightforward, but requires attention to the EFI partition.

1. **Partitioning:** Most user-friendly distros (Ubuntu, Fedora, Mint) allow for a "Something Else" or "Manual Partitioning" option.

- Select your placeholder partition and format it to your preferred file system (e.g., EXT4, Btrfs).

- **Important:** Identify the existing EFI partition (containing OpenCore). Set it to be mounted as `/boot/efi` (or the distro-specific EFI mount point), but **DO NOT FORMAT IT**. Formatting this partition will destroy your OpenCore installation.

2. **Manual Installs (Arch, Void, etc.):**

- Follow your distribution's standard installation guide.

- Skip the step to create/format the EFI partition (`mkfs.fat`). Instead, simply mount the existing EFI partition.

3. **Bootloaders:**

- **OpenCore vs. GRUB:** OpenCore can boot Linux kernels directly if they have EFISTUB support (which most modern kernels do).

- **Recommendation:** While you can install GRUB or systemd-boot alongside OpenCore, it is often cleaner to rely on OpenCore's native Linux detection. If you choose to install GRUB, ensure it does not overwrite the default `BOOTx64.efi` unless you intend to chain-load OpenCore from GRUB.