gpt
gpt copied to clipboard
Writes are not in whole sectors, can't create partition of FreeBSD (OS returns EINVALID for write)
Linux allows partial sector writes (that's why you can dd bs=1). However in other OSes (like FreeBSD) device writes are allowed only at a sector boundary and of (multiple) sector sizes.
You try to update GPT on-disk in 128-byte increments (that is at each GPT entry), which is an invalid op.
Thanks for pointing this out. I will need to take a closer look to fix this, might not be that easy.
What comes to my mind is some form of Read-Modify-Write cache with 512B pages as an intermediate layer. I'll look into it in my free time.