DirkRockface

Monterey Install

Aug 11th, 2022 (edited)
3,673
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.85 KB | None | 1 0
  1. UPDATE to previous pastebin for BigSur... this one is for Monterey and is confirmed to work with a GT710 and a GT730
  2. UPDATE 2: this is now working for my AMD Radeon 6600 xt. final steps below on how to get that to work. You have to install the OS using the below steps with either VNC or a known good card (GT710 or GT730) and then change the boot-args (see step 20a)
  3.  
  4. Probably best to clean out all previous failed attempts... delete the two helper scripts, remove old docker, erase appdata/macinabox folder... start fresh!
  5.  
  6. If you plan to passthru any devices (GPU, USB Card, etc) go to the Tools -> System Devices and put check marks next to the devices you want to passthru... then bind them to VFIO at boot. You may need to also tell your bios to NOT use the GPU you want to passthru so it doesn't get grabbed by UNRAID (even with the bind at VFIO stuff checked with my motherboard i had to tell it to use another video card as the primary so it wouldn't touch my GT710 at Unraid startup)
  7.  
  8. You'll also want to use Legacy mode for your unraid... like spaceinvader one said, you may not need to, you can try both, but he seemed to have better luck in legacy mode. I honestly changed so many variables at once in all my trouble shooting that when i finally got it working, i happened to be in legacy mode... the below steps MAY work great in UEFI mode... but i'm too nervous to change it now and retest :D
  9.  
  10. 1) Use macinabox to install monterey with the following variables:
  11. Operating System Version: Monterey
  12. Install Type: Auto Install
  13. Vdisk Size: 100G (or whatever you want)
  14. Vdisk Type: raw
  15. Opencore stock or custom: stock
  16. Delete and replace Opencore: no
  17. Override default NIC type: no
  18. VM Images Location (x2): If you change these, you will need to edit one of the helper scripts. I changed mine to nvme drive and will point out the place that needs to be edited later on in this guide.
  19. Isos Share Location (x2): wherever you want the install files to be stored
  20. appdata: wherever you keep it (will need to change some stuff in the script to match this location)
  21.  
  22. Show more settings:
  23. i changed custom ovmf location to on the nvme to match where i keep my system folder (this requires editing the xml later to match)
  24. Inject helper scripts: Yes
  25. RUN
  26.  
  27. 2) Go to your user scripts under settings and change the vmready notify script (while [ ! -d _______ ] to match appdata location (if you changed it in step 1 above) then run in background to let you know when ready.
  28.  
  29. 3) Once the vmready script says you are done downloading... open the helper script and edit the appdata place that you MAY have changed the location of your files.
  30.  
  31. Save changes to the script
  32.  
  33. 4) RUN the helper script. Your VM should now show up in the VMS tab as "Macinabox Monterey"
  34.  
  35. 5) ****From here on out... only edit xml by hand*** NEVER update or save changes using the vm GUI... it will break. It broke my gpu passthru editing the form and then running the helper script each time. I'm sure it was something i messed up... but custom xml editing worked like a charm for me and eliminated all my problems! JUST DON'T MESS WITH IT IF YOU'VE BEEN HAVING PROBLEMS
  36.  
  37. 6) Click on the vm and select edit. Then change to XML view in the top right
  38.  
  39. XLM: Here are the step by step edits you'll want to do.
  40.  
  41. 1) change name to "Monterey" or whatever else you want.
  42. 2) change memory to whatever you want in both places (For 8GB "8388608")
  43. 3) change vcpu to number of cores if you want
  44. 4) change cputune to for what you set above
  45. If you aren't familiar with what numbers you need to put in the above, it's almost easier to create a dummy Linux vm and set the cores and memory there what you want... then tell it not to start after creation, create the vm, then go look at the XML and copy and paste the CPU core and memory info. Infact, that's a good trick to get ANY of the xml options that you may be unsure of... you never need to install the vm or run it but editing the template and then looking at the vm will help you see how it should be laid out.
  46.  
  47. For the Memory i picked and the CPU layout i did, it looks like this (adjust the cpuset numbers to match your core #s):
  48.  
  49. <memory unit='KiB'>8388608</memory>
  50. <currentMemory unit='KiB'>8388608</currentMemory>
  51. <memoryBacking>
  52. <nosharepages/>
  53. </memoryBacking>
  54. <vcpu placement='static'>4</vcpu>
  55. <cputune>
  56. <vcpupin vcpu='0' cpuset='5'/>
  57. <vcpupin vcpu='1' cpuset='13'/>
  58. <vcpupin vcpu='2' cpuset='7'/>
  59. <vcpupin vcpu='3' cpuset='15'/>
  60. </cputune>
  61.  
  62. 5) change os paths to match custom ovmf location you set in your docker template!! (i actually skipped this step and it still worked fine with the default paths (because it also installed there... just make sure it points to something that exists either in the custom location or default)
  63.  
  64. <os>
  65. <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
  66. <loader readonly='yes' type='pflash'>/mnt/disks/samsung_nvme/system/custom_ovmf/Macinabox_CODE-pure-efi.fd</loader>
  67. <nvram>/mnt/disks/samsung_nvme/system/custom_ovmf/Macinabox_VARS-pure-efi.fd</nvram>
  68. </os>
  69.  
  70. 6) Change CPU mode line to match any changes you made above. For instance, the above setup i gave it 4 threads, which would be 2 cores with 2 threads each:
  71.  
  72. <cpu mode='host-passthrough' check='none' migratable='on'>
  73. <topology sockets='1' dies='1' cores='2' threads='2'/>
  74. </cpu>
  75.  
  76. 7) Under Devices:
  77.  
  78. First two disks should look like the below (make sure you check the paths to match any locations you may have changed):
  79.  
  80. <disk type='file' device='disk'>
  81. <driver name='qemu' type='raw' cache='writeback'/>
  82. <source file='/mnt/disks/samsung_nvme/vms/Macinabox Monterey/Monterey-opencore.img'/>
  83. <target dev='hdc' bus='sata'/>
  84. <boot order='1'/>
  85. <address type='drive' controller='0' bus='0' target='0' unit='2'/>
  86. </disk>
  87. <disk type='file' device='disk'>
  88. <driver name='qemu' type='raw' cache='writeback'/>
  89. <source file='/mnt/user/isos/Monterey-install.img'/>
  90. <target dev='hdd' bus='sata'/>
  91. <address type='drive' controller='0' bus='0' target='0' unit='3'/>
  92. </disk>
  93.  
  94. Third disk will be ONE of the two choices below:
  95. If using a vdisk:
  96.  
  97. <disk type='file' device='disk'>
  98. <driver name='qemu' type='raw' cache='writeback'/>
  99. <source file='/mnt/disks/samsung_nvme/vms/Macinabox Monterey/macos_disk.img'/>
  100. <target dev='hde' bus='sata'/>
  101. <address type='drive' controller='0' bus='0' target='0' unit='4'/>
  102. </disk>
  103.  
  104. If you want to install on a passed thru bare metal drive:
  105.  
  106. <disk type='block' device='disk'>
  107. <driver name='qemu' type='raw' cache='writeback'/>
  108. <source dev='/dev/disk/by-id/ata-CHANGE_THIS_TO_MATCH_YOUR_DRIVE_NAME'/>
  109. <target dev='hdc' bus='sata'/>
  110. <address type='drive' controller='0' bus='0' target='0' unit='4'/>
  111. </disk>
  112.  
  113. I didn't touch any more XLM until you get down to the graphics line for GPU passthru:
  114.  
  115. 8) If you have a GT710 or GT730, do steps below... if you only have a 6600XT skip this step and use the VNC viewer to install system and then after step 20a, do the below for the 6600 XT.
  116.  
  117. Replace everything in the <graphics> and <video> brackets with the below code remembering to look out for a few things:
  118. 1) replace bus='0x0b' in the two places with whatever bus your video card is on (can be found in tools -> System Devices). In the below example my NVIDIA Corporation GK208B [GeForce GT 730] was located at 0b:00.0 and the associated audio controller was at 0b:00.1 So for me it was bus='0x0b' slot='0x00' function='0x0' for the video card and bus='0x0b' slot='0x00' function='0x1' for audio. Adjust yours to match.
  119.  
  120. 2) add the location of the vbios rom for your card (if needed... i did not need it for the 710/730)
  121.  
  122. 3) in the two address type lines, i choice bus='0x04' as it was the first one the xml hadn't used... should be the same for you with a fresh install but you may need to change that if your setup is wildly different.
  123.  
  124. <hostdev mode='subsystem' type='pci' managed='yes'>
  125. <driver name='vfio'/>
  126. <source>
  127. <address domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
  128. </source>
  129. <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0' multifunction='on'/>
  130. </hostdev>
  131. <hostdev mode='subsystem' type='pci' managed='yes'>
  132. <driver name='vfio'/>
  133. <source>
  134. <address domain='0x0000' bus='0x0b' slot='0x00' function='0x1'/>
  135. </source>
  136. <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
  137. </hostdev>
  138.  
  139. 9) I also added passthru for a mouse and keyboard but then later changed it to an entire USB card so i could dedicate multiple usb ports to this vm. The code for a USB card passthru is below with the following notes:
  140.  
  141. 1) my usb card was at 07:00.0 (Tools -> System Devices) so my line below is <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
  142.  
  143. 2) and i assigned it to bus 0x06 as i used 0x05 for something else.
  144.  
  145. <hostdev mode='subsystem' type='pci' managed='yes'>
  146. <driver name='vfio'/>
  147. <source>
  148. <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
  149. </source>
  150. <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
  151. </hostdev>
  152.  
  153. 3) If passing thru the individual mouse and keyboard, use the the dummy vm trick to check the boxes and then copy and paste the XML code making sure that the two busses in the address type line are not used elsewhere.
  154.  
  155. 10) Save XML and RUN VM!
  156.  
  157. 11) You should now see your monitor pop to life with options. If so, congratulations, 90% of your heartache is behind you and GPU passthru is working. If not... then you either do not have a compatible GPU or unraid grabbed your video card on startup and is holding it hostage. Try installing another video card and or telling your bios to NOT use the video card as the primary... for me this was in the bios settings as telling it which PCI slot was to be used by unraid. You can also switch unraid to boot in legacy mode if in UEFI or the other way around... (see note at top).
  158.  
  159. 12) INSTALL Monterey
  160.  
  161. 1) Select macOS Base System. MacOS recovery will start.
  162. 2) Select Disk Utility
  163. 3) Select the correct drive to install on (should match the size you made in the docker or the size of the baremetal drive if doing passthru)
  164. 4) Select Erase
  165. 5) Give it a Name
  166. 6) Select Erase / Select Done
  167. 7) Quit Disk Utility
  168. 8) Select Reinstall macOS Monterey
  169. 9) Select Continue / Continue / Agree / Agree
  170. 10) Select the disk you named in step 5.
  171. 11) Select Continue
  172.  
  173. * MacOS will now install and restart a number of times (4 for me). Select the macOS installer after first restart, macOS installer after second restart, and then the name of the disk you created twice.
  174.  
  175. * If using a GT710 or GT730 it will be sluggish until we run an update at the end to get the video drivers in.
  176.  
  177. 12) setup Monterey (don't sign in with apple id... we will fix this later)
  178.  
  179. 13) Install and setup OpenCore Configurator (the version you install will complain about you using an old version of boot loader... we will fix this later) from https://mackie100projects.altervista.org/download-opencore-configurator/
  180.  
  181. 1) Download OpenCore Configurator
  182. 2) Drag the OpenCore Configurator to the applications folder.
  183. 3) Open OpenCore Configurator
  184. a) you will get a message saying it can't be opened... click OK
  185. b) go to system preferences -> Security & Privacy -> click the Open Anyway button and select Open
  186. 4) Go to Tools -> Mount EFI
  187. 5) in the bottom half under EFI Partitions, select the top drive (EFI o) and click Mount Partition, put in password, then click open partition
  188. 6) A folder should open. Drag those two things (EFI and NvVARS) to the desktop)
  189. 7) Unmount that partition.
  190. 8) Mount your harddrive (should be the one below the EFI o drive that has the name you gave it in the brackets) and open that partition
  191. 9) Copy two files on your desktop into the window that pops up.
  192. 10) Delete files from desktop
  193.  
  194. 14) UPDATE bootloader: when you open opencore in the future, it will tell you the version of the files you just copied over (that came with the macinabox install process) are old.
  195.  
  196. 1) Download new package (0.8.3 at time of this guide) at https://github.com/acidanthera/OpenCorePkg/releases/
  197. 2) unzip and open new opencore files
  198. 3) copy individial files into the folders, don't replace whole folders:
  199. a) copy X64/EFI/BOOT/BOOTx64.efi into EFI/BOOT folder on your mounted drive (replacing old one)
  200. b) copy X64/EFI/OC/Opencore.efi into EFI/OC folder on your mounted drive (replacing old one)
  201. c) copy X64/EFI/OC/Drivers/*.* into EFI/OC/Drivers folder on your mounted drive (replacing old ones)
  202. d) copy X64/EFI/OC/Tools/*.* into EFI/OC/Tools folder on your mounted drive (replacing old ones)
  203.  
  204. 15) While here, lets make smbios
  205. 1) Still in your mounted drive, open EFI/OC/Config.plist
  206. 2) Go to Platform info and next to the "check coverage" button, use the selection list to pick what you want your Mac to "be"
  207. 3) I picked Mac Pro Late 2013 for what it's worth... not sure how much that would affect the rest of this install.
  208. 4) Click the check coverage button to make sure that the serial number it generated for you is not on file... that way Apple services will work since you didn't randomly get an existing Mac Owners number.
  209. 5) Save and close open core window
  210.  
  211. 16) SHUT DOWN THE VM.
  212.  
  213. 17) Back on Unraid, edit the VM XML
  214. 1) change the source file= line on the first disk to be what your actual vm disk is and then erase the other two disks... leaving you with this if using a vdisk:
  215.  
  216. <disk type='file' device='disk'>
  217. <driver name='qemu' type='raw' cache='writeback'/>
  218. <source file='/mnt/disks/samsung_nvme/vms/Macinabox Monterey/macos_disk.img'/>
  219. <target dev='hdc' bus='sata'/>
  220. <boot order='1'/>
  221. <address type='drive' controller='0' bus='0' target='0' unit='2'/>
  222. </disk>
  223.  
  224. or this if using a passthru bare metal drive (note the change in the disk type as well):
  225.  
  226. <disk type='block' device='disk'>
  227. <driver name='qemu' type='raw' cache='writeback'/>
  228. <source dev='/dev/disk/by-id/ata-NAME_OF_YOUR_DRIVE_SEE_ABOVE'/>
  229. <target dev='hdc' bus='sata'/>
  230. <boot order='1'/>
  231. <address type='drive' controller='0' bus='0' target='0' unit='2'/>
  232. </disk>
  233.  
  234. 2) Save changes and start up VM
  235. 3) select your disk to start up (we will set up auto start to this disk later)
  236.  
  237. 18) Make it so it auto boots to that partition and bypasses that screen
  238. 1) Open OpenCore Configurator
  239. 2) mount EFI (Tools -> Mount EFI -> click mount partition next to your drive in bottom section)
  240. 3) open EFI/OC/config.plist
  241. 4) go to misc and uncheck show picker
  242. 5) Save and close OpenCore Configurator
  243.  
  244. 19) now to fix apple login
  245. 1) Download hackintool. (https://github.com/headkaze/Hackintool)
  246. 2) open it (using same steps as you first used to open OpenCore Configurator) and go to System -> Peripherals
  247. 3) Network interfaces should have a en0 but the built in is unchecked
  248. 4) open opencore -> mount EFI -> open config.plist
  249. 5) go to DeviceProperties and select ethernet controller from list of PCI Devices at bottom (if it's not listed already)
  250. 6) click the + on the far bottom right of the right box to add a property to the ethernet controller.
  251. 7) For "key" use: built-in
  252. 8) For "type" use: Data
  253. 9) For "value" use: 01
  254. 10) save and reboot
  255. 11) log in to apple services!
  256. 12) The hackintool technically isn't needed but it provides an easy graphical way to see if that "built-in" check box is checked.
  257.  
  258. 20a) fix video card hardware (AMD Radeon RX 6600 XT):
  259. 1) use OpenCore Configurator to mount EFI as above
  260. 2) open EFI/OC/config.plist
  261. 3) go to nvram
  262. 4) go to your nvram (the bottom one in UUID usually)
  263. 5) go to boot-args and add the value agdpmod=pikera
  264. (It should now be agdpmod=pikera keepsyms=1)
  265. 6) change your XML like above but instead of using the GT710 slot, make it the 6600xt
  266.  
  267. 20b) fix video card hardware (GT710/GT730):
  268. 1) Download OpenCore Legacy Patcher (https://github.com/dortania/OpenCore-Legacy-Patcher/releases)
  269. 2) Open it and click on Post install Root Patch
  270. 3) Start Root Patching
  271. 4) Yes
  272. 5) password for root
  273. 6) Restart
  274. 7) Profit!!!
  275. video of this: https://www.youtube.com/watch?v=y2whNpzL42s
  276.  
  277. 21) cleanup... if you installed on to bare metal, you can go erase the vdisk that was auto created when you first started this process. BUT ONLY DO THIS IF YOU ARE USING passthru harddrive... otherwise you will delete all the hard work you just did.
Advertisement
Add Comment
Please, Sign In to add comment