diff options
| author | 2024-07-22 17:09:39 -0400 | |
|---|---|---|
| committer | 2024-07-24 07:13:41 -0400 | |
| commit | c8229ee61ff0e91361e41ad4a11277bb4f3078ee (patch) | |
| tree | 02c26000f125c87c14b3d27998844c3d7edb64a5 | |
| parent | afdd23f5105f82c5a878b4260bd528b07223959b (diff) | |
| download | kiwi-descriptions-c8229ee61ff0e91361e41ad4a11277bb4f3078ee.tar.gz kiwi-descriptions-c8229ee61ff0e91361e41ad4a11277bb4f3078ee.zip | |
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.
| -rw-r--r-- | components/boot.xml | 63 | ||||
| -rwxr-xr-x | config.sh | 24 |
2 files changed, 86 insertions, 1 deletions
diff --git a/components/boot.xml b/components/boot.xml index a57398f..e62b2a6 100644 --- a/components/boot.xml +++ b/components/boot.xml @@ -2,7 +2,65 @@ <profiles> <profile name="BootCore" description="Boot core packages"/> <profile name="BootCoreUKI" description="Boot core packages for UKI"/> + <profile name="BootDiskCore" description="Boot disk core configuration"> + <requires profile="BootCore"/> + </profile> </profiles> + <preferences profiles="BootDiskCore" arch="x86_64,aarch64"> + <type image="oem" + filesystem="btrfs" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" fsmountoptions="x-systemd.growfs,compress=zstd:1" + kernelcmdline="rhgb quiet" devicepersistency="by-uuid" target_blocksize="4096" + bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi" + rootfs_label="fedora" + > + <bootloader name="grub2" console="console" timeout="1" timeout_style="hidden"/> + <systemdisk name="fedora"> + <volume name="@root=root"/> + <volume name="home" parent="/"/> + <volume name="var" parent="/"/> + </systemdisk> + <oemconfig> + <oem-resize>false</oem-resize> + </oemconfig> + </type> + </preferences> + <preferences profiles="BootDiskCore" arch="ppc64le"> + <type image="oem" + filesystem="btrfs" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" fsmountoptions="x-systemd.growfs,compress=zstd:1" + kernelcmdline="rhgb quiet" devicepersistency="by-uuid" + bootpartition="true" bootpartsize="1000" bootfilesystem="ext4" firmware="ofw" + rootfs_label="fedora" + > + <bootloader name="grub2" console="console" timeout="1" timeout_style="hidden"/> + <systemdisk> + <volume name="@root=root"/> + <volume name="home" parent="/"/> + <volume name="var" parent="/"/> + </systemdisk> + <oemconfig> + <oem-resize>false</oem-resize> + </oemconfig> + </type> + </preferences> + <preferences profiles="BootDiskCore" arch="s390x"> + <type image="oem" + filesystem="btrfs" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" fsmountoptions="x-systemd.growfs,compress=zstd:1" + kernelcmdline="no_timer_check console=tty1 console=ttyS0,115200n8" + devicepersistency="by-uuid" + bootpartition="true" bootpartsize="1000" bootfilesystem="ext4" + rootfs_label="fedora" + > + <bootloader name="zipl" timeout="1"/> + <systemdisk> + <volume name="@root=root"/> + <volume name="home" parent="/"/> + <volume name="var" parent="/"/> + </systemdisk> + <oemconfig> + <oem-resize>false</oem-resize> + </oemconfig> + </type> + </preferences> <packages type="bootstrap" patternType="plusRecommended" profiles="BootCore,BootCoreUKI"> <package name="grubby"/> </packages> @@ -34,4 +92,9 @@ <package name="grub2-efi-aa64-cdboot" arch="aarch64"/> <package name="grub2-efi-x64-cdboot" arch="x86_64"/> </packages> + <packages type="image" patternType="plusRecommended" profiles="BootDiskCore"> + <package name="arm-image-installer" arch="aarch64"/> + <package name="bcm283x-firmware" arch="aarch64"/> + <package name="uboot-images-armv8" arch="aarch64"/> + </packages> </image> @@ -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 @@ -93,6 +93,19 @@ if [[ "$kiwi_profiles" == *"Live"* ]]; then 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 #-------------------------------------- if [[ "$kiwi_profiles" != *"Container"* ]]; then @@ -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 |