選擇 x86 映像檔:combined、ext4、squashfs、EFI/BIOS
- PVE 預設 SeaBIOS:優先選
generic-ext4-combined.img.gz(本頁已測試); - UEFI/OVMF:選擇帶有
-efi的 combined 映像檔; - 可恢復原廠/唯讀 root + overlay:選擇 squashfs combined;
- 已有 bootloader/分割區,只替換 rootfs:使用 rootfs 映像檔;
- 容器/chroot:使用
rootfs.tar.gz,而不是磁碟映像檔。
25.12.6 x86/64 的主要檔案:
openwrt-25.12.6-x86-64-generic-ext4-combined.img.gzopenwrt-25.12.6-x86-64-generic-ext4-combined-efi.img.gzopenwrt-25.12.6-x86-64-generic-squashfs-combined.img.gzopenwrt-25.12.6-x86-64-generic-squashfs-combined-efi.img.gzopenwrt-25.12.6-x86-64-generic-ext4-rootfs.img.gzopenwrt-25.12.6-x86-64-generic-squashfs-rootfs.img.gzopenwrt-25.12.6-x86-64-generic-kernel.binopenwrt-25.12.6-x86-64-generic-targz-rootfs.tar.gzopenwrt-25.12.6-x86-64-rootfs.tar.gz三個關鍵字最重要:
| 關鍵字 | 意義 | 選錯的後果 |
|---|---|---|
combined |
含分割表/開機區的整顆磁碟映像檔 | 當成 rootfs 使用可能覆蓋分割區 |
rootfs |
僅有檔案系統 | 沒有 bootloader;無法直接開機 |
ext4 / squashfs |
可寫入的 root / 唯讀 root + overlay | 影響復原/寫入行為 |
-efi |
UEFI 開機 | 傳統 BIOS 可能無法開機 |
tar.gz |
rootfs 壓縮檔 | 不是可開機的磁碟映像檔 |
ext4 與 squashfs 比較
Section titled “ext4 與 squashfs 比較”- ext4 combined:root 可寫入;常用於 VM/軟路由;行為與一般 Linux 安裝類似。
- squashfs combined:root 唯讀,設定放在 overlay;較利於恢復原廠/防止誤操作;空間/維護方式不同。
- 兩者在 PVE 都能開機;本次實驗只測試了 ext4。不要因為「squashfs 比較安全」就省略備份。
BIOS 與 UEFI
Section titled “BIOS 與 UEFI”- PVE 預設
SeaBIOS:使用不含-efi的 combined 映像檔; - PVE
OVMF (UEFI):使用-efi的 combined 映像檔,並準備 EFI 磁碟; - 實體機器:檢查韌體中的
UEFI/Legacy並使其一致; - 選錯的後果:沒有開機項目、GRUB 無法啟動、掉到 PXE/BIOS。
本次實驗:PVE VM 200,SeaBIOS + generic-ext4-combined;成功開機。
電腦下載映像檔與 sha256sums
curl -LO https://downloads.openwrt.org/releases/25.12.6/targets/x86/64/openwrt-25.12.6-x86-64-generic-ext4-combined.img.gzcurl -LO https://downloads.openwrt.org/releases/25.12.6/targets/x86/64/sha256sumsgrep 'generic-ext4-combined.img.gz' sha256sums | sha256sum -c -本次實驗:.img.gz 為 13.0MB,解壓縮後的 .img 為 120.5MB;SHA-256 相符。
預期官方/TUNA 來源與校驗碼通過。
電腦解壓縮
gzip -dk openwrt-25.12.6-x86-64-generic-ext4-combined.img.gzls -lh openwrt-25.12.6-x86-64-generic-ext4-combined.imgsysupgrade 與 PVE 的 qm importdisk 使用 .img;不要把 .gz 直接寫入磁碟。
預期得到可供匯入/寫入的 .img。
匯入 PVE
Section titled “匯入 PVE”PVE 主機匯入磁碟並設定開機順序
qm create 200 --name openwrt --memory 512 --cores 2 --cpu host \ --scsihw virtio-scsi-pci --ostype l26 --vga std --serial0 socket \ --net0 virtio,bridge=vmbr0
qm importdisk 200 openwrt-25.12.6-x86-64-generic-ext4-combined.img local-lvmqm set 200 --scsi0 local-lvm:vm-200-disk-0qm set 200 --boot order=scsi0qm start 200若 PVE 使用 UEFI/OVMF,請使用 -efi 映像檔與 EFI 磁碟;不要把 BIOS 映像檔硬套到 UEFI 上。
預期VM 從匯入的磁碟開機,而不是 ISO/PXE。
PVE 主機驗證開機
qm terminal 200# or inside the VMubus call system boardcat /etc/openwrt_release本次實驗成功開機 25.12.6 x86/64;預設 LAN 為 192.168.1.1。
預期主控台顯示 OpenWrt 以及正確的版本/target。
寫入實體磁碟
Section titled “寫入實體磁碟”# verify the target first; do not copy the wrong device namelsblksudo dd if=openwrt-...-combined.img of=/dev/sdX bs=4M status=progress conv=fsyncsyncdd會覆蓋整個目標;請拔除無關的磁碟並確認裝置名稱;- UEFI 請選擇
-efi; - 從該磁碟開機;不要讓 ISO 保有開機優先順序;
- 實體網路卡名稱可能與 PVE 的
eth0/eth1不同;請依 MAC/PCI 辨識。
PVE 匯入後無法開機
Section titled “PVE 匯入後無法開機”- 開機順序不是
scsi0; - 你選了 rootfs 而不是 combined;
- BIOS/UEFI 映像檔不符;
- 磁碟匯流排/控制器不符;
- 未設定序列主控台,沒有開機記錄。
實體 UEFI 開機失敗
Section titled “實體 UEFI 開機失敗”- 使用了非
-efi的映像檔; - BIOS 仍處於 Legacy/CSM;
- USB 寫入不完整;
- Secure Boot/簽章限制。
寫入後原本的系統消失了
Section titled “寫入後原本的系統消失了”dd 寫到了錯誤的磁碟。請先備份,確認 lsblk 的容量/型號後再寫入;不要在正式環境的機器上測試。
rootfs 映像檔無法直接開機
Section titled “rootfs 映像檔無法直接開機”rootfs 沒有 bootloader/分割表;請使用既有的 bootloader,或採用適當的容器/虛擬化方式。
E2 實驗室實測(2026-10-20)
Section titled “E2 實驗室實測(2026-10-20)”- 環境:PVE 9.2.2;OpenWrt 25.12.6 x86/64;
generic-ext4-combined.img.gz;SeaBIOS。 - 下載:
.img.gz13.0MB;.img120.5MB;SHA-256 與官方sha256sums相符。 - PVE:
qm importdisk→scsi0→boot order=scsi0;VM 成功開機 25.12.6。 - 未測試:
-efi/OVMF、squashfs、實體 USB、Secure Boot、24.10 映像檔的差異。 - Recipe:
tests/recipes/x86-image-25.12.md。
- 這是 E2 partial:已測試 BIOS/ext4 combined + PVE 匯入;UEFI/squashfs/實體寫入未測試。
- 映像檔名稱/可用性會隨版本變動;請以下載頁面為準。
- 沒有獨立審閱者;結論僅限於此 PVE/VM 環境。