#!/bin/sh set -e cd ${BINARIES_DIR} # GPT partition type UUIDs esp_type=c12a7328-f81f-11d2-ba4b-00a0c93ec93b linux_type=44479540-f297-41b2-9af7-d131d5f0458a # Partition UUIDs efi_part_uuid=$(uuidgen) root_part_uuid=$(uuidgen) # Boot partition offset and size, in 512-byte sectors efi_part_start=64 efi_part_size=32768 # Rootfs partition offset and size, in 512-byte sectors root_part_start=$(( efi_part_start + efi_part_size )) root_part_size=$(( $(stat -c %s rootfs.ext2) / 512 )) first_lba=34 last_lba=$(( root_part_start + root_part_size )) # Disk image size in 512-byte sectors image_size=$(( last_lba + first_lba )) cat > efi-part/EFI/BOOT/grub.cfg <