image: Use 512 byte blocks for EFI partitions.

Addresses <https://issues.guix.gnu.org/59695>.

* gnu/build/image.scm (make-vfat-image): When creating a fat filesystem
for UEFI bootable partition use 512 byte blocks.
This commit is contained in:
Efraim Flashner 2022-12-12 10:27:40 +02:00
parent 2d989ad597
commit 45f5feb279
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -111,7 +111,10 @@ (define* (make-vfat-image partition target root fs-bits)
(if (eq? size 'guess)
(estimate-partition-size root)
size))
(if (member 'esp flags) (list "-S" "1024") '()))
;; u-boot in particular needs the formatted block
;; size and the physical block size to be equal.
;; TODO: What about 4k blocks?
(if (member 'esp flags) (list "-S" "512") '()))
(for-each (lambda (file)
(unless (member file '("." ".."))
(invoke "mcopy" "-bsp" "-i" target