diff --git a/fedora-build-opennebula-image.sh b/fedora-build-opennebula-image.sh index 40f5d12..6222efc 100755 --- a/fedora-build-opennebula-image.sh +++ b/fedora-build-opennebula-image.sh @@ -134,6 +134,8 @@ run_root ln -sf /usr/share/zoneinfo/UTC /etc/localtime run_root systemctl enable systemd-timesyncd.service # Install kernel and bootloader. +# Note: linux-firmware is not required our environment and takes almost 200M +# uncompressed but is a direct dependency of kernel-core... run_root dnf -y install kernel grub2 run_root grub2-install --target=i386-pc "${NBD_DEVICE}" run_root grub2-mkconfig -o /boot/grub2/grub.cfg @@ -150,5 +152,14 @@ UUID=$boot_uuid /boot ext4 rw,relatime,data=ordered 0 2 UUID=$root_uuid / ext4 rw,relatime,data=ordered 0 1 EOF +# Reset systemd's environment. +run_root rm -f /etc/machine-id +run_root touch /etc/machine-id +rm -f /var/lib/systemd/random-seed + +# Remove temporary files and reclaim freed disk space. +# Note: build logs could be removed as well. +run_root dnf clean all + # Make sure everything is written to disk before exiting. sync