fedora-rpi: Split eMMC vs NVMe config

Machines that use eMMC/SD cards for OS storage need a slightly different
disk layout than those with nVME drives.  Notably, we do not want swap
or `/tmp` on the eMMC, as that will not really improve performance at
all and will be hard on the flash memory.

For NVMe, there are two options available, with and without a swap
volume.
master
Dustin 2024-12-28 17:23:17 -06:00
parent 6c02a4672c
commit 40c27ec738
4 changed files with 47 additions and 36 deletions

36
fedora-rpi-common.ks Normal file
View File

@ -0,0 +1,36 @@
# vim: set ft=sh :
bootloader --location none
clearpart --all --initlabel --disklabel msdos
part /boot/efi --fstype vfat --size 128 --label RASPBERRYPI
part /boot --fstype ext4 --size 512 --label boot
part pv.01 --size 1 --grow
volgroup fedora pv.01
logvol / --fstype ext4 --name rootfs --vgname fedora --size 3072 --label rootfs
logvol /var --fstype ext4 --name var --vgname fedora --size 1024 --label var --grow
logvol /var/log --fstype ext4 --name var_log --vgname fedora --size 1024 --label var-log
logvol /home --fstype ext4 --name home --vgname fedora --size 100 --label home
timesource --ntp-pool 2.fedora.pool.ntp.org
%packages --exclude-weakdeps
bcm2711-firmware
bcm283x-overlays
uboot-images-armv8
%end
%include http://git.pyrocufflink.net/infra/kickstart/raw/branch/master/fedora-common.ks
%post --erroronfail
cp -P /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin
grubby --args='quiet systemd.show_status=1' --update-kernel=ALL
systemctl enable chrony-wait
# Ensure clock is synchronized before trying to get host certs signed
mkdir -p /etc/systemd/system/ssh-host-cert-sign@.service.d
cat > /etc/systemd/system/ssh-host-cert-sign@.service.d/time-sync.conf <<EOF
[Unit]
After=time-sync.target
Wants=time-sync.target
EOF
%end

View File

@ -0,0 +1,5 @@
# vim: set ft=sh :
%include http://git.pyrocufflink.net/infra/kickstart/raw/branch/master/fedora-rpi-common.ks
ignoredisk --only-use /dev/nvme0n1
logvol /tmp --fstype ext4 --name tmp --vgname fedora --size 2048 --label tmp

4
fedora-rpi-nvme.ks Normal file
View File

@ -0,0 +1,4 @@
# vim: set ft=sh :
%include http://git.pyrocufflink.net/infra/kickstart/raw/branch/master/fedora-rpi-nvme-noswap.ks
logvol swap --fstype swap --name swap --vgname fedora --size 1024 --maxsize 8192 --label swap --grow

View File

@ -1,38 +1,4 @@
# vim: set ft=sh : # vim: set ft=sh :
bootloader --location none ignoredisk --only-use /dev/mmcblk0
clearpart --all --initlabel --disklabel msdos
part /boot/efi --fstype vfat --size 128 --label RASPBERRYPI
part /boot --fstype ext4 --size 512 --label boot
part pv.01 --size 1 --grow
volgroup fedora pv.01
logvol / --fstype ext4 --name rootfs --vgname fedora --size 4096 --label rootfs
logvol swap --fstype swap --name swap --vgname fedora --size 1024 --maxsize 8192 --label swap --grow
logvol /var --fstype ext4 --name var --vgname fedora --size 2048 --label var --grow
logvol /var/log --fstype ext4 --name var_log --vgname fedora --size 1024 --label var-log
logvol /home --fstype ext4 --name home --vgname fedora --size 100 --label home
logvol /tmp --fstype ext4 --name tmp --vgname fedora --size 2048 --label tmp
timesource --ntp-pool 2.fedora.pool.ntp.org %include http://git.pyrocufflink.net/infra/kickstart/raw/branch/master/fedora-rpi-common.ks
%packages --exclude-weakdeps
bcm2711-firmware
bcm283x-overlays
uboot-images-armv8
%end
%include http://git.pyrocufflink.net/infra/kickstart/raw/branch/master/fedora-common.ks
%post --erroronfail
cp -P /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin
grubby --args='quiet systemd.show_status=1' --update-kernel=ALL
systemctl enable chrony-wait
# Ensure clock is synchronized before trying to get host certs signed
mkdir -p /etc/systemd/system/ssh-host-cert-sign@.service.d
cat > /etc/systemd/system/ssh-host-cert-sign@.service.d/time-sync.conf <<EOF
[Unit]
After=time-sync.target
Wants=time-sync.target
EOF
%end