Compare commits
No commits in common. "b5e4d2b031f647b59d7d42b15f2621b04263bbd2" and "8bfc816e12ec3f230d3fb82df1b6fcd6a79aa411" have entirely different histories.
b5e4d2b031
...
8bfc816e12
@ -3,6 +3,8 @@
|
||||
# (many parts liberally grabbed from pgreco: https://github.com/psgreco/sig-core-AltArch/tree/master/image_build )
|
||||
#
|
||||
|
||||
|
||||
|
||||
# Here is how to build this kickstart Raspberry Pi image, inside a clean mock chroot environment with livemedia-creator:
|
||||
# (it is very similar to how the other kickstarts are built, but aarch64 must be used, and the livemedia appliance option)
|
||||
#
|
||||
@ -23,12 +25,16 @@
|
||||
#
|
||||
# livemedia-creator --ks rockyrpi.ks --image-only --image-name RockyRpi --make-disk --resultdir /rockyrpi_result --no-virt
|
||||
|
||||
|
||||
|
||||
# Disk setup
|
||||
clearpart --initlabel --all
|
||||
part /boot --asprimary --fstype=vfat --size=300 --label=boot
|
||||
part swap --asprimary --fstype=swap --size=512 --label=swap
|
||||
part / --asprimary --fstype=ext4 --size=2800 --label=RPIROOT
|
||||
|
||||
|
||||
|
||||
# Repos setup:
|
||||
url --url http://download.rockylinux.org/pub/rocky/8/BaseOS/aarch64/os/
|
||||
repo --name="BaseOS" --baseurl=http://download.rockylinux.org/pub/rocky/8/BaseOS/aarch64/os/ --cost=100
|
||||
@ -38,6 +44,8 @@ repo --name="PowerTools" --baseurl=http://download.rockylinux.org/pub/rocky/8/Ba
|
||||
repo --name="rockyrpi" --baseurl=https://download.rockylinux.org/pub/sig/8/altarch/aarch64/altarch-rockyrpi/ --cost=20
|
||||
repo --name="rockyextras" --baseurl=https://download.rockylinux.org/pub/rocky/8/extras/aarch64/os/ --cost=20
|
||||
|
||||
|
||||
|
||||
# Install proces:
|
||||
install
|
||||
keyboard us --xlayouts=us --vckeymap=us
|
||||
@ -53,6 +61,8 @@ shutdown
|
||||
bootloader --location=none
|
||||
lang en_US.UTF-8
|
||||
|
||||
|
||||
|
||||
# Package selection:
|
||||
%packages
|
||||
@core
|
||||
@ -69,11 +79,14 @@ rocky-release-rpi
|
||||
raspberrypi2-firmware
|
||||
raspberrypi2-kernel4
|
||||
|
||||
|
||||
%end
|
||||
|
||||
|
||||
# Post install scripts:
|
||||
%post
|
||||
|
||||
|
||||
# Write initial boot line to cmdline.txt (we will update the root partuuid further down)
|
||||
cat > /boot/cmdline.txt << EOF
|
||||
console=ttyAMA0,115200 console=tty1 root= rootfstype=ext4 elevator=deadline rootwait
|
||||
@ -82,6 +95,7 @@ EOF
|
||||
# Run this once to fix the wifi:
|
||||
sed -i 's/boardflags3=0x48200100/boardflags3=0x44200100/g' /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
|
||||
|
||||
|
||||
# Apparently kickstart user was not working, attempt to do it here?
|
||||
/sbin/useradd -c "Rocky Linux default user" -G wheel -m -U rocky
|
||||
echo "rockylinux" | passwd --stdin rocky
|
||||
@ -98,6 +112,9 @@ This image WILL NOT WORK on a Raspberry Pi 1 or 2 (1.1 or earlier), we are 64-bi
|
||||
|
||||
The newer Pi Zero devices should be supported, as well as the Raspberry Pi 2 v. 1.2 boards, which are 64-bit
|
||||
|
||||
|
||||
|
||||
|
||||
IMAGE NOTES / DIFFERENCES FROM STOCK ROCKY 8:
|
||||
|
||||
- Based on Rocky Linux 8, points to production Rocky 8 aarch64 repositories
|
||||
@ -107,6 +124,7 @@ IMAGE NOTES / DIFFERENCES FROM STOCK ROCKY 8:
|
||||
- Initial User "rocky" (default password: "rockylinux"). Root password disabled, rocky user is a sudoer
|
||||
- Partitions are 300 MB /boot , 512 MB swap, 2800 MB rootfs. Requires a 4 GB or larger storage device to serve as your disk
|
||||
|
||||
|
||||
GROW YOUR PARTITION:
|
||||
|
||||
If you want to automatically resize your root (/ ) partition, just type the following (as root user):
|
||||
@ -114,12 +132,15 @@ sudo rootfs-expand
|
||||
|
||||
It should fill your main rootfs partition to the end of the disk.
|
||||
|
||||
|
||||
|
||||
Thanks for your interest on Rocky-on-Rpi, feel free to share your experience or contribute in our chat channel at: https://chat.rockylinux.org/rocky-linux/channels/altarch !
|
||||
|
||||
-The Rocky Linux Team
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
# Next, script to fix the wifi firmware setting:
|
||||
cat >/home/rocky/fix-wifi-rpi4.sh << 'EOF'
|
||||
#!/bin/bash
|
||||
@ -133,8 +154,10 @@ echo "Patched /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt .
|
||||
EOF
|
||||
|
||||
chmod 755 /home/rocky/fix-wifi-rpi4.sh
|
||||
|
||||
chown -R rocky:rocky /home/rocky
|
||||
|
||||
|
||||
# Cleanup before shipping an image
|
||||
|
||||
# Remove ifcfg-link on pre generated images
|
||||
@ -147,13 +170,14 @@ touch /etc/machine-id
|
||||
# Ensure no ssh keys are present
|
||||
rm -f "/etc/ssh/*_key*"
|
||||
|
||||
|
||||
# Setting tuned profile to powersave by default -> sets the CPU governor to "ondemand". This prevents overheating issues
|
||||
echo "powersave" > /etc/tuned/active_profile
|
||||
|
||||
|
||||
# Clean yum cache
|
||||
yum clean all
|
||||
# rebuild rpm database
|
||||
rpm --rebuilddb
|
||||
|
||||
%end
|
||||
|
||||
# Add the PARTUUID of the rootfs partition to the kernel command line
|
||||
@ -172,6 +196,7 @@ PART_UUID_ROOTFS="$(/sbin/blkid "$(/sbin/blkid --uuid $UUID_ROOTFS)" | \
|
||||
echo "cmdline.txt looks like this, please review:"
|
||||
/bin/cat $INSTALL_ROOT/boot/cmdline.txt
|
||||
|
||||
|
||||
# Extract UUID of swap partition:
|
||||
UUID_SWAP=$(/bin/grep 'swap' $INSTALL_ROOT/etc/fstab | awk '{print $1}' | awk -F '=' '{print $2}')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user