Necessary because installation of Big Sur doesn't seem to like password protected APFS drives. Disk encryption will have to happen after installation via FileVault.
37 lines
1.7 KiB
Bash
Executable File
37 lines
1.7 KiB
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
# Creates macOS boot disk.
|
|
|
|
printf "macOS Boot Disk Tips\n"
|
|
printf " - Use a USB drive (8GB or higher).\n"
|
|
printf " - Use Disk Utility to format the USB drive as \"Mac OS Extended (Journaled)\".\n"
|
|
printf " - Use Disk Utility to label the USB drive as \"Untitled\".\n"
|
|
printf "\nmacOS Boot Disk Usage:\n"
|
|
printf " 1. Insert the USB boot disk into the machine to be upgraded.\n"
|
|
printf " 2. Reboot the machine.\n"
|
|
printf " 3. Hold down the OPTION key before the Apple logo appears.\n"
|
|
printf " 4. Select the USB boot disk from the menu.\n"
|
|
printf " 5. Use Disk Utility to delete and/or erase the hard drive including associated partitions.\n"
|
|
printf " 6. Use Disk Utility to create a single \"APFS\" drive as a \"GUID Partition Table\".\n"
|
|
printf " 7. Install the new operating system.\n"
|
|
printf "\nmacOS Reinstall:\n"
|
|
printf " 1. Click the Apple icon from the operating system main menu.\n"
|
|
printf " 2. Select the \"Restart...\" menu option.\n"
|
|
printf " 3. Hold down the COMMAND+R keys before the Apple logo appears.\n"
|
|
printf " 4. Wait for the macOS installer to load from the recovery partition.\n"
|
|
printf " 5. Use the dialog options to launch Disk Utility, reinstall the system, etc.\n"
|
|
|
|
printf "\nCreating macOS boot disk...\n"
|
|
|
|
if [[ ! -e "$MAC_OS_BOOT_DISK_CREATOR" ]]; then
|
|
printf "ERROR: macOS installer does not exist: $MAC_OS_BOOT_DISK_CREATOR. Use System Preferences → Software Update to download.\n"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ! -d "$MAC_OS_BOOT_DISK_PATH" ]]; then
|
|
printf "ERROR: Boot disk must be mounted at: $MAC_OS_BOOT_DISK_PATH.\n"
|
|
exit 1
|
|
fi
|
|
|
|
sudo "$MAC_OS_BOOT_DISK_CREATOR" --volume "$MAC_OS_BOOT_DISK_PATH" --downloadassets --nointeraction
|