Loading... # 制作 macOS Monterey 启动盘教程 # 一、概述 ## 1. 简介 ### A. 是什么 macOS 启动盘是包含完整 macOS 安装文件的外接存储设备,可用于系统重装、多台电脑批量部署或系统故障恢复。 ### B. 为什么需要 - 系统崩溃时无法从磁盘恢复,需要外部介质引导 - 多台 Mac 设备需要统一系统版本 - 系统升级后需要保留旧版本的安装能力 - 清洁安装系统,避免旧系统残留 ### C. 能做什么 - 从外部介质启动 Mac 并安装 macOS - 使用磁盘工具修复系统磁盘 - 覆盖损坏的系统文件 ## 2. 前置知识 ### A. 必备技能 - 基本的命令行操作能力 - 了解磁盘分区概念(GPT、MBR、APFS、HFS+) - 理解磁盘擦除操作的不可逆性 ### B. 推荐知识 - macOS 磁盘工具(Disk Utility)的使用 - diskutil 命令行工具基础 # 二、准备工作 ## 1. 硬件要求 ### A. U 盘或外接硬盘 - 容量:至少 16GB(推荐 32GB 或更大) - 接口:USB 3.0 或更高、Thunderbolt - 速度:读写速度越快,安装过程越快 ### B. Mac 电脑 - 需要一台可正常工作的 Mac - 确保目标 Mac 支持 macOS Monterey ## 2. 软件准备 ### A. macOS 安装器 从 App Store 下载 macOS Monterey: ```bash # 方式一:通过 App Store 搜索 macOS Monterey # 方式二:使用 mas 命令行工具 mas search "macOS Monterey" mas install <App ID> ``` 下载完成后,安装器位于 /Applications 目录: ```bash ls /Applications/Install\ macOS\ Monterey.app ``` ### B. 验证安装器完整性 检查安装器是否存在且完整: ```bash [ -d "/Applications/Install macOS Monterey.app" ] && echo "安装器存在" || echo "安装器不存在" ``` # 三、磁盘格式化 ## 1. 查看当前磁盘状态 使用 diskutil 列出所有磁盘: ```bash diskutil list ``` 输出示例: ``` /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_APFS Container disk1 1.0 TB disk0s2 /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *64.0 GB disk2 1: Linux 63.0 GB disk2s1 2: Linux_Swap 1.0 GB disk2s5 ``` 识别外接磁盘的关键特征: - 标记为 external, physical - 容量与你的 U 盘/外接硬盘匹配 - 分区类型可能显示为 FDisk_partition_scheme(MBR)或其他旧格式 ## 2. 卸载目标磁盘 在格式化前,必须先卸载磁盘: ```bash diskutil unmountDisk /dev/disk2 ``` 成功输出: ``` Unmount of all volumes on disk2 was successful ``` ## 3. 格式化为 GPT 分区表 使用 eraseDisk 命令创建 GUID 分区表: ```bash diskutil eraseDisk JHFS+ "Untitled" GPT /dev/disk2 ``` 参数说明: - JHFS+: journaled HFS+ 文件系统(macOS 兼容格式) - "Untitled":卷标名称(可自定义,但建议使用默认,方便后续命令) - GPT:GUID 分区表(macOS 标准分区方案) - /dev/disk2:目标磁盘标识符 执行过程输出: ``` Started erase on disk2 Unmounting disk Creating the partition map Waiting for partitions to activate Formatting disk2s2 as Mac OS Extended (Journaled) with name Untitled Initialized /dev/rdisk2s2 as a 59 GB case-insensitive HFS Plus volume with a 8192k journal Mounting disk Finished erase on disk2 ``` ## 4. 验证格式化结果 ```bash diskutil list | grep -A 5 "disk2" ``` 预期输出: ``` /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *64.0 GB disk2 1: EFI EFI 209.7 MB disk2s1 2: Apple_HFS Untitled 63.7 GB disk2s2 ``` 确认要点: - 分区方案类型为 GUID_partition_scheme(GPT) - 自动创建了 EFI 分区(209.7 MB) - 主分区使用 Apple_HFS 格式 # 四、制作启动盘 ## 1. 执行 createinstallmedia 命令 使用 macOS 安装器自带的 createinstallmedia 工具: ```bash /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled ``` ## 2. 确认操作 系统会提示确认操作: ``` Ready to start. To continue we need to erase the volume at /Volumes/Untitled. If you wish to continue type (Y) then press return: ``` 输入 Y 并按回车继续。 ## 3. 制作过程 完整制作流程包括以下阶段: ``` Erasing disk: 0%... 10%... 20%... 30%... 100% Making disk bootable... Copying to disk: 0%... 10%... 20%... 30%... 40%... 50%... 60%... 70%... 80%... 90%... 100% Install media now available at "/Volumes/Install macOS Monterey" ``` 各阶段说明: | 阶段 | 操作 | 耗时 | |------|------|------| | Erasing disk | 擦除磁盘并准备分区 | 约 1 分钟 | | Making disk bootable | 添加启动引导信息 | 约 1 分钟 | | Copying to disk | 复制安装文件(约 12GB) | 约 15-30 分钟 | 总体耗时取决于 U 盘/外接硬盘的读写速度。 ## 4. 验证制作结果 制作完成后,验证启动盘是否创建成功: ```bash ls -la /Volumes/ | grep -i install ``` 预期输出: ``` Install macOS Monterey ``` 查看启动盘内容: ```bash ls /Volumes/Install\ macOS\ Monterey/ ``` 应包含以下关键文件: - Install macOS Monterey.app(安装器) - System(系统文件) - usr(Unix 资源) # 五、使用启动盘 ## 1. 从启动盘启动 Mac ### A. Intel Mac 1. 将启动盘插入 Mac 2. 关机 3. 按开机键后立即按住 Option(Alt)键 4. 看到启动选择界面后松开按键 5. 选择 Install macOS Monterey 并回车 ### B. Apple Silicon Mac(M1/M2/M3) 1. 将启动盘插入 Mac 2. 关机 3. 按住电源按钮直到看到选项按钮 4. 点击选项 5. 选择启动盘作为启动磁盘 ## 2. 安装 macOS 进入安装界面后: 1. 选择磁盘工具(如需先抹磁盘) 2. 退出磁盘工具,选择安装 macOS 3. 按照安装向导完成系统安装 # 六、常见问题 ## 1. 格式化阶段 ### A. 提示磁盘无法卸载 解决方法:确保没有程序正在访问该磁盘 ```bash # 查找占用磁盘的进程 lsof | grep /Volumes/Untitled # 强制退出相关程序或使用 kill 命令终止进程 ``` ### B. 提示权限不足 解决方法:使用 sudo 执行命令 ```bash sudo diskutil eraseDisk JHFS+ "Untitled" GPT /dev/disk2 ``` ## 2. 制作阶段 ### A. 提示安装器已损坏 解决方法:重新下载 macOS 安装器 ```bash # 删除现有安装器 rm -rf /Applications/Install\ macOS\ Monterey.app # 重新从 App Store 下载 open "macappstore://apps.apple.com/app/macos-monterey/id1576738294" ``` ### B. 制作过程中断 解决方法: - 检查 U 盘连接是否稳定 - 尝试更换 USB 接口 - 重新执行 createinstallmedia 命令 ## 3. 启动阶段 ### A. 无法从 U 盘启动 检查清单: - U 盘是否正确插入 - 启动选择时是否看到 U 盘选项 - U 盘是否在其他 Mac 上测试 ### B. 启动后卡住 解决方法: - 重启 Mac 并重试 - 检查 U 盘是否制作完整 - 尝试重新制作启动盘 # 七、技术说明 ## 1. 分区方案对比 | 分区方案 | 全称 | 特点 | macOS 支持 | |---------|------|------|-----------| | GPT | GUID Partition Table | 现代标准,支持大容量 | 完全支持 | | MBR | Master Boot Record | 传统标准,2TB 限制 | 兼容模式 | macOS 启动盘必须使用 GPT 分区方案。 ## 2. 文件系统对比 | 文件系统 | 特点 | 启动盘支持 | |---------|------|-----------| | HFS+ | 传统 macOS 文件系统 | 支持 | | APFS | 现代 macOS 文件系统 | 部分支持 | | ExFAT | 通用格式 | 不支持 | createinstallmedia 工具会自动处理文件系统转换。 ## 3. createinstallmedia 工具详解 createinstallmedia 是 macOS 安装器内置的命令行工具,用于创建可启动安装介质。 ### 位置 ```bash /Applications/Install\ macOS\ <版本>.app/Contents/Resources/createinstallmedia ``` ### 常用参数 ```bash --volume <路径> # 指定目标卷 --applicationpath <路径> # 指定安装器路径(可选,默认自动检测) --nointeraction # 非交互模式(自动确认) ``` ### 非交互模式示例 ```bash /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia \ --volume /Volumes/Untitled \ --nointeraction ``` *** ## 参考资料 1. [Apple 官方:如何创建可启动的 macOS 安装器](https://support.apple.com/zh-cn/HT201372) 2. [macOS 技术规范:启动磁盘要求](https://support.apple.com/zh-cn/HT204904) 最后修改:2026 年 04 月 05 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏