forked from sig_altarch/RockyRpi
28 lines
883 B
Bash
Executable File
28 lines
883 B
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
# Simple script that runs a Rocky Raspberry pi creation (via appliance-creator), then inserts a UUID to the kernel boot line of the image
|
|
# after-the-fact
|
|
#
|
|
# Usage: ./Rocky8_Rpi4_mkimage.sh /path/to/outputfolder/
|
|
#
|
|
#
|
|
# Needs to be run in the same directory as the rocky rpi kickstart, as it relies on it!
|
|
#
|
|
|
|
# Exit with error if we don't have an output directory:
|
|
OUTDIR=$1
|
|
|
|
if [[ -z "$OUTDIR" ]]; then
|
|
echo "Need to run this script with a path to output directory. Like: ${0} /path/to/output/"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "${OUTDIR}"
|
|
|
|
|
|
# Actually create the image. Our kickstart data should be in the same git repo as this script:
|
|
# (This takes a while, especially building on an rpi. Patience!)
|
|
appliance-creator -v -c ./Rocky8_Rpi4.ks -n RockyRpi --version=20210626 --release=1 --vmem=2048 --vcpu=2 --no-compress -o "${OUTDIR}"
|
|
|
|
chown -R $SUDO_USER. "${OUTDIR}" |