mirror of
https://github.com/apricote/hcloud-upload-image.git
synced 2026-05-05 20:16:16 +02:00
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
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.