rockygenericaarch64/includes/gen-postcommon8.ksi

45 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2022-12-17 23:23:41 +00:00
%post
# Setting correct yum variable to use raspberrypi kernel repo
#echo "generic" > /etc/dnf/vars/kvariant
#
# Generic efi filename for VMs
mkdir -p /boot/efi/EFI/BOOT
if [ -f /boot/efi/EFI/rocky/grubaa64.efi ];then
cp -f /boot/efi/EFI/rocky/grubaa64.efi /boot/efi/EFI/BOOT/BOOTAA64.EFI
fi
2023-12-23 23:53:42 +00:00
cp -f /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin
2022-12-17 23:23:41 +00:00
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
%end