Max.1974 Posted July 25, 2025 Share Posted July 25, 2025 (edited) This guide allows you to install macOS using the Terminal, on any compatible volume, using any official Apple installer – without formatting or erasing your current system. ✅ Features: 💡 Works with any Install macOS app, such as: Install macOS Sequoia.app Install macOS Tahoe Beta.app Install macOS Ventura.app 🛡 Prevents accidental deletion of the system you're currently running. ✏️ Allows you to rename the target volume before installation. 🚫 Does not use --eraseinstall. ⚙️ Uses --volume safely with startosinstall. 🖥 Requirements: A valid macOS installer .app located in /Applications or external disk. A second APFS volume or partition (external or internal) with enough free space (at least 40–50 GB). Terminal access with administrator privileges. 🧪 Tested with: macOS Sequoia 15.5 (final) macOS Tahoe Beta 4 macOS Ventura ⚠️ Important Notes: Running this from on your current system volume — the script protects you from doing so. If you’re on Hackintosh, disable SIP (System Integrity Protection) before running this. Ensure the target volume is empty or backed up, as the installer will overwrite its contents. Hackintosh setups with SIP disabled (optional) Intel and Apple Silicon (if the installer supports it) 📜 Terminal Script: Paste and run the following command in Terminal: echo "📦 Drag the macOS installer app here and press Enter:"; read installer_app; if [ ! -f "$installer_app/Contents/Resources/startosinstall" ]; then echo "❌ ERROR: Invalid macOS installer. Make sure it's a valid '.app' with startosinstall inside."; exit 1; fi; echo "🔹 Drag the target volume here and press Enter:"; read target_volume; echo "📝 Enter the new name you want to give the volume (or press Enter to keep the current name):"; read custom_name; current_root=$(df / | tail -1 | awk '{print $1}'); dragged_device=$(df "$target_volume" 2>/dev/null | tail -1 | awk '{print $1}'); if [ "$dragged_device" = "$current_root" ]; then echo "❌ ERROR: You are trying to erase the volume where the current system is running. Operation cancelled."; exit 1; fi; original_mount_point="$target_volume"; if [ -n "$custom_name" ]; then diskutil rename "$target_volume" "$custom_name"; target_volume="$(dirname "$original_mount_point")/$custom_name"; fi; echo "✅ Final target volume confirmed: $target_volume"; sudo "$installer_app/Contents/Resources/startosinstall" --volume "$target_volume" --agreetolicense --nointeraction --passprompt --rebootdelay 60 🧭 Step-by-step (with SIP warning): Open Terminal. If you're using a Hackintosh or modified macOS, make sure that SIP (System Integrity Protection) is disabled: Boot into Recovery Mode. Open Terminal and run: csrutil disable csrutil authenticated-root disable reboot Then reboot normally. Paste the command below into Terminal and hit Enter. When prompted, drag the macOS installer .app into the Terminal and press Enter. Then, drag the target volume (where you want to install macOS). Optionally, type a new name for the volume (or just press Enter to keep its current name). Wait for confirmation and enter your password when prompted. Your Mac will begin the installation after a 60-second delay. ⚠️ Important Notes: 🔒 Disable SIP (System Integrity Protection) before using this script, especially on Hackintosh or modified systems. If SIP is enabled, macOS may ignore the selected volume and install over the current system volume, even if you drag another volume. Do not run this on your current system volume — the script protects you from doing so, but SIP can interfere. Ensure the target volume is empty or backed up, as the installer will overwrite its contents. This script has been tested with: Install macOS Sequoia.app Install macOS Tahoe Beta.app Install macOS Ventura.app Other official macOS installers with startosinstall. Exemple: 📦 Drag the macOS installer app here and press Enter: → /Applications/Install macOS Sequoia.app 🔹 Drag the target volume here and press Enter: → /Volumes/macOS Test 📝 Enter the new name you want to give the volume (or press Enter to keep the current name): → macOS Sequoia ✅ Final target volume confirmed: /Volumes/macOS Sequoia Video Tutorial: https://youtu.be/9xOn7dbi47I Enjoy it Edited July 25, 2025 by Max.1974 2 Link to comment https://www.insanelymac.com/forum/topic/361410-safe-macos-installation-via-terminal-%E2%80%93-universal-script-sequoia-tahoe-ventura/ Share on other sites More sharing options...
Recommended Posts