foxlet / macOS-Simple-KVM

Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
13.62k stars 1.14k forks source link

How the ESP is created #151

Closed nift4 closed 4 years ago

nift4 commented 4 years ago

I'm wondering, this script does transparently download macOS and launch QEMU but the ESP.qcow2 can't be generated by the user AFAIK. (But this is my first try with Hackintosh). How did you created it @foxlet?

Pilo11 commented 4 years ago

Good question. Very interesting for us :D

confiks commented 4 years ago

@foxlet Would you have any basic pointers on how ESP.qcow2 is built?

foxlet commented 4 years ago

Some basic pointers, it's just a blank FAT32 partition with the ESP flag set, and files extracted from the ISO version of Clover (to avoid the Apple Installer requirements). startup.nsh is also copied to get around the lack of NVRAM variables when a new machine is created. The other custom part is a minimal config.plist.

https://sourceforge.net/projects/cloverefiboot/files/Bootable_ISO/

nift4 commented 4 years ago

Thanks for the info 🙂

otuva commented 1 year ago

Here's tree output of ESP.qcow2

.
├── EFI
│   ├── BOOT
│   │   └── BOOTX64.efi
│   └── CLOVER
│       ├── CLOVERX64.efi
│       ├── config.plist
│       ├── drivers64UEFI
│       │   ├── ApfsDriverLoader-64.efi
│       │   ├── apfs.efi
│       │   ├── AppleImageCodec-64.efi
│       │   ├── AppleKeyAggregator-64.efi
│       │   ├── AppleKeyFeeder-64.efi
│       │   ├── AppleUITheme-64.efi
│       │   ├── AptioMemoryFix.efi
│       │   ├── DataHubDxe-64.efi
│       │   ├── FirmwareVolume-64.efi
│       │   ├── FSInject-64.efi
│       │   ├── SMCHelper-64.efi
│       │   └── VBoxHfs-64.efi
│       ├── kexts
│       │   ├── 10.13
│       │   ├── 10.14
│       │   │   └── VoodooHDA.kext
│       │   │       └── Contents
│       │   │           ├── _CodeSignature
│       │   │           │   └── CodeResources
│       │   │           ├── Info.plist
│       │   │           └── MacOS
│       │   │               └── VoodooHDA
│       │   ├── 10.15
│       │   └── Other
│       │       └── VoodooHDA.kext
│       │           └── Contents
│       │               ├── _CodeSignature
│       │               │   └── CodeResources
│       │               ├── Info.plist
│       │               └── MacOS
│       │                   └── VoodooHDA
│       └── tools
│           ├── bdmesg.efi
│           ├── Shell32.efi
│           ├── Shell64.efi
│           ├── Shell64U.efi
│           └── Shell.inf
├── nvram.plist
└── startup.nsh

ESP.qcow2.zip