# Initial setup.

### Before :

**Make sure you have a backup solution to boot**. Another partition, a USB stick, whatever. We are setting up a shared Clover folder. I will certainly make changes that prevent it to boot at some point.\
If you locked out because you rely on this shared clover folder to boot, you'll be in trouble and I won't be able to help.

**NOTE** : Taking time to set things up correctly first saves a lot of time after. Please follow step by step. If something doesn't work as written, or is unclear, please tell me instead of continuing, trying to correct things by yourself and issuing commands without telling me.

### Setup :

* Create a github repository. Name it `"«EFI4{your name on insanelymac}»`.
* Get to repo URL in Gitbug : <img src="https://1913005113-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MKDyWePaXO8CGoHcSpm%2F-MKE2wHnPD1M6FxlQetH%2F-MKEBpfqLt2pnWbx0orf%2FScreenshot%202020-10-22%20at%2010.12.42.png?alt=media&#x26;token=f0b7722d-e8bb-4925-a420-3f0d8ad095f1" alt="" data-size="original">&#x20;
* ->`cd {Bootloader partition}`
  * Remember, not the `Clover folder`.
* -> `git clone {repo url} EFI`
* -> `cd EFI`
* Get BootloaderChooser BootX64.efi from here : [`https://github.com/jief666/BootloaderChooser/releases`](https://github.com/jief666/BootloaderChooser/releases).
* Copy BootX64.efi in `{Bootloader partition}/EFI/BOOT`.

### If you have a working Clover :

Before you start, remember that you are setting up a shared Clover folder for tests. This Clover folder will live for the time of the test and we be specific to that test. It'll be a stripped down version of the working Clover folder.\
**Do not delete** your working Clover folder. This shared Clover folder is **not** a replacement.

* Set up your **working** Clover folder in `{Bootloader partition}/EFI/CLOVER`.
  * Call you Clover efi file `«CloverX64.ok.efi»`.
  * **Use CloverConfigPlistValidator to clean your config.plist**. Download it from here : [https://github.com/jief666/CloverCommits](https://github.com/jief666/CloverCommits).
  * Do not use the OEM folder. Because I don't have the same hardware as you, I couldn't test boot your config if you use OEM folder. So copy your `OEM/[System name}/ACPI`, `OEM/[System name}/Kexts` and `OEM/[System name}/config.plist` in `EFI/CLOVER`.&#x20;
  * Delete any unused folder. Like «doc», «OEM», «ROM», in Clover folder. You can keep them in your personal Clover folder, of course.
  * In general : the less there is, the better it is.
* Check that it boots fine. On first boot, you'll get BootloaderChooser text menu. Select the efi file `«\EFI\CLOVER\CloverX64.ok.efi»`.\
  NOTE : on next boot, you won't see the text menu again, unless you boot your computer with a key pressed down.
* -> `rm {Bootloader partition}/EFI/CLOVER/misc/preboot.log`
* -> `rm {Bootloader partition}/EFI/CLOVER/misc/debug.log`
* go to **Finish**.

### If you have a working OpenCore :

* Set up your **working** Clover folder in `{Bootloader partition}/EFI/OC`.\
  Call you OpenCore efi file `«OpenCore.ok.efi»`.
* Check that it boots fine. On first boot, you'll get BootloaderChooser text menu. Select the efi file `«\EFI\CLOVER\OpenCore.ok.efi»`.\
  NOTE : on next boot, you won't see the text menu again, unless you boot your computer with a key pressed down.
* -> `rm {Bootloader partition}/opencore*.txt`
* go to **Finish**.

### Finish

* reboot.
* -> `cd {Bootloader partition}/EFI`
* -> `echo ".DS_Store" > .gitignore`
* -> `echo "._*" >> .gitignore`
* -> `echo "/CLOVER/smbios.plist" >> .gitignore`
* -> `echo "Do not delete please." > "{your insanelymac name}.txt"`
* -> `git add -A && git commit -m "initial commit" && git push`
* Invite me as a collaborator for your github repo. Go in "Settings" -> "Manage access". See picture below. Invite `jief666` :&#x20;

![](https://1913005113-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MKDyWePaXO8CGoHcSpm%2F-MKEDyiyZnD5mliVbA_p%2F-MKEE0CD6rk4Y14G8mOZ%2FScreenshot%202020-10-22%20at%2010.34.44.png?alt=media\&token=f16e96c3-a3e0-40f7-b397-fdc5cb18fcba)

* Open an issue in your repo with a brief description.
* Send me a private message on Insanelymac, just to be sure I got the notification.
* From now, regarding this issue, we'll write on Github.



**WARNING** : Do not clone the repo on your main drive, and copy efi file or other files I've sent you through the repo to your "real" Clover folder. I need to know and be sure, 100% of the time, that you boot on the exact folder we share.\
If you want to make other test on your own, rename this "EFI" folder anything you want (like "EFI\_shared") and rename your personal work-in-progress to "EFI".\
Best is to have your own EFI folder and our shared EFI folder on 2 different partitions (or USB stick), so you don't have to rename anything.

