diff --git a/ubuntu2004/box-config.json b/ubuntu2004/box-config.json index c8fcd3c..a6077e7 100755 --- a/ubuntu2004/box-config.json +++ b/ubuntu2004/box-config.json @@ -28,45 +28,26 @@ { "type": "virtualbox-iso", "boot_command": [ - "", - "", - "", - "/install/vmlinuz", - " auto=true", - " url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", - " locale=en_US", - " console-setup/ask_detect=false", - " console-setup/layoutcode=us", - " console-setup/modelcode=pc105", - " debconf/frontend=noninteractive", - " debian-installer=en_US", - " fb=false", - " initrd=/install/initrd.gz", - " kbd-chooser/method=us", - " keyboard-configuration/layout=USA", - " keyboard-configuration/variant=USA", - " netcfg/get_domain=vm", - " netcfg/get_hostname=vagrant", - " grub-installer/bootdev=/dev/sda", - " noapic", - " -- ", - "" + " ", + "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/", + "" ], - "boot_wait": "10s", + "boot_wait": "5s", "disk_size": 81920, "guest_os_type": "Ubuntu_64", "headless": false, "http_directory": "http", "iso_urls": [ - "iso/focal-legacy-server-amd64.iso", - "http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04-legacy-server-amd64.iso" + "iso/ubuntu-20.04-live-server-amd64.iso", + "https://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso" ], "iso_checksum_type": "sha256", - "iso_checksum": "36f15879bd9dfd061cd588620a164a82972663fdd148cce1f70d57d314c21b73", + "iso_checksum": "caf3fd69c77c439f162e2ba6040e9c320c4ff0d69aad1340a514319a9264df9f", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_port": 22, - "ssh_wait_timeout": "1800s", + "ssh_wait_timeout": "25m", + "ssh_handshake_attempts": "20", "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "virtualbox_version_file": ".vbox_version", diff --git a/ubuntu2004/http/meta-data b/ubuntu2004/http/meta-data new file mode 100755 index 0000000..e69de29 diff --git a/ubuntu2004/http/preseed.cfg b/ubuntu2004/http/preseed.cfg deleted file mode 100644 index 1417746..0000000 --- a/ubuntu2004/http/preseed.cfg +++ /dev/null @@ -1,40 +0,0 @@ -choose-mirror-bin mirror/http/proxy string -d-i base-installer/kernel/override-image string linux-server -d-i clock-setup/utc boolean true -d-i clock-setup/utc-auto boolean true -d-i finish-install/reboot_in_progress note -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean true -d-i partman-auto/disk string /dev/sda -d-i partman-auto-lvm/guided_size string max -d-i partman-auto/choose_recipe select atomic -d-i partman-auto/method string lvm -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/confirm_write_new_label boolean true -d-i pkgsel/include string openssh-server cryptsetup build-essential libssl-dev libreadline-dev zlib1g-dev linux-source dkms nfs-common -d-i pkgsel/install-language-support boolean false -d-i pkgsel/update-policy select none -d-i pkgsel/upgrade select full-upgrade -d-i time/zone string UTC -tasksel tasksel/first multiselect standard, ubuntu-server - -d-i console-setup/ask_detect boolean false -d-i keyboard-configuration/layoutcode string us -d-i keyboard-configuration/modelcode string pc105 -d-i debian-installer/locale string en_US.UTF-8 - -# Create vagrant user account. -d-i passwd/user-fullname string vagrant -d-i passwd/username string vagrant -d-i passwd/user-password password vagrant -d-i passwd/user-password-again password vagrant -d-i user-setup/allow-password-weak boolean true -d-i user-setup/encrypt-home boolean false -d-i passwd/user-default-groups vagrant sudo -d-i passwd/user-uid string 900 diff --git a/ubuntu2004/http/user-data b/ubuntu2004/http/user-data new file mode 100755 index 0000000..e930dad --- /dev/null +++ b/ubuntu2004/http/user-data @@ -0,0 +1,49 @@ +#cloud-config +autoinstall: + version: 1 + apt: + geoip: true + preserve_sources_list: true +# primary: +# - arches: [amd64, i386] +# uri: http://de.archive.ubuntu.com/ubuntu +# - arches: [default] +# uri: http://ports.ubuntu.com/ubuntu-ports + packages: + - ubuntu-standard + - ubuntu-server + - cryptsetup + - build-essential + - libssl-dev + - libreadline-dev + - zlib1g-dev + - linux-source + - dkms + - nfs-common + - software-properties-common + identity: + hostname: vagrant + password: $6$H6dENrige2G2YwQQ$ip2nRmBQDm5OXtQ.xpxOoq.f32XOuNkHm6KgMiPH7LFcYhbWnEiVS8bGD3UGRDRstnL4nn/0Av8rtaXfPjGMz1 + realname: vagrant + username: vagrant + keyboard: + layout: us + variant: '' + locale: en_US + network: + network: + ethernets: + enp0s3: + dhcp4: true + dhcp-identifier: mac + version: 2 + ssh: + allow-pw: true + authorized-keys: [] + install-server: true + storage: + layout: + name: lvm + late-commands: + - 'sed -i "s/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/" /target/etc/dhcp/dhclient.conf' + - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' \ No newline at end of file