docs(macos): explain account creation and skipping Setup

This commit is contained in:
UniXNU Docs
2026-11-13 00:42:10 +08:00
committed by bluseliu50
Unverified
parent 2b545eae50
commit 2366e33e49
4 changed files with 59 additions and 9 deletions
+3
View File
@@ -1,5 +1,8 @@
# Skip Setup
For macOS, follow [Create an account and skip Setup](/porting/macos#account).
The procedure below applies to iPadOS.
Requires macOS image tools, a matching packed Data seed and the board's `skip_setup_tool`. Prepare them through [Building](/building). After the payload command below, run `./unixnu bootimg` and boot the newly packed image.
A fresh Data seed starts the Setup app on first boot. The payload can mark Setup as done before the image is written, so the device boots to SpringBoard.
+28 -5
View File
@@ -136,20 +136,43 @@ seed's volume UUID:
./unixnu build kernel payload --os macos-27
```
Without a seed the command stops before compiling and prints:
Without a seed the command stops before compiling and prints the seed creation
command, including the OS image, output path and `data_gib`.
### Create an account and skip Setup {#account}
Run from the UniXNU checkout. Use the paths and size printed by the build,
and replace `unixnu:YOUR_PASSWORD` with the account name and password:
```sh
sudo python3 <tree>/scripts/make-macos-data-seed.py <OS image> <output>/runtime/data.dbr --gib <data_gib>
sudo python3 scripts/make-macos-data-seed.py \
"<OS image>" "<output>/runtime/data.dbr" --gib "<data_gib>" \
--skip-setup --user 'unixnu:YOUR_PASSWORD'
```
Run it, then repeat the build. The script copies
`/System/Library/Templates/Data` of the system volume with its file owners.
Optional arguments:
The script creates a local administrator and its home, preserves template
owners, and skips both initial and first-login Setup. The output seed must be
new.
Build and pack using that seed:
```sh
./unixnu build kernel payload --os macos-27 \
--data-ramdisk "<output>/runtime/data.dbr"
./unixnu bootimg --os macos-27 \
--data-ramdisk "<output>/runtime/data.dbr"
```
Boot and sign in with that account to reach the desktop. `--skip-setup` is a
seed creation option.
Seed creation options:
| Argument | Effect |
| --- | --- |
| `--skip-setup` | Marks Setup Assistant done |
| `--user NAME:PASSWORD` | Adds a local administrator and its home |
| `--auto-login` | Logs the `--user` account in at boot. For unattended tests; requires `--user` |
| `--keyboard-type PRODUCT-VENDOR-COUNTRY=TYPE` | Records a keyboard layout type, so Keyboard Setup Assistant does not ask |
| `--volume-uuid UUID` | Gives the Data volume a fixed UUID, so a new seed replaces an older one without a kernel build |
+2
View File
@@ -1,5 +1,7 @@
# Skip Setup
macOS 按[创建账户并跳过 Setup](/zh/porting/macos#account)操作。以下步骤适用于 iPadOS。
需要 macOS 镜像工具、匹配的 packed Data seed 和设备 `skip_setup_tool`,按[构建指南](/zh/building)准备。执行下方 payload 命令后,再运行 `./unixnu bootimg` 并启动新打包的镜像。
全新的 Data 种子首次启动会进入 Setup。负载可以在写镜像前把 Setup 标记为完成,让设备直接进入 SpringBoard。
+26 -4
View File
@@ -127,19 +127,41 @@ macOS 补丁序列增加的内核参数:
./unixnu build kernel payload --os macos-27
```
没有 seed 时,命令在编译前停止并打印:
没有 seed 时,命令在编译前停止,打印创建 seed 的命令,其中包含 OS 镜像、输出路径和
`data_gib`。
### 创建账户并跳过 Setup {#account}
在 UniXNU 仓库中执行。使用构建命令打印的路径和大小,将 `unixnu:YOUR_PASSWORD` 替换为
账户名和密码:
```sh
sudo python3 <tree>/scripts/make-macos-data-seed.py <OS image> <output>/runtime/data.dbr --gib <data_gib>
sudo python3 scripts/make-macos-data-seed.py \
"<OS image>" "<output>/runtime/data.dbr" --gib "<data_gib>" \
--skip-setup --user 'unixnu:YOUR_PASSWORD'
```
执行该命令后重新构建。脚本复制系统卷的 `/System/Library/Templates/Data`,并保留文件属主。
可选参数:
脚本创建本地管理员及其主目录,保留模板文件属主,并跳过首次开机和首次登录时的设置助理。
输出文件必须是新 seed。
使用该 seed 构建并打包:
```sh
./unixnu build kernel payload --os macos-27 \
--data-ramdisk "<output>/runtime/data.dbr"
./unixnu bootimg --os macos-27 \
--data-ramdisk "<output>/runtime/data.dbr"
```
启动后用该账户登录即可进入桌面。`--skip-setup` 在制作 seed 时传入。
制作 seed 的参数:
| 参数 | 作用 |
| --- | --- |
| `--skip-setup` | 把设置助理标记为已完成 |
| `--user NAME:PASSWORD` | 添加本地管理员及其主目录 |
| `--auto-login` | 开机自动登录 `--user` 指定的账户。供无人值守测试使用,需要 `--user` |
| `--keyboard-type PRODUCT-VENDOR-COUNTRY=TYPE` | 记录键盘布局类型,键盘设置助理不再询问 |
| `--volume-uuid UUID` | 为 Data 卷指定固定 UUID,新 seed 可以替换旧 seed 而无需重新构建内核 |