Fix error with creating efi.img

This commit is contained in:
Aleksey Samoilov 2023-02-19 10:17:26 +04:00
parent c2fce029fc
commit 527b8b11f4
2 changed files with 16 additions and 0 deletions

View file

@ -37,6 +37,11 @@ else
dpkg -i ./debs/*.deb
fi
# Increase number of blocks for creating efi.img.
# This prevents error with "Disk full" on the lb binary_grub-efi stage
patch -d /usr/lib/live/build/ < increase_number_of_blocks.patch
# Enable Lunar build in debootstrap
ln -sfn /usr/share/debootstrap/scripts/gutsy /usr/share/debootstrap/scripts/lunar
build () {

11
increase_number_of_blocks.patch Executable file
View file

@ -0,0 +1,11 @@
--- /usr/lib/live/build/binary_grub-efi 2023-02-19 00:09:59.711144321 +0400
+++ /usr/lib/live/build/binary_grub-efi.orig 2023-02-19 00:10:30.827749004 +0400
@@ -255,7 +255,7 @@
# directories: EFI EFI/boot boot boot/grub
size=\$((\$size + 4096 * 4))
-blocks=\$(((\$size / 1024 + 55) / 32 * 32 ))
+blocks=\$(((\$size / 1024 + 1540) / 32 * 32 ))
rm -f ${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img
# The VOLID must be (truncated to) a 32bit hexadecimal number