diff --git a/files/cloudinit-specific/07_network.cfg b/files/cloudinit-specific/07_network.cfg deleted file mode 100644 index aaee732..0000000 --- a/files/cloudinit-specific/07_network.cfg +++ /dev/null @@ -1,9 +0,0 @@ -system_info: - network: - version: 2 - dhcp_client_priority: [dhcpcd, dhclient, udhcpc] - renderers: ['netplan', 'eni', 'sysconfig'] - activators: ['netplan', 'eni', 'network-manager', 'networkd'] -# ethernets: -# ens: -# dhcp4: true \ No newline at end of file diff --git a/scripts/linux/boot.sh b/scripts/linux/boot.sh index c939f9a..b958562 100644 --- a/scripts/linux/boot.sh +++ b/scripts/linux/boot.sh @@ -4,8 +4,5 @@ set -e if [[ "$1" == "ubuntu20"* ]] || [[ "$1" == "ubuntu22"* ]] || [[ "$1" == "ubuntu24"* ]]; then # Fix for network interfaces not picked up sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="acpi_irq_isa=10 net.ifnames=0"/g' /mnt/etc/default/grub - if [[ "$1" == "ubuntu24"* ]]; then - chroot /mnt/ mkdir -p /boot/grub - fi chroot /mnt/ update-grub fi diff --git a/scripts/linux/cloud-init.sh b/scripts/linux/cloud-init.sh index 2d0f209..29e4cac 100644 --- a/scripts/linux/cloud-init.sh +++ b/scripts/linux/cloud-init.sh @@ -7,8 +7,3 @@ if [[ "$1" == "ubuntu2204" ]] || [[ "$1" == "ubuntu2404" ]] || [[ "$1" == "rocky #Add FNI Hotplug support cp /tmp/cloudinit-specific/06_hotplug.cfg /mnt/etc/cloud/cloud.cfg.d/ fi - -if [[ "$1" == "ubuntu2404" ]]; then - #Add cloud-init 24.1.3 network support - cp /tmp/cloudinit-specific/07_network.cfg /mnt/etc/cloud/cloud.cfg.d/ -fi \ No newline at end of file diff --git a/scripts/linux/mount.sh b/scripts/linux/mount.sh index e559a78..a0713b1 100644 --- a/scripts/linux/mount.sh +++ b/scripts/linux/mount.sh @@ -24,4 +24,11 @@ if [[ "$1" == "debian"* ]]; then efi_partition=$(fdisk -lo device,type /dev/sda | grep -E '^\/dev\/' | tr -s ' ' | grep -E 'EFI' | head -n1 | cut -d ' ' -f1) mkdir -p /mnt/boot/efi mount $efi_partition /mnt/boot/efi +fi + +if [[ "$1" == "ubuntu24"* ]]; then + # Get Extended Linux partition for boot/grub + ext_partition=$(fdisk -lo device,type /dev/sda | grep -E '^\/dev\/' | tr -s ' ' | grep -E 'extended' | head -n1 | cut -d ' ' -f1) + mkdir -p /mnt/boot + mount $ext_partition /mnt/boot fi \ No newline at end of file