Compare commits
2 Commits
417d30a6af
...
5288b3da77
Author | SHA1 | Date |
---|---|---|
Sam Ebstein | 5288b3da77 | |
Sam Ebstein | ae9ea5a94d |
|
@ -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 ::
|
||||||
|
|
Loading…
Reference in New Issue