From 1a059869c175a096cb02f1c6b10f78252bc1e24c Mon Sep 17 00:00:00 2001 From: Bryan Zuelly Date: Thu, 10 Oct 2024 21:21:07 -0400 Subject: [PATCH 1/5] initial folder reorg --- Rocky-9-aarch64-generic-Minimal.ks | 4 ++-- includes/{ => disks}/gen-partitions9.ksi | 0 includes/gen-rockycommon9.ksi | 14 +++++++------- includes/{ => packages}/gen-packages9.ksi | 0 includes/{ => packages}/packages9.ksi | 0 includes/{ => post}/gen-postcommon9.ksi | 0 includes/{ => post}/postcommon9.ksi | 0 includes/{ => post}/rockyreadme9.ksi | 0 includes/{ => post}/rootfs-expand.ksi | 0 includes/{ => pre}/precommon9.ksi | 0 includes/{ => repos}/gen-reposcommon9.ksi | 0 includes/{ => repos}/rockyrepos9.ksi | 0 12 files changed, 9 insertions(+), 9 deletions(-) rename includes/{ => disks}/gen-partitions9.ksi (100%) rename includes/{ => packages}/gen-packages9.ksi (100%) rename includes/{ => packages}/packages9.ksi (100%) rename includes/{ => post}/gen-postcommon9.ksi (100%) rename includes/{ => post}/postcommon9.ksi (100%) rename includes/{ => post}/rockyreadme9.ksi (100%) rename includes/{ => post}/rootfs-expand.ksi (100%) rename includes/{ => pre}/precommon9.ksi (100%) rename includes/{ => repos}/gen-reposcommon9.ksi (100%) rename includes/{ => repos}/rockyrepos9.ksi (100%) diff --git a/Rocky-9-aarch64-generic-Minimal.ks b/Rocky-9-aarch64-generic-Minimal.ks index ddec97f..3f08e6b 100644 --- a/Rocky-9-aarch64-generic-Minimal.ks +++ b/Rocky-9-aarch64-generic-Minimal.ks @@ -1,3 +1,3 @@ -%include includes/rockyrepos9.ksi -%include includes/gen-reposcommon9.ksi +%include includes/repos/rockyrepos9.ksi +%include includes/repos/gen-reposcommon9.ksi %include includes/gen-rockycommon9.ksi diff --git a/includes/gen-partitions9.ksi b/includes/disks/gen-partitions9.ksi similarity index 100% rename from includes/gen-partitions9.ksi rename to includes/disks/gen-partitions9.ksi diff --git a/includes/gen-rockycommon9.ksi b/includes/gen-rockycommon9.ksi index cc68670..87b5dc0 100644 --- a/includes/gen-rockycommon9.ksi +++ b/includes/gen-rockycommon9.ksi @@ -1,9 +1,9 @@ rootpw --lock %include includes/basecommon9.ksi -%include includes/gen-partitions9.ksi -%include includes/packages9.ksi -%include includes/gen-packages9.ksi -%include includes/precommon9.ksi -%include includes/rockyreadme9.ksi -%include includes/gen-postcommon9.ksi -%include includes/postcommon9.ksi +%include includes/disks/gen-partitions9.ksi +%include includes/packages/packages9.ksi +%include includes/packages/gen-packages9.ksi +%include includes/pre/precommon9.ksi +%include includes/post/rockyreadme9.ksi +%include includes/post/gen-postcommon9.ksi +%include includes/post/postcommon9.ksi diff --git a/includes/gen-packages9.ksi b/includes/packages/gen-packages9.ksi similarity index 100% rename from includes/gen-packages9.ksi rename to includes/packages/gen-packages9.ksi diff --git a/includes/packages9.ksi b/includes/packages/packages9.ksi similarity index 100% rename from includes/packages9.ksi rename to includes/packages/packages9.ksi diff --git a/includes/gen-postcommon9.ksi b/includes/post/gen-postcommon9.ksi similarity index 100% rename from includes/gen-postcommon9.ksi rename to includes/post/gen-postcommon9.ksi diff --git a/includes/postcommon9.ksi b/includes/post/postcommon9.ksi similarity index 100% rename from includes/postcommon9.ksi rename to includes/post/postcommon9.ksi diff --git a/includes/rockyreadme9.ksi b/includes/post/rockyreadme9.ksi similarity index 100% rename from includes/rockyreadme9.ksi rename to includes/post/rockyreadme9.ksi diff --git a/includes/rootfs-expand.ksi b/includes/post/rootfs-expand.ksi similarity index 100% rename from includes/rootfs-expand.ksi rename to includes/post/rootfs-expand.ksi diff --git a/includes/precommon9.ksi b/includes/pre/precommon9.ksi similarity index 100% rename from includes/precommon9.ksi rename to includes/pre/precommon9.ksi diff --git a/includes/gen-reposcommon9.ksi b/includes/repos/gen-reposcommon9.ksi similarity index 100% rename from includes/gen-reposcommon9.ksi rename to includes/repos/gen-reposcommon9.ksi diff --git a/includes/rockyrepos9.ksi b/includes/repos/rockyrepos9.ksi similarity index 100% rename from includes/rockyrepos9.ksi rename to includes/repos/rockyrepos9.ksi -- 2.43.5 From e3e46805f2e249d811645952d7aa53ef16d9aba4 Mon Sep 17 00:00:00 2001 From: Bryan Zuelly Date: Thu, 10 Oct 2024 21:46:58 -0400 Subject: [PATCH 2/5] added space in gen-postcommon9 to fix merge conflict --- includes/post/gen-postcommon9.ksi | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/post/gen-postcommon9.ksi b/includes/post/gen-postcommon9.ksi index 38816b8..3feb173 100644 --- a/includes/post/gen-postcommon9.ksi +++ b/includes/post/gen-postcommon9.ksi @@ -53,4 +53,5 @@ chmod 644 /etc/default/grub rpm --rebuilddb # remove /boot/dtb for some rpi to boot rm -f /boot/dtb + %end -- 2.43.5 From 03509a195b81d033f4531927db363e3034f3101b Mon Sep 17 00:00:00 2001 From: Sherif Nagy Date: Sat, 23 Dec 2023 23:52:33 +0000 Subject: [PATCH 3/5] Fixing rpi uboot path --- includes/post/gen-postcommon9.ksi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/post/gen-postcommon9.ksi b/includes/post/gen-postcommon9.ksi index 3feb173..b507097 100644 --- a/includes/post/gen-postcommon9.ksi +++ b/includes/post/gen-postcommon9.ksi @@ -15,8 +15,7 @@ if [ -d /boot/efi/EFI/rocky/ ] && [ -f /boot/efi/EFI/rocky/grubaa64.efi ];then cp -f /boot/efi/EFI/rocky/grubaa64.efi /boot/efi/EFI/BOOT/BOOTAA64.EFI fi -cp -f /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin -cp -f /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin +cp -f /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin rpm -e dracut-config-generic -- 2.43.5 From ed12503806d4e81ac4721476c154e17f7e3152af Mon Sep 17 00:00:00 2001 From: Bryan Zuelly Date: Thu, 10 Oct 2024 21:55:50 -0400 Subject: [PATCH 4/5] Revert "added space in gen-postcommon9 to fix merge conflict" This reverts commit e3e46805f2e249d811645952d7aa53ef16d9aba4. --- includes/post/gen-postcommon9.ksi | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/post/gen-postcommon9.ksi b/includes/post/gen-postcommon9.ksi index b507097..ee68800 100644 --- a/includes/post/gen-postcommon9.ksi +++ b/includes/post/gen-postcommon9.ksi @@ -52,5 +52,4 @@ chmod 644 /etc/default/grub rpm --rebuilddb # remove /boot/dtb for some rpi to boot rm -f /boot/dtb - %end -- 2.43.5 From fa3cfcb4155570cedc0863850633f22a0bec5dd1 Mon Sep 17 00:00:00 2001 From: Bryan Zuelly Date: Sat, 12 Oct 2024 11:37:35 -0400 Subject: [PATCH 5/5] added gen-postcommon in includes cuz it has a conflict --- includes/gen-postcommon9.ksi | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 includes/gen-postcommon9.ksi diff --git a/includes/gen-postcommon9.ksi b/includes/gen-postcommon9.ksi new file mode 100644 index 0000000..ee68800 --- /dev/null +++ b/includes/gen-postcommon9.ksi @@ -0,0 +1,55 @@ +%post +# Setting correct yum variable to use raspberrypi kernel repo +#echo "generic" > /etc/dnf/vars/kvariant +# +# Creating rocky user and add to wheel group +/sbin/useradd -c "Rocky Linux default user" -G wheel -m -U rocky +echo "rockylinux" | passwd --stdin rocky +# Generic efi filename for VMs +mkdir -p /boot/efi/EFI/BOOT +if [ -d /boot/efi/EFI/rocky/ ] && [ -f /boot/efi/EFI/rocky/grubaa64.efi ];then + for j in grub.cfg grubenv;do + mv -f /boot/grub2/${j} /boot/efi/EFI/rocky/ + ln -s ../efi/EFI/rocky/${j} /boot/grub2/${j} + done + cp -f /boot/efi/EFI/rocky/grubaa64.efi /boot/efi/EFI/BOOT/BOOTAA64.EFI +fi + +cp -f /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin + +rpm -e dracut-config-generic + +#setup dtb link by running "creating 10-devicetree.install" +if [ -x /lib/kernel/install.d/10-devicetree.install ];then + /lib/kernel/install.d/10-devicetree.install remove +fi + +### Write /etc/sysconfig/kernel +cat << EOF > /etc/sysconfig/kernel +# Written by image installer +# UPDATEDEFAULT specifies if new-kernel-pkg should make new kernels the default +UPDATEDEFAULT=yes + +# DEFAULTKERNEL specifies the default kernel package type +DEFAULTKERNEL=kernel-core +EOF +chmod 644 /etc/sysconfig/kernel + +### Write grub defaults, turn off OS probing as it is always wrong for image creation +cat << EOF > /etc/default/grub +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" +GRUB_DEFAULT=saved +GRUB_DISABLE_SUBMENU=true +GRUB_TERMINAL_OUTPUT="console" +GRUB_CMDLINE_LINUX="" +GRUB_DISABLE_RECOVERY="true" +GRUB_DISABLE_OS_PROBER="true" +GRUB_ENABLE_BLSCFG="false" +EOF +chmod 644 /etc/default/grub +# fixing the rpmdb +rpm --rebuilddb +# remove /boot/dtb for some rpi to boot +rm -f /boot/dtb +%end -- 2.43.5