Fix GRUB reassessment findings: clean-build gap, validation, robustness
- Add grub package to redbear-full-grub.toml so make all works from a clean tree (the installer needs grub.efi before it runs) - Fix stat -f%z (macOS-only) to stat -c%s (Linux) in GRUB recipe - Normalize bootloader config value to lowercase in install_inner so bootloader = "GRUB" from config files is accepted - Add bad-cluster marker (0x0FFFFFF7) check in fat_tool.py _next_cluster to prevent potential infinite loops on degraded media - Fix file handle leak in fat_tool.py if _read_bpb raises - Clean up temp directory in fetch_bootloaders on error - Update AGENTS.md with GRUB recipe and installer documentation - Update GRUB plan with clean-build prerequisite note
This commit is contained in:
@@ -117,7 +117,7 @@ if [ ! -f "${COOKBOOK_STAGE}/usr/lib/boot/grub.efi" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GRUB_SIZE=$(stat -f%z "${COOKBOOK_STAGE}/usr/lib/boot/grub.efi" 2>/dev/null || stat -c%s "${COOKBOOK_STAGE}/usr/lib/boot/grub.efi" 2>/dev/null || echo "unknown")
|
||||
GRUB_SIZE=$(stat -c%s "${COOKBOOK_STAGE}/usr/lib/boot/grub.efi" 2>/dev/null || echo "unknown")
|
||||
echo "GRUB EFI image size: ${GRUB_SIZE} bytes"
|
||||
|
||||
# Copy default GRUB configuration from recipe directory.
|
||||
|
||||
Reference in New Issue
Block a user