diff --git a/opennebula-images/arch-build-opennebula-image.sh b/opennebula-images/arch-build-opennebula-image.sh index 6415f7a..3376cf6 100755 --- a/opennebula-images/arch-build-opennebula-image.sh +++ b/opennebula-images/arch-build-opennebula-image.sh @@ -1,6 +1,6 @@ #!/bin/sh -# This script generates arch linux images for OpenNebula. +# This script generates Debian images for OpenNebula. # # Test image locally (without network) with: # qemu-system-x86_64 -enable-kvm -m 1G -drive file=$IMAGE,format=qcow2 @@ -120,7 +120,7 @@ run_root rsync -avrh addon-context-linux-${ONE_CONTEXT_VERSION}/src/* / #run_root cp -rT addon-context-linux-${ONE_CONTEXT_VERSION}/src/ / run_root rm -r addon-context-linux-${ONE_CONTEXT_VERSION} run_root cp -r /usr/lib/systemd/system/one-context.service##arch.one /usr/lib/systemd/system/one-context.service -#run_root systemctl enable one-context.service +run_root systemctl enable one-context.service # Initalize base services. run_root systemd-machine-id-setup @@ -129,24 +129,30 @@ run_root ln -sf /usr/share/zoneinfo/UTC /etc/localtime run_root systemctl enable systemd-timesyncd.service #run_root pacman -Q linux # Install kernel and generate initramfs. -run_root pacman -Sy linux +run_root pacman -Sy linux --noconfirm run_root rsync -avrh /usr/lib/modules/ /lib/modules #run_root pacman -Sy linux -run_root pacman -Sy mkinitcpio +run_root pacman -Sy mkinitcpio --noconfirm #run_root pacman -S linux run_root mkinitcpio -P # Install and configure bootloader. run_root pacman -Sy grub --noconfirm run_root grub-install --target=i386-pc "${NBD_DEVICE}" +#run_root sed -i 's/^GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"/' /etc/default/grub run_root grub-mkconfig -o /boot/grub/grub.cfg - # Install en configure SSH daemon. -run_root pacman -Sy openssh --noconfirm +run_root pacman -Sy openssh netctl --noconfirm # Install haveged due to lack of entropy in ONE environment. -run_root pacman -Sy haveged +run_root pacman -Sy haveged --noconfirm run_root systemctl enable haveged.service +run_root systemctl enable sshd +run_root systemctl enable systemd-networkd +run_root systemctl enable systemd-resolved +run_root systemctl enable systemd-timesyncd + + # Generate fstab file. boot_uuid=$(blkid --match-tag UUID --output value "${NBD_DEVICE}p1")