8000 Writes are not in whole sectors, can't create partition of FreeBSD (OS returns EINVALID for write) · Issue #95 · Quyzi/gpt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Writes are not in whole sectors, can't create partition of FreeBSD (OS returns EINVALID for write) #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
p-kraszewski opened this issue Feb 9, 2024 · 2 comments

Comments

@p-kraszewski
Copy link

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.

@soerenmeier
Copy link
Collaborator

Thanks for pointing this out. I will need to take a closer look to fix this, might not be that easy.

@p-kraszewski
Copy link
Author
p-kraszewski commented Feb 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0