Compare commits

..

2 Commits

1 changed files with 2 additions and 1 deletions

View File

@ -184,7 +184,7 @@ COPY --from=util-linux . .
RUN <<-EOF RUN <<-EOF
set -eux set -eux
# Increase the size of the ISO by X MB to create space for the third partition # Increase the size of the ISO by X MB to create space for the third partition
dd if=/dev/zero bs=1M count=512 >> airgap.iso dd if=/dev/zero bs=1M count=51 >> airgap.iso
# Append a new partition that uses the additional space # Append a new partition that uses the additional space
echo ", +" | sfdisk --append airgap.iso echo ", +" | sfdisk --append airgap.iso
@ -196,6 +196,7 @@ RUN <<-EOF
# This is done by finding the end of the first partition using fdisk, adding 1 sector, # This is done by finding the end of the first partition using fdisk, adding 1 sector,
# and multiplying by 512 (since each sector is 512 bytes). # and multiplying by 512 (since each sector is 512 bytes).
OFFSET=$(fdisk -l airgap.iso | awk '/^airgap.iso1/ {print ($4 + 1) * 512}') OFFSET=$(fdisk -l airgap.iso | awk '/^airgap.iso1/ {print ($4 + 1) * 512}')
echo "Calculated OFFSET: $OFFSET"
# Format the third partition as FAT32 and label it 'USER' # Format the third partition as FAT32 and label it 'USER'
mformat -v USER -i airgap.iso@@$OFFSET :: mformat -v USER -i airgap.iso@@$OFFSET ::