iKuai 系统镜像解包,下载地址:https://www.ikuai8.com/component/download
apt install p7zip-full
apt install binwalk
apt install qemu-utils
7z x iKuai8_x64_3.7.1_Build202304060952.iso -oiKuai
cp iKuai/boot/rootfs ./
binwalk rootfs
输出结果:
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
24917484 0x17C35EC QEMU QCOW Image
34312044 0x20B8F6C gzip compressed data, from Unix, last modified: 2023-04-06 01:53:28
binwalk -e -C . rootfs
_rootfs.extracted/20B8F6C文件和_rootfs.extracted/20B8F6C.gz文件qemu-img convert -O raw _rootfs.extracted/20B8F6C rootfs_head.raw
file -s rootfs_head.raw
rootfs_head.raw: POSIX tar archive (GNU)
mkdir -p /mnt/rootfs_head
tar -xf rootfs_head.raw -C /mnt/rootfs_head
tree /mnt/rootfs_head
输出结果:
/mnt/rootfs_head
└── root.grub
├── boot
│ ├── grub
│ │ ├── grub.cfg
│ │ ├── grub-disk.cfg
│ │ ├── grub-disk.img
│ │ ├── grub-efi.img
│ │ ├── grub-gpt-boot.img
│ │ ├── grub-gpt-core.img
│ │ ├── grub-iso.img
│ │ ├── i386-pc
│ │ │ ├── loopback.mod
│ │ │ └── probe.mod
│ │ └── x86_64-efi
│ │ ├── loopback.mod
│ │ └── probe.mod
│ └── vmlinuz
└── EFI
└── BOOT
├── BOOTX64.EFI
└── grub.cfg
qemu-img convert -O raw _rootfs.extracted/20B8F6C.gz rootfs_tail.raw
file -s rootfs_tail.raw
rootfs_tail.raw: gzip compressed data, last modified: Thu Apr 6 01:53:28 2023, from Unix, original size modulo 2^32 0
mkdir -p /mnt/rootfs_tail
tar -xf rootfs_tail.raw -C /mnt/rootfs_tail
tree /mnt/rootfs_tail
输出内容:
/mnt/rootfs_tail
└── root.grub
├── boot
│ ├── grub
│ │ ├── grub.cfg
│ │ ├── grub-disk.cfg
│ │ ├── grub-disk.img
│ │ ├── grub-efi.img
│ │ ├── grub-gpt-boot.img
│ │ ├── grub-gpt-core.img
│ │ ├── grub-iso.img
│ │ ├── i386-pc
│ │ │ ├── loopback.mod
│ │ │ └── probe.mod
│ │ └── x86_64-efi
│ │ ├── loopback.mod
│ │ └── probe.mod
│ └── vmlinuz
└── EFI
└── BOOT
├── BOOTX64.EFI
└── grub.cfg
dd if=rootfs of=qcow2.bin bs=1 skip=24917484 count=$((34312044-24917484))
file qcow2.bin
输出内容:
qcow2.bin: QEMU QCOW2 Image
qemu-img convert -O raw qcow2.bin qcow.raw
/mnt/r挂载点中修改文件内容umount /mnt/r
losetup -d /dev/loopN
dd if=rootfs bs=1 count=24917484 of=rootfs.head
rootfs.head文件qemu-img convert -O qcow2 -c rootfs.raw rootfs.qcow2.new
rootfs.qcow2.new文件cat rootfs.head rootfs.qcow2.new > rootfs.mod
cp rootfs.mod ikuai/boot/rootfs
7z a iKuai8.iso iKuai
Outsider 发表于 2025-11-23 13:40
学习了,没有ssh root权限感觉还是比较麻烦,看看能不能直接内置进去。
Yuri 发表于 2025-11-23 14:17
解包后换成这个分区不就行了
https://forum.naixi.net/thread-6209-1-1.html