Julian Tölle fc871afa8d
Some checks failed
ci / lint (push) Has been cancelled
ci / test (push) Has been cancelled
ci / go-mod-tidy (push) Has been cancelled
ci / cli-help-pages (push) Has been cancelled
ci / nix-build (push) Has been cancelled
docs / deploy (push) Has been cancelled
release-please / release-please (push) Has been cancelled
feat: faster writing to disk by skipping zero blocks (#165)
By default `dd` writes all bytes from raw images 1:1 to the disk.

Some images, like Flatcar, have a lot of zero blocks in them. They have
a large partition table with 1GB for the UEFI partition, 2GB for system
A and B each, another 1GB for OEM and 6GB for the user. Most of these
are just zero blocks, but we currently still write them to disk.

By using `dd conv=sparse`, dd automatically skips writing these blocks
to the disk, which results in a quicker process, as fewer bytes need to
be written.

The resulting image is the same, as "zero" is also the default for the
blocks after our `blkdiscard` command.

I did not benchmark this properly, so you have to trust me on this one.
2026-03-16 15:05:40 +01:00
..
2024-05-04 22:13:33 +02:00