From c8229ee61ff0e91361e41ad4a11277bb4f3078ee Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 22 Jul 2024 17:09:39 -0400 Subject: components/boot: Add common configuration for disk images This introduces a core disk configuration profile "BootDiskCore" that can be used for creating non-cloud bootable disks. --- config.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'config.sh') diff --git a/config.sh b/config.sh index e998ac4..4e8d40f 100755 --- a/config.sh +++ b/config.sh @@ -46,7 +46,7 @@ fi #====================================== # Delete & lock the root user password #-------------------------------------- -if [[ "$kiwi_profiles" == *"Cloud"* ]] || [[ "$kiwi_profiles" == *"Live"* ]]; then +if [[ "$kiwi_profiles" == *"Cloud"* ]] || [[ "$kiwi_profiles" == *"Disk"* ]] || [[ "$kiwi_profiles" == *"Live"* ]]; then passwd -d root passwd -l root fi @@ -92,6 +92,19 @@ if [[ "$kiwi_profiles" == *"Live"* ]]; then fi fi +#====================================== +# Setup firstboot initial setup +#-------------------------------------- + +if [[ "$kiwi_profiles" == *"Disk"* ]]; then + if [[ "$kiwi_profiles" != *"GNOME"* ]]; then + ## Enable initial-setup + systemctl enable initial-setup.service + ## Enable reconfig mode + touch /etc/reconfigSys + fi +fi + #====================================== # Setup default target #-------------------------------------- @@ -107,6 +120,15 @@ fi # Setup default customizations #-------------------------------------- +if [[ "$kiwi_profiles" == *"Disk"* ]]; then + # Find the architecture we are on + installarch=$(uname -m) + # Setup Raspberry Pi firmware + if [[ $installarch == "aarch64" ]]; then + cp -a /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin + fi +fi + if [[ "$kiwi_profiles" == *"Azure"* ]]; then cat > /etc/ssh/sshd_config.d/50-client-alive-interval.conf << EOF ClientAliveInterval 120 -- cgit v1.3.1+13