Skip to main content

How to use

See examples/ or https://simplediskimage.readthedocs.io/en/latest/

Available on PyPI (pip install simplediskimage) or https://pypi.org/project/simplediskimage/

Dependencies

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

Known issues

mtools and debugfs is not good at error reporting, so if a copy fails it might not show until you try to mount the image.

Parted misbehaves on some platforms (Debian 10), and shrinks partitions. Use Sfdisk instead. Additionally, some FAT implementations expect the filesystem to have exactly the same size as the partition, and thus padding them will not work, unless done exactly.

copy_file_range seems to misbehave in containers sometimes, observed on Fedora 30 + podman with Debian 10 container where it skips to copy some data.

Future ideas

  • Configurable alignment, defaulting to 1MiB
  • Proper naive copy_file_range function, using dup()
  • GPT for sfdisk partitioner (and set it as the default)
  • sgdisk support?
  • Multiboot images (iso, efi, bios)
  • MTD-type partitions: Only offsets and a possibility to get a mtdparts=-type string
  • Fix travis pylint import fail

Metadata

Release files for simplediskimage 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplediskimage 0.4.2
File Size Uploaded
simplediskimage-0.4.2.tar.gz 17.9 kB Details

Release files / simplediskimage-0.4.2.tar.gz

Download URL simplediskimage-0.4.2.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
10939507d8420fa64e3f2f53be3338a85bc7814342b61b3d05f537c05ad43aea
BLAKE2b-256 checksum
How to use checksums
b96343f8a44c75a33ca30da809b5033c81ee7cbf1f31962caa5ea279d634f6a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.4.2 This release

1 release file

0.4.1

1 release file

0.4

1 release file

0.3

2 release files

0.2

2 release files

0.1.3

2 release files

0.1.2

1 release file

0.1.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page