Fix xorriso EFI repacking
This commit is contained in:
parent
8a350b4d86
commit
401bb1bbf8
@ -68,13 +68,10 @@ sed -i "s/set timeout_style=.*/set timeout_style=countdown/" "$GRUB_CFG"
|
|||||||
sed -i "/^\s*linux.*vmlinuz/s/$/ autoinstall quiet ds=nocloud;s=\/cdrom\/nocloud\//" "$GRUB_CFG"
|
sed -i "/^\s*linux.*vmlinuz/s/$/ autoinstall quiet ds=nocloud;s=\/cdrom\/nocloud\//" "$GRUB_CFG"
|
||||||
echo "✓ GRUB patched"
|
echo "✓ GRUB patched"
|
||||||
|
|
||||||
# ── Get EFI partition info for repacking ───────
|
# ── Get MBR template from original ISO ─────────
|
||||||
MBR_TEMPLATE=$(mktemp)
|
MBR_TEMPLATE=$(mktemp)
|
||||||
dd if="$ORIGINAL_ISO" bs=1 count=432 of="$MBR_TEMPLATE" 2>/dev/null
|
dd if="$ORIGINAL_ISO" bs=1 count=432 of="$MBR_TEMPLATE" 2>/dev/null
|
||||||
|
|
||||||
EFI_START=$(fdisk -l "$ORIGINAL_ISO" 2>/dev/null | grep "EFI" | awk '{print $2}')
|
|
||||||
EFI_SIZE=$(fdisk -l "$ORIGINAL_ISO" 2>/dev/null | grep "EFI" | awk '{print $4}')
|
|
||||||
|
|
||||||
# ── Repack ISO ─────────────────────────────────
|
# ── Repack ISO ─────────────────────────────────
|
||||||
echo "→ Repacking ISO (this takes ~2 minutes)..."
|
echo "→ Repacking ISO (this takes ~2 minutes)..."
|
||||||
xorriso -as mkisofs \
|
xorriso -as mkisofs \
|
||||||
@ -95,10 +92,9 @@ xorriso -as mkisofs \
|
|||||||
-boot-info-table \
|
-boot-info-table \
|
||||||
--grub2-boot-info \
|
--grub2-boot-info \
|
||||||
-eltorito-alt-boot \
|
-eltorito-alt-boot \
|
||||||
-e "--interval:appended_partition_2_start_${EFI_START}s_size_${EFI_SIZE}s:all::" \
|
-e "--interval:appended_partition_2:::" \
|
||||||
-no-emul-boot \
|
-no-emul-boot \
|
||||||
-boot-load-size 4 \
|
"$WORK_DIR"
|
||||||
"$WORK_DIR" 2>/dev/null
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "╔══════════════════════════════════════════════════════╗"
|
echo "╔══════════════════════════════════════════════════════╗"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user