Skip to content

Instantly share code, notes, and snippets.

@julianxhokaxhiu
Last active June 18, 2023 08:11
Show Gist options
  • Select an option

  • Save julianxhokaxhiu/286017b9872474d2c9b9fa090f6802bf to your computer and use it in GitHub Desktop.

Select an option

Save julianxhokaxhiu/286017b9872474d2c9b9fa090f6802bf to your computer and use it in GitHub Desktop.

Revisions

  1. julianxhokaxhiu revised this gist Dec 18, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions create-iso.sh
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,8 @@
    #===========================================================================

    # Change this at your desire. Sometimes this works out of the box, sometimes not.
    # Default size: ~21 GB
    DISK_SIZE="20000m"
    # Default size: ~13.5 GB
    DISK_SIZE="13000m"

    #===========================================================================

  2. julianxhokaxhiu revised this gist Nov 13, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion create-iso.sh
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    #===========================================================================

    # Change this at your desire. Sometimes this works out of the box, sometimes not.
    # Default size: 20 GB
    # Default size: ~21 GB
    DISK_SIZE="20000m"

    #===========================================================================
  3. julianxhokaxhiu created this gist Nov 13, 2020.
    21 changes: 21 additions & 0 deletions create-iso.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    #!/usr/bin/env bash
    #===========================================================================
    # Works only with the official image available in the Mac App Store.
    # Make sure you download the official installer before running this script.
    #===========================================================================

    # Change this at your desire. Sometimes this works out of the box, sometimes not.
    # Default size: 20 GB
    DISK_SIZE="20000m"

    #===========================================================================

    hdiutil create -o /tmp/BigSur.cdr -size $DISK_SIZE -layout SPUD -fs HFS+J
    hdiutil attach /tmp/BigSur.cdr.dmg -noverify -mountpoint /Volumes/install_build
    sudo "/Applications/Install macOS Big Sur.app/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
    hdiutil detach "/Volumes/Shared Support 1"
    hdiutil detach "/Volumes/Shared Support"
    hdiutil detach "/Volumes/Install macOS Big Sur"
    hdiutil convert /tmp/BigSur.cdr.dmg -format UDTO -o /tmp/BigSur.iso
    mv /tmp/BigSur.iso.cdr ~/Desktop/BigSur.iso
    rm /tmp/BigSur.cdr.dmg