-
Notifications
You must be signed in to change notification settings - Fork 117
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
utils.py: raise error if rootfs file size is not multiple of 4KiB. #236
base: main
Are you sure you want to change the base?
utils.py: raise error if rootfs file size is not multiple of 4KiB. #236
Conversation
14f2433
to
db8f947
Compare
This doesn't look right. 16MiB is just the copy block size. The rootfs has to be a multiple of the physical sector size which is 4KiB. If your image creation is producing FS images that are not a multiple of the sector size, then yeah, you have a problem ;) |
Thanks for the answer! do you think I should go ahead and change my PR to 4KiB or is there no need to go ahead and do anything? |
Thanks for pointing that out! Yes, due to the flaw in the calculation algorithm, our image creation process just always creates images which are not a multiple of 16MiB, 4KiB or 512B. I thought that each write in the |
db8f947
to
d9abd7d
Compare
See: AOSC-Dev/aosc-asahi-installer@f46e12d, if rootfs image size can not multipie of 4KiB, asahi-installer will raise `EINVAL`, users don't know whats happen ... The point of this commit is to look for illegitimate rootfs image sizes in advance, so that the raise error becomes clear. Signed-off-by: eatradish <[email protected]>
d9abd7d
to
fe92e2e
Compare
- According to [1], image size does not necessaily comply to the multiple of 16MiB rule, but 4KiB is the hard limit. - Also make sure bc does not emit any decimals. [1]: AsahiLinux/asahi-installer#236 (comment)
See: AOSC-Dev/aosc-asahi-installer@c5c8633, if rootfs image size can not multipie of 16MiB, asahi-installer will raise
EINVAL
, users don't know whats happen ...The point of this commit is to look for illegitimate rootfs image sizes in advance, so that the raise error becomes clear.