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.
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user