Make offline install media

on macOS.

Make an offline install media: You need a macOS for this. You need to download Install_macOS_12.6-21G115.dmg first, which is 12GB(12,408,060,752) bytes. It takes a long time. It says 5 hours. That is why Online install takes more than 5 hours. Download is the part, which takes time.
  1. Preparation; you need
  2. Download Install_macOS_12.6-21G115.dmg (the name depends on your target OS.)
  3. Do this on your macOS in a terminal.
    	  $ mkdir -p ~/macOS-installer
    	  $ cd ~/macOS-installer
    	  $ curl
    	  https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py
    	  > installinstallmacos.py
    	  $ sudo python installinstallmacos.py
    	
    Choose the number associated your designated OS version.

    Note python should be python3 in some case. Note you need to run below command; pip might be pip3 in some case.

    	  $ pip3 xattr
    	
  4. (on Linux) Prepare your media
  5. It may destroy your data on the USB media. Be careful and make a back!
    1. make your media GPT from MBR(Master Boot Recorder), if it is not GPT yet.
      	  $ sudo gdisk /dev/sdb   <-- sdb depends.
      	
      just type w, and then Y.

      just type w, and then Y.

      Now you confirm it is gpt.
    2. (on Linux) make a proper partition table
      	 $ gparted 
              
      make two partitions;
      • FAT 700MB. Label: EFI. Flag: Boot, EPS.
      • HFS+ 15300MB. Label: INSTALL1206.
      • Note: FAT32 is also fine, because it will be re-formated by installer.

      Now you confirm it is gpt.
  6. (Back on macOS) create an install media.
    1. open Install_macOS_12.6-21G115.dmg with mounter.
    2. It will be mounted as /Volume/Install_macOS_12.6-21G115/
    3. Run the commnad
      	$ sudo /Volumes/Install_macOS_Monterey/Install_macOS_Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/INSTALL1206
        

      createinstallmedia command.
  7. Copy all OC files to /EFI on EFI partition on the media.
  8. The necessary files depends on your system. See Dartania's OpenCore guide.
Now you have an offline install media.
20220928