Skip to content

Commit

Permalink
Add BigSur Option
Browse files Browse the repository at this point in the history
  • Loading branch information
heinthanth committed Nov 17, 2020
1 parent dc9cdb0 commit 3144100
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 10 deletions.
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,45 @@
Combination of some codes and applications to create macOS installation media outside Mac app store.\
Thanks me later :3

## Motivation

Honestly, the main reason is I've limited Internet. I can't download the whole 8GB, 12GB at one stroke. So, I've to download multiple times and MAS doesn't support it. Moreover, I want to save downloaded installer so that I can use them next time. That's why I made this script.

## How to Use

it's still in beta. Simply, just edit `MACOS_VERSION` and `TARGET_DISK` variables and run the script.
it's still in beta. Simply just run the script, answer the question and go!

`TARGET_DISK` information can be found in `diskutil` > `table` > `Device`. In this example `disk3`. So, `TARGET_DISK` become `/dev/disk3`.
`DISK SELECTION` information can be found in `diskutil` > `table` > `Device`. In this example `disk3`. So, `TARGET_DISK` become `/dev/disk3`.

![diskutil](screenshots/diskutil.png)

```shell script
$ git clone https://github.com/heinthanth/macos-bootable-usb
$ cd macos-bootable-usb
$ curl -LO https://github.com/heinthanth/macos-bootable-usb/releases/latest/download/macos-booable-usb-creator.sh
$ ./creator.sh
```

Optionally, you can verify the script with this command.

``` shell script
$ curl -LO https://github.com/heinthanth/macos-bootable-usb/releases/latest/download/SHASUM
$ shasum creator.sh -c SHASUM
```

Moreover, if you don't trust `SHASUM` file, go check with `gpg`

```
$ curl -LO https://github.com/heinthanth/macos-bootable-usb/releases/latest/download/SHASUM
$ curl -LO https://github.com/heinthanth/macos-bootable-usb/releases/latest/download/SHASUM.gpg
$ gpg --keyserver hkp://keys.gnupg.net --recv-key 46D4B29338EE5105BCA79A142E1082FBF9CB91E9
$ gpg --verify SHASUM.gpg SHASUM
```
## Thanks

Thanks to -

* <https://github.com/myspaghetti/macos-virtualbox>
* <https://github.com/kholia/OSX-KVM>

## License

This work is licensed under GPLv3. See [License](LICENSE.md) for more information.
1 change: 1 addition & 0 deletions SHASUM
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b471c68e69343b66ea45c15d518a9ce76b0e7428 creator.sh
Binary file added SHASUM.gpg
Binary file not shown.
23 changes: 17 additions & 6 deletions creator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ else
INSTALLATION_FILES=("BaseSystem.chunklist" "InstallInfo.plist" "AppleDiagnostics.dmg" "AppleDiagnostics.chunklist" "BaseSystem.dmg" "InstallESDDmg.pkg")
fi

# TODO: REMOVE AFTER DEVELOPMENT
BASE_URL="http://localhost:8000"

OUTPUT_DIR="${MACOS_VERSION}-files"
mkdir -p $OUTPUT_DIR
printf "\n"
Expand Down Expand Up @@ -193,10 +190,23 @@ case "$response" in
esac
# END OF FORMAT DISK

MACOS_VERSION="catalina"

# CREATION INSTALLER
if [[ $MACOS_VERSION == "bigsur" ]]; then
printf "Big Sur stuffs."
if ! sudo -n true 2>/dev/null; then
printf "[*] asking for sudo passwords. "
sudo -v
printf "\n"
fi
sudo installer -pkg "${OUTPUT_DIR}/InstallAssistant.pkg" -target /
printf "\n"
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --nointeraction --volume /Volumes/"${MACOS_VERSION}-installer/"
if ! sudo -n true 2>/dev/null; then
printf "[*] asking for sudo passwords. "
sudo -v
printf "\n"
fi
sudo chown $USER "${OUTPUT_DIR}/InstallAssistant.pkg"
sudo chmod 755 "${OUTPUT_DIR}/InstallAssistant.pkg"
else
# RESTORE DISK IMAGE
if ! sudo -n true 2>/dev/null; then
Expand All @@ -222,3 +232,4 @@ else
fi

printf "\n[*] Installation Media \e[32mOk!\e[31m Just go reboot now!\n\n"
# END OF CREATING INSTALLER

0 comments on commit 3144100

Please sign in to comment.