Compare commits
6 Commits
571bb3bd5b
...
fc2f5eb41b
Author | SHA1 | Date | |
---|---|---|---|
fc2f5eb41b | |||
ef7d264529 | |||
2a5dee650b | |||
748396a937 | |||
fad0d5954e | |||
08c0200fda |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
output/*
|
||||||
|
logs/*
|
12
README.md
12
README.md
@ -2,7 +2,7 @@
|
|||||||
Scripts and kickstarts for building Rocky Linux for Raspberry Pi
|
Scripts and kickstarts for building Rocky Linux for Raspberry Pi
|
||||||
|
|
||||||
## Purpose of this Repo
|
## Purpose of this Repo
|
||||||
This repository contains kickstart scripts and commands for producing your own Rocky Linux 8 image for the Raspberry Pi. It's intended mostly for developers or other technical users. If you are simply interested in using Rocky on your Pi, it's much easier to grab the latest image from (currently): https://rocky.lowend.ninja/RockyRpi/RockyRpi_Images/
|
This repository contains kickstart scripts and commands for producing your own Rocky Linux 8 image for the Raspberry Pi. It's intended mostly for developers or other technical users. If you are simply interested in using Rocky on your Pi, it's much easier to grab the latest image from (currently): https://dl.rockylinux.org/pub/rocky/8/rockyrpi/aarch64/images/
|
||||||
|
|
||||||
|
|
||||||
The readme.image.txt file has information and instructions for those interested in downloading and using the ready-made image.
|
The readme.image.txt file has information and instructions for those interested in downloading and using the ready-made image.
|
||||||
@ -13,7 +13,9 @@ The readme.image.txt file has information and instructions for those interested
|
|||||||
Producing the Rpi Image requires:
|
Producing the Rpi Image requires:
|
||||||
|
|
||||||
* A Fedora or EL-based distribution (Rocky/CentOS/RHEL/etc.) **running on aarch64 hardware**
|
* A Fedora or EL-based distribution (Rocky/CentOS/RHEL/etc.) **running on aarch64 hardware**
|
||||||
|
* Packages
|
||||||
* git
|
* git
|
||||||
|
|
||||||
* EPEL repo enabled (extra packages for enterprise linux)
|
* EPEL repo enabled (extra packages for enterprise linux)
|
||||||
* The appliance-creator program from appliance-tools package ( ```sudo dnf install appliance-tools``` )
|
* The appliance-creator program from appliance-tools package ( ```sudo dnf install appliance-tools``` )
|
||||||
|
|
||||||
@ -23,17 +25,15 @@ The included script to create the image is quite simple. Simply run it (with su
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
`sudo ./Rocky8_Rpi4_mkimage.sh /home/myhomefolder/Rocky8_image/`
|
`sudo ./createRocky8_Image.sh /home/myhomefolder/Rocky8_image/`
|
||||||
|
|
||||||
|
|
||||||
The kickstart/image build process takes approximately 10 minutes on a Raspberry Pi 4 with a decently fast internet connection.
|
The kickstart/image build process takes approximately 10 minutes on a Raspberry Pi 4 with a decently fast internet connection. Alternatively, you should be able to use any aarch64 hardware that meets the above requirements(Amazon EC2, etc)
|
||||||
|
|
||||||
|
|
||||||
## Customizing the Kickstart
|
## Customizing the Kickstart
|
||||||
|
|
||||||
All the setup logic for the image is contained within the kickstart file (Rocky8_Rpi4.ks). It is intended to be readable and well documented, and you can of course change it anyway you please to produce custom images yourself.
|
All the setup logic for the image is contained within the kickstart file (Rocky8_Rpi.ks). It is intended to be readable and well documented, and you can of course change it anyway you please to produce custom images yourself.
|
||||||
|
|
||||||
Additionally, the mkimage script is very simple, and you can certainly customize it (or just run your own command) if you need to change the appliance-creator settings.
|
|
||||||
|
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
|
@ -1,28 +1,41 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# 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
|
# after-the-fact
|
||||||
#
|
#
|
||||||
# Usage: ./Rocky8_Rpi4_mkimage.sh /path/to/outputfolder/
|
# 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!
|
# 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:
|
# Exit with error if we don't have an output directory:
|
||||||
OUTDIR=$1
|
|
||||||
|
|
||||||
if [[ -z "$OUTDIR" ]]; then
|
OUTDIR=$1
|
||||||
|
LOGDIR="logs"
|
||||||
|
LOGFILE="/create_image`date +"%y%m%d"`.log"
|
||||||
|
LOGFILE2="create_image`date +"%y%m%d"`.log.2"
|
||||||
|
|
||||||
|
if [[ -z "${OUTDIR}" ]]; then
|
||||||
echo "Need to run this script with a path to output directory. Like: ${0} /path/to/output/"
|
echo "Need to run this script with a path to output directory. Like: ${0} /path/to/output/"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${OUTDIR}"
|
if [[ -d ${LOGDIR} ]]; then
|
||||||
|
echo "$LOGDIR exists..."
|
||||||
|
else
|
||||||
|
mkdir -p "${LOGDIR}"
|
||||||
|
touch $LOGDIR/$LOGFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d ${OUTDIR} ]]; then
|
||||||
|
echo "$OUTDIR exists..."
|
||||||
|
else
|
||||||
|
mkdir -p "${OUTDIR}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Actually create the image. Our kickstart data should be in the same git repo as this script:
|
# 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!)
|
# (This takes a while, especially building on an rpi. Patience!)
|
||||||
appliance-creator -v -c ./Rocky8_Rpi4.ks -n RockyRpi --version=`date +"%Y%m%d"` --release=1 --vmem=2048 --vcpu=2 --no-compress -o "${OUTDIR}"
|
appliance-creator -v -c ./Rocky8_Rpi4.ks -n RockyRpi \
|
||||||
|
--version=`date +"%Y%m%d"` --release=1 \
|
||||||
chown -R $SUDO_USER. "${OUTDIR}"
|
-d --logfile $LOGDIR/LOGFILE \
|
||||||
|
--vmem=2048 --vcpu=2 --no-compress -o "${OUTDIR}"
|
||||||
|
#chown -R $SUDO_USER. "${OUTDIR}"
|
@ -1,4 +1,4 @@
|
|||||||
(This file comes from the kickstart/appliance-creator repo: https://git.rockylinux.org/skip/RockyRpi )
|
(This file comes from the kickstart/appliance-creator repo: https://git.resf.org/codedude/RockyRpi )
|
||||||
|
|
||||||
Rocky 8 Raspberry Pi Images
|
Rocky 8 Raspberry Pi Images
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user