Compare commits
No commits in common. "bb76f61615221d488643b7474931c3022834db7c" and "575967e5b41984bfaafbfee76eb3e55d11a8baff" have entirely different histories.
bb76f61615
...
575967e5b4
|
@ -65,6 +65,7 @@ COPY --from=cpio . /
|
|||
COPY --from=mtools . /
|
||||
COPY --from=xz . /
|
||||
COPY --from=grub . /
|
||||
COPY --from=util-linux . /
|
||||
|
||||
FROM base as dev
|
||||
COPY --from=gcc . /
|
||||
|
@ -197,8 +198,6 @@ FROM build AS install
|
|||
ENV SOURCE_DATE_EPOCH=1
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
dd if=/dev/zero bs=1M count=10 >> user.img
|
||||
mformat -v user -i user.img -N 0 ::
|
||||
find iso -exec touch -hcd "@0" "{}" +
|
||||
xorrisofs \
|
||||
-output airgap.iso \
|
||||
|
@ -218,8 +217,24 @@ RUN <<-EOF
|
|||
-no-emul-boot \
|
||||
-isohybrid-gpt-basdat \
|
||||
-follow-links \
|
||||
-append_partition 3 0xb user.img \
|
||||
iso/
|
||||
|
||||
# Increase ISO size by 512 MB to create space for the third partition
|
||||
dd if=/dev/zero bs=1M count=512 >> airgap.iso
|
||||
|
||||
# Append a new partition that uses the additional space
|
||||
echo ", +" | sfdisk --append airgap.iso
|
||||
|
||||
# Set the newly added third partition to FAT32
|
||||
sfdisk --part-type airgap.iso 3 b
|
||||
|
||||
# Calculate the byte offset of the third partition
|
||||
# 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).
|
||||
OFFSET=$(fdisk -l airgap.iso | awk '/^airgap.iso1/ {print ($4 + 1) * 512}')
|
||||
|
||||
# Format the third partition as FAT32 and label it 'USER'
|
||||
mformat -v USER -i airgap.iso@@$OFFSET ::
|
||||
EOF
|
||||
|
||||
## Minimal Autorun SD card image
|
||||
|
|
Loading…
Reference in New Issue