mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-05-11 09:36:33 +00:00
Due to rpi3 not supporting GPT disks, we need to separate the building into rpi3 and 4 so rpi4 gets GPT disks and can auto-expand the last partition properly (and add extra partitions and so on) This also includes some cleanup for the luet cache dirs, includes the kairos-agent which was missing from the image for pulling images, and cleans up the lvm vgs if they were left Signed-off-by: Itxaka <itxaka@kairos.io>
23 lines
268 B
Bash
Executable File
23 lines
268 B
Bash
Executable File
#!/bin/bash
|
|
|
|
partprobe
|
|
|
|
kpartx -va $DRIVE
|
|
|
|
image=$1
|
|
|
|
if [ -z "$image" ]; then
|
|
echo "No image specified"
|
|
exit 1
|
|
fi
|
|
|
|
set -ax
|
|
TEMPDIR="$(mktemp -d)"
|
|
echo $TEMPDIR
|
|
mount "${device}p1" "${TEMPDIR}"
|
|
|
|
# Copy all rpi files
|
|
cp -rfv /rpi/* $TEMPDIR
|
|
|
|
umount "${TEMPDIR}"
|