4 Commits
Author SHA1 Message Date
Tieu Long 6dc3c1d0ba chore: bump and release v0.7 2026-02-21 13:47:12 +07:00
Tieu Long fb87d98a5a fix: bash compatibility on older macOS 2026-01-22 22:38:26 +07:00
Tieu Long 48d854fd8a refactor: Create_Recovery_ISO now support only macOS 10.13+
For older versions, users should use the full installer instead.
2026-01-22 21:37:31 +07:00
Tieu Long 2aa5b41c36 refactor: turn Create_macOS_ISO into mkmaciso launcher
Remove USBToolBox kext (no license - All rights reserved)
2026-01-22 21:16:16 +07:00
8 changed files with 70 additions and 413 deletions

No files matched your search

+1
View File
@@ -12,6 +12,7 @@ jobs:
with:
days-before-stale: 30
days-before-close: 7
close-issue-reason: 'completed'
stale-issue-message: 'This issue has been automatically marked as stale due to inactivity.'
close-issue-message: 'Closing this issue due to prolonged inactivity.'
exempt-issue-labels: 'keep-open'
BIN
View File
Binary file not shown.
+32 -98
View File
@@ -23,18 +23,9 @@ fi
get_version_info() {
local key=$1
case $key in
lion1) echo "Mac-2E6FAB96566FE58C:00000000000F25Y00:Lion:" ;;
lion2) echo "Mac-C3EC7CD22292981F:00000000000F0HM00:Lion:" ;;
mountain_lion) echo "Mac-7DF2A3B5E5D671ED:00000000000F65100:Mountain_Lion:" ;;
mavericks) echo "Mac-F60DEB81FF30ACF6:00000000000FNN100:Mavericks:" ;;
yosemite) echo "Mac-E43C1C25D4880AD6:00000000000GDVW00:Yosemite:" ;;
el_capitan) echo "Mac-FFE5EF870D7BA81A:00000000000GQRX00:El_Capitan:" ;;
sierra) echo "Mac-77F17D7DA9285301:00000000000J0DX00:Sierra:" ;;
high_sierra1) echo "Mac-7BA5B2D9E42DDD94:00000000000J80300:High_Sierra:" ;;
high_sierra2) echo "Mac-BE088AF8C5EB4FA2:00000000000J80300:High_Sierra:" ;;
high_sierra) echo "Mac-7BA5B2D9E42DDD94:00000000000J80300:High_Sierra:" ;;
mojave) echo "Mac-7BA5B2DFE22DDD8C:00000000000KXPG00:Mojave:" ;;
catalina1) echo "Mac-CFF7D910A743CAAF:00000000000PHCD00:Catalina:" ;;
catalina2) echo "Mac-00BE6ED71E35EB86:00000000000000000:Catalina:" ;;
catalina) echo "Mac-CFF7D910A743CAAF:00000000000PHCD00:Catalina:" ;;
big_sur) echo "Mac-2BD1B31983FE1663:00000000000000000:Big_Sur:" ;;
monterey) echo "Mac-E43C1C25D4880AD6:00000000000000000:Monterey:" ;;
ventura) echo "Mac-B4831CEBD52A0C4C:00000000000000000:Ventura:" ;;
@@ -64,7 +55,7 @@ check_python() {
print_error "Python3 is not installed on your system."
echo "Please install Python3:"
echo "Download it from: https://www.python.org/downloads/"
echo "Or use Install_Python3.command to do it automatically"
echo "Or use Install_Python3.command to do it automatically"
exit 1
fi
}
@@ -95,38 +86,6 @@ cleanup_recovery() {
fi
}
# Function to determine recovery image filename based on version
get_recovery_filename() {
local version_name=$1
# macOS 10.4 to 10.12 use RecoveryImage.dmg
# macOS 10.13+ use BaseSystem.dmg
case $version_name in
Lion|Mountain_Lion|Mavericks|Yosemite|El_Capitan|Sierra)
echo "RecoveryImage.dmg"
;;
*)
echo "BaseSystem.dmg"
;;
esac
}
# Function to determine hdiutil options based on version
get_hdiutil_options() {
local version_name=$1
# macOS 10.7 to 10.9 require -hfs -iso -joliet
# macOS 10.10+ use -hfs -udf
case $version_name in
Lion|Mountain_Lion|Mavericks)
echo "-hfs -iso -joliet"
;;
*)
echo "-hfs -udf"
;;
esac
}
# Function to download macOS recovery
download_recovery() {
local board_id=$1
@@ -142,8 +101,8 @@ download_recovery() {
python3 macrecovery.py -b "$board_id" -m "$model" download
fi
# Check which recovery image was downloaded
if [ ! -f "com.apple.recovery.boot/BaseSystem.dmg" ] && [ ! -f "com.apple.recovery.boot/RecoveryImage.dmg" ]; then
# Check if BaseSystem.dmg was downloaded (all versions 10.13+ use BaseSystem.dmg)
if [ ! -f "com.apple.recovery.boot/BaseSystem.dmg" ]; then
print_error "Failed to download recovery image"
exit 1
fi
@@ -155,11 +114,9 @@ download_recovery() {
create_iso() {
local version_name=$1
local output_path="$HOME/Desktop/macOS_${version_name}_Recovery.iso"
local recovery_filename=$(get_recovery_filename "$version_name")
local recovery_path="com.apple.recovery.boot/$recovery_filename"
local hdiutil_opts=$(get_hdiutil_options "$version_name")
local recovery_path="com.apple.recovery.boot/BaseSystem.dmg"
# Check if the expected recovery file exists
# Check if the recovery file exists
if [ ! -f "$recovery_path" ]; then
print_error "Recovery image not found at: $recovery_path"
# List available files for debugging
@@ -170,7 +127,8 @@ create_iso() {
print_info "Creating bootable ISO..."
hdiutil makehybrid -ov $hdiutil_opts \
# All versions 10.13+ use -hfs -udf options
hdiutil makehybrid -ov -hfs -udf \
-default-volume-name "${version_name}_Recovery" \
-o "$output_path" \
"$recovery_path"
@@ -188,21 +146,15 @@ show_versions() {
echo ""
echo "Available macOS versions:"
echo "========================="
echo " 1. Lion (10.7)"
echo " 2. Mountain Lion (10.8)"
echo " 3. Mavericks (10.9)"
echo " 4. Yosemite (10.10)"
echo " 5. El Capitan (10.11)"
echo " 6. Sierra (10.12)"
echo " 7. High Sierra (10.13)"
echo " 8. Mojave (10.14)"
echo " 9. Catalina (10.15)"
echo " 10. Big Sur (11)"
echo " 11. Monterey (12)"
echo " 12. Ventura (13)"
echo " 13. Sonoma (14)"
echo " 14. Sequoia (15)"
echo " 15. Tahoe (Latest)"
echo " 1. High Sierra (10.13)"
echo " 2. Mojave (10.14)"
echo " 3. Catalina (10.15)"
echo " 4. Big Sur (11)"
echo " 5. Monterey (12)"
echo " 6. Ventura (13)"
echo " 7. Sonoma (14)"
echo " 8. Sequoia (15)"
echo " 9. Tahoe (Latest)"
echo ""
}
@@ -211,49 +163,31 @@ process_version() {
local version=$1
case $version in
1|lion)
key="lion1"
1|high_sierra)
key="high_sierra"
;;
2|mountain_lion)
key="mountain_lion"
;;
3|mavericks)
key="mavericks"
;;
4|yosemite)
key="yosemite"
;;
5|el_capitan)
key="el_capitan"
;;
6|sierra)
key="sierra"
;;
7|high_sierra)
key="high_sierra1"
;;
8|mojave)
2|mojave)
key="mojave"
;;
9|catalina)
key="catalina1"
3|catalina)
key="catalina"
;;
10|big_sur)
4|big_sur)
key="big_sur"
;;
11|monterey)
5|monterey)
key="monterey"
;;
12|ventura)
6|ventura)
key="ventura"
;;
13|sonoma)
7|sonoma)
key="sonoma"
;;
14|sequoia)
8|sequoia)
key="sequoia"
;;
15|tahoe)
9|tahoe)
key="tahoe"
;;
*)
@@ -284,12 +218,12 @@ show_usage() {
Usage: $0 [OPTIONS]
Options:
-v, --version <number|name> macOS version to download (1-15 or name)
-v, --version <number|name> macOS version to download (1-9 or name)
-h, --help Show this help message
Examples:
$0 # Interactive mode
$0 -v 9 # Download Catalina
$0 -v 3 # Download Catalina
$0 -v catalina # Download Catalina by name
$0 -v sonoma # Download Sonoma by name
@@ -318,7 +252,7 @@ main() {
if [ $# -eq 0 ]; then
# Interactive mode
show_versions
read -p "Select version (1-15): " version_choice
read -p "Select version (1-9): " version_choice
echo ""
process_version "$version_choice"
else
+23 -296
View File
@@ -1,302 +1,29 @@
#!/bin/bash
# Copyright (c) 2024–2025, LongQT-sea
# macOS Full Installer ISO Creator
# Downloads official macOS installers from Apple servers and create a true DVD-format macOS installer ISO file.
# Intended for use with Proxmox, QEMU, VirtualBox, and VMware.
#!/usr/bin/env bash
# Simple launcher for mkmaciso
set -e
set -e # Exit on error
MKMACISO_URL="https://raw.githubusercontent.com/LongQT-sea/mkmaciso/main/mkmaciso"
LOCAL_BIN="$HOME/.local/bin"
TARGET="$LOCAL_BIN/mkmaciso"
EXPORT_LINE='export PATH="$HOME/.local/bin:$PATH"'
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Install mkmaciso if missing
if [[ ! -f "$TARGET" ]]; then
mkdir -p "$LOCAL_BIN"
curl -fsSL "$MKMACISO_URL" -o "$TARGET"
chmod +x "$TARGET"
fi
# Global variables
selected_idx=0
# Function to print colored output
print_color() {
color=$1
shift
echo -e "${color}$@${NC}"
}
# Function to check if the script has sudo privileges
check_sudo() {
if ! sudo -n true 2>/dev/null; then
print_color $YELLOW "This script requires sudo privileges to run createinstallmedia."
print_color $YELLOW "You’ll be prompted for password after the macOS installer finishes downloading."
echo ""
fi
}
# Function to get available installers
get_installers() {
print_color $GREEN "Fetching available macOS installers from Apple server..."
installers=$(softwareupdate --list-full-installers 2>/dev/null | grep "* Title:" | sed 's/^[[:space:]]*//')
if [ -z "$installers" ]; then
print_color $RED "No installers found. Please check your internet connection."
exit 1
fi
# Parse installer information into arrays
IFS=$'\n'
installer_array=($installers)
unset IFS
# Initialize arrays
titles=()
versions=()
sizes=()
builds=()
for installer in "${installer_array[@]}"; do
# Extract information using sed
title=$(echo "$installer" | sed -n 's/.*Title: \([^,]*\).*/\1/p')
version=$(echo "$installer" | sed -n 's/.*Version: \([^,]*\).*/\1/p')
size=$(echo "$installer" | sed -n 's/.*Size: \([^,]*\).*/\1/p')
build=$(echo "$installer" | sed -n 's/.*Build: \([^,]*\).*/\1/p')
titles+=("$title")
versions+=("$version")
sizes+=("$size")
builds+=("$build")
done
}
# Function to display installer menu
display_menu() {
print_color $YELLOW "\nAvailable macOS Installers:\n"
for i in "${!titles[@]}"; do
# Convert size from KiB to GB for readability
size_kb="${sizes[$i]//KiB/}"
size_gb=$(echo "scale=1; $size_kb / 1048576" | bc)
printf "${BLUE}%2d)${NC} %-20s ${GREEN}v%-8s${NC} (${YELLOW}%.1f GB${NC}, Build: %s)\n" \
$((i+1)) "${titles[$i]}" "${versions[$i]}" "$size_gb" "${builds[$i]}"
done
echo
print_color $YELLOW "0) Exit"
echo
}
# Function to get user selection
get_selection() {
local max_option=${#titles[@]}
local selection
while true; do
read -p "Enter your choice (0-$max_option): " selection
if [[ "$selection" =~ ^[0-9]+$ ]]; then
if [ "$selection" -eq 0 ]; then
print_color $YELLOW "Exiting..."
exit 0
elif [ "$selection" -ge 1 ] && [ "$selection" -le "$max_option" ]; then
selected_idx=$((selection - 1))
return 0
fi
fi
print_color $RED "Invalid selection. Please enter a number between 0 and $max_option."
done
}
# Function to download installer
download_installer() {
local idx=$1
local version="${versions[$idx]}"
local title="${titles[$idx]}"
print_color $GREEN "\nDownloading $title version $version..."
print_color $YELLOW "This may take a while depending on your internet connection..."
# Run the download command
if softwareupdate --fetch-full-installer --full-installer-version "$version"; then
print_color $GREEN "Download completed successfully!"
return 0
else
print_color $RED "Download failed. Please try again."
return 1
fi
}
# Function to create ISO
create_iso() {
local idx=$1
local title="${titles[$idx]}"
local version="${versions[$idx]}"
# Determine installer app name based on title
local installer_name
case "$title" in
"macOS Tahoe")
installer_name="Install macOS Tahoe"
;;
"macOS Sequoia")
installer_name="Install macOS Sequoia"
;;
"macOS Sonoma")
installer_name="Install macOS Sonoma"
;;
"macOS Ventura")
installer_name="Install macOS Ventura"
;;
"macOS Monterey")
installer_name="Install macOS Monterey"
;;
"macOS Big Sur")
installer_name="Install macOS Big Sur"
;;
"macOS Catalina")
installer_name="Install macOS Catalina"
;;
"macOS Mojave")
installer_name="Install macOS Mojave"
;;
"macOS High Sierra")
installer_name="Install macOS High Sierra"
;;
*)
installer_name="Install $title"
;;
# Ensure ~/.local/bin is in PATH
if [[ ":$PATH:" != *":$LOCAL_BIN:"* ]]; then
case "$SHELL" in
*/zsh) RC="$HOME/.zprofile" ;;
*/bash) RC="$HOME/.bash_profile" ;;
*) RC="$HOME/.profile" ;;
esac
local installer_path="/Applications/${installer_name}.app"
local iso_name="${title// /_}_${version}"
local sparse_image="$HOME/Desktop/${iso_name}.sparseimage"
local iso_file="$HOME/Desktop/${iso_name}.iso"
local volume_name="${iso_name}_installer"
# Check if ISO already exists and ask user
if [ -f "$iso_file" ]; then
print_color $YELLOW "ISO file already exists: $iso_file"
read -p "Do you want to overwrite it? (y/n): " overwrite
if [[ "$overwrite" =~ ^[Yy]$ ]]; then
print_color $YELLOW "Removing existing ISO file..."
rm -f "$iso_file"
else
print_color $YELLOW "Operation cancelled. Exiting."
return 1
fi
fi
# Check if sparse image already exists and remove it
if [ -f "$sparse_image" ]; then
print_color $YELLOW "Removing existing sparse image..."
rm -f "$sparse_image"
fi
# Check if installer exists
if [ ! -d "$installer_path" ]; then
print_color $RED "Installer not found at: $installer_path"
print_color $RED "Please ensure the installer downloaded correctly."
return 1
fi
print_color $GREEN "\nCreating ISO for $title version $version..."
# Step 1: Create sparse image
print_color $BLUE "Step 1/4: Creating sparse image..."
if hdiutil create -size 20g -volname "$volume_name" -fs HFS+ -type SPARSE -attach "$sparse_image"; then
print_color $GREEN "Sparse image created and mounted"
else
print_color $RED "Failed to create sparse image"
return 1
fi
# Step 2: Create install media
print_color $BLUE "Step 2/4: Creating install media (this requires sudo)..."
if sudo "${installer_path}/Contents/Resources/createinstallmedia" --volume "/Volumes/$volume_name" --nointeraction; then
print_color $GREEN "Install media created"
else
print_color $RED "Failed to create install media"
hdiutil detach "/Volumes/$volume_name" 2>/dev/null || true
rm -f "$sparse_image" 2>/dev/null || true
return 1
fi
# Step 3: Detach volume
print_color $BLUE "Step 3/4: Detaching volume..."
# After createinstallmedia, the volume is renamed to the installer name
if hdiutil detach "/Volumes/$installer_name" 2>/dev/null || hdiutil detach "/Volumes/$installer_name" -force 2>/dev/null; then
print_color $GREEN "Volume detached successfully"
else
print_color $RED "Failed to detach volume automatically"
print_color $YELLOW "Please manually eject the '$installer_name' volume from Finder"
read -p "Press Enter when ready to continue..."
fi
# Give the system a moment to complete the unmount
sleep 2
# Step 4: Create hybrid ISO
print_color $BLUE "Step 4/4: Creating hybrid ISO ..."
if hdiutil makehybrid -hfs -udf -o "$iso_file" "$sparse_image"; then
print_color $GREEN "ISO created successfully"
else
print_color $RED "Failed to create ISO"
rm -f "$sparse_image" 2>/dev/null || true
return 1
fi
# Clean up sparse image
print_color $BLUE "Cleaning up temporary files..."
rm -f "$sparse_image"
print_color $GREEN "\n=========================================="
print_color $GREEN "ISO creation completed successfully!"
print_color $GREEN "ISO file location: $iso_file"
print_color $GREEN "Installer preserved at: $installer_path"
print_color $GREEN "=========================================="
# Show ISO file info
if [ -f "$iso_file" ]; then
local iso_size=$(du -h "$iso_file" | cut -f1)
print_color $YELLOW "\nISO file size: $iso_size"
fi
return 0
}
touch "$RC"
grep -qxF "$EXPORT_LINE" "$RC" || printf '\n%s\n' "$EXPORT_LINE" >> "$RC"
fi
# Main script execution
main() {
clear
print_color $GREEN "macOS Full Installer ISO Creator"
print_color $GREEN "============================"
# Check for required tools
for tool in softwareupdate hdiutil diskutil bc; do
if ! command -v $tool &> /dev/null; then
print_color $RED "Error: Required tool $tool is not found."
exit 1
fi
done
# Check sudo access early
check_sudo
# Get available installers
get_installers
# Display menu and get selection
display_menu
get_selection
# Download installer
if download_installer $selected_idx; then
# Create ISO
create_iso $selected_idx
else
print_color $RED "Download failed. Exiting."
exit 1
fi
}
# Run main function
main
exec "$TARGET" "$@"
+4 -5
View File
@@ -6,7 +6,7 @@ GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
clear
echo -e "${GREEN}=== Disable GateKeeper Script ===${NC}"
echo ""
echo -e "${YELLOW}Administrator privileges required.${NC}"
@@ -14,7 +14,6 @@ echo -e "${YELLOW}Administrator privileges required.${NC}"
sudo spctl --master-disable
echo ""
echo "────────────────────────────"
echo "Press CMD + Q to quit..."
echo "────────────────────────────"
echo ""
echo "────────────────────────────────────"
echo "Press Command-W to close this window"
echo "────────────────────────────────────"
+2 -2
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
ISO_FILE_NAME=LongQT-OpenCore-v0.5.iso
ISO_FILE_NAME=LongQT-OpenCore-v0.7.iso
VOL_NAME=LongQT-OpenCore
SOURCE_DIR=./
BOOT_IMG=BOOT.img
@@ -40,4 +40,4 @@ xorriso -rockridge off -as mkisofs \
-m "cpu-models.conf" \
-m "Create_Recovery_ISO*" \
-output ~/Desktop/${ISO_FILE_NAME} \
${SOURCE_DIR}
${SOURCE_DIR}
+4 -4
View File
@@ -8,6 +8,7 @@ GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
clear
echo -e "${GREEN}=== EFI Partition Mount Script ===${NC}"
echo ""
@@ -32,7 +33,6 @@ else
fi
echo ""
echo "────────────────────────────"
echo "Press CMD + Q to quit..."
echo "────────────────────────────"
echo ""
echo "────────────────────────────────────"
echo "Press Command-W to close this window"
echo "────────────────────────────────────"
+4 -8
View File
@@ -2,18 +2,14 @@
A carefully crafted OpenCore **ISO** image that makes creating macOS virtual machines on **Proxmox VE** and **QEMU/KVM** straightforward.
Completely redesigned from scratch with a clean, efficient architecture that eliminates outdated methods and legacy configurations.[^legacy]
Completely redesigned from scratch with a clean, efficient architecture that eliminates outdated methods and legacy configurations.
Supports every Intel-based macOS release, from **Mac OS X 10.4 Tiger** through **macOS 26 Tahoe**.[^osx]
Also compatible with **libvirt** and **Virt-Manager**.
Supports every Intel-based macOS release, from **Mac OS X 10.4 Tiger** through **macOS 26 Tahoe**.
> [!TIP]
> Enjoy true **vanilla macOS** experience with no kernel patches.
> This is likely the best way to run macOS on AMD hardware while still retaining full hypervisor access to run other VMs.
**Found this useful?** Give it a ⭐ star so others can find it too!
## Table of Contents
- [Download](#download)
@@ -176,6 +172,8 @@ Add an **additional CD/DVD drive** for the macOS installer or Recovery ISO, then
> * First-time installing macOS? Format the disk in **Disk Utility** before installing macOS.
> * **Skip iCloud login** during setup (configure it later, see [Post-Install](#post-install))
**Got it running?** Maybe give the repo a star... nah nevermind, do whatever.
### 10. Troubleshooting
If you encounter boot issues, check:
@@ -283,8 +281,6 @@ This project is provided “as‑is”, without any warranties, and is intended
All product names, trademarks, and registered trademarks are property of their respective owners. All company, product, and service names used in this repository are for identification purposes only.
[^legacy]: No messy custom args needed (no OSK strings, no lengthy `-cpu` parameters) and freely configure CPU core count on AMD CPUs.
[^osx]: Tested on Proxmox VE 9.
[^amdcpu1]: The `pcid` and `spec-ctrl` flags are Intel-only CPU features.
[^amdcpu2]: On macOS 13–26 running on AMD processors, these CPU flags `enforce,+kvm_pv_eoi,+kvm_pv_unhalt` (the default in Proxmox) prevent macOS from booting, so we override them with custom `-cpu` args.
[^intel-hedt]: Override the CPUID model to one used in real Macs (e.g., `model=158`, which corresponds to the Coffee Lake CPUID model).