用于构建具有多个分区的简单磁盘镜像的库
项目描述
如何使用
查看examples/
或https://simplediskimage.readthedocs.io/en/latest/
在PyPI上可用(pip install simplediskimage
)或https://pypi.ac.cn/project/simplediskimage/
依赖项
Debian/Ubuntu
# Common
$ sudo apt install python3-parted python3-distutils
# FAT support
$ sudo apt install dosfstools mtools
# ext* support
$ sudo apt install e2fsprogs
# All
$ sudo apt install python3-parted python3-distutils dosfstools mtools e2fsprogs
Fedora/CentOS
# Common
$ sudo dnf install python3-pyparted
# FAT support
$ sudo dnf install dosfstools mtools
# ext* support
$ sudo dnf install e2fsprogs
# All
$ sudo dnf install python3-pyparted dosfstools mtools e2fsprogs
已知问题
mtools
和debugfs
在错误报告方面表现不佳,因此如果复制失败,它可能不会显示,直到您尝试挂载镜像。
Parted在某些平台(Debian 10)上表现不佳,会缩小分区。请使用Sfdisk。此外,某些FAT实现期望文件系统的大小与分区完全相同,因此除非完全执行,否则填充将不起作用。
copy_file_range
在某些容器中似乎表现异常,在Fedora 30 + podman与Debian 10容器中观察到它跳过复制某些数据。
未来想法
- 可配置的对齐,默认为1MiB
- 正确的原始
copy_file_range
函数,使用dup()
- 为sfdisk分区器添加GPT支持(并将其设置为默认选项)
- 是否支持sgdisk?
- 多启动镜像(iso,efi,bios)
- MTD类型分区:只有偏移量,并有可能获取mtdparts=-type字符串
- 修复travis pylint导入失败
项目详情
关闭
simplediskimage-0.4.2.tar.gz的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 10939507d8420fa64e3f2f53be3338a85bc7814342b61b3d05f537c05ad43aea |
|
MD5 | 477b7a61f8b56ca96ab844986089573e |
|
BLAKE2b-256 | b96343f8a44c75a33ca30da809b5033c81ee7cbf1f31962caa5ea279d634f6a1 |