So I would like to generate an unattended installation of Ubuntu from a USB, but I seem to get stuck in my boot\grub\grub.cfg file, I think line
linux /casper/vmlinuz file=usb:/ubuntu.seed
preseed/file=usb:/ubuntu.seed auto=true priority=critical
DEBIAN_FRONTEND=noninteractive ---
should work however, I am obviously wrong as it doesn't become unattended.
.
set timeout=10
loadfont unicode
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if [ -f /ubuntu.seed ]; then
set timeout=10
menuentry "Try or Install Ubuntu Server with Preseed" {
set gfxpayload=keep
echo "Ubuntu installation with the preseed file found."
echo "Starting installation in 10 seconds."
sleep 10
linux /casper/vmlinuz file=usb:/ubuntu.seed preseed/file=usb:/ubuntu.seed auto=true priority=critical DEBIAN_FRONTEND=noninteractive ---
initrd /casper/initrd
}
else
set timeout=0
menuentry "Ubuntu Server Preseed Not Found" {
echo "Error: ubuntu.seed file not found."
echo "Exiting..."
sleep 5
exit 1
}
fi
grub_platform
if [ "$grub_platform" = "efi" ]; then
menuentry 'Boot from next volume' {
exit 1
}
menuentry 'UEFI Firmware Settings' {
fwsetup
}
else
menuentry 'Test memory' {
linux16 /boot/memtest86+.bin
}
fi
this is my ubuntu.seed file that I use as "answer file" for my installation.
#!/bin/bash
# Preseed file for unattended Ubuntu Server installation
# Keyboard layout
d-i console-setup/modelcode string pc105
d-i keyboard-configuration/modelcode string pc105
d-i keyboard-configuration/layoutcode string ch
d-i keyboard-configuration/variantcode string de
d-i keyboard-configuration/xkb-keymap select ch
# Language
d-i debian-installer/language string en
d-i debian-installer/language-support select en
d-i language-chooser/language-name string English
d-i language-chooser/language-name-fb string English
d-i language-chooser/language select en
d-i language-chooser/language-fb select en
# Network settings
d-i netcfg/get_nameservers string 8.8.8.8
d-i netcfg/get_ipaddress string 192.168.1.100
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string 192.168.1.1
d-i netcfg/confirm_static boolean true
# Hostname
d-i netcfg/get_hostname string ubuntu-server-1
# Partitioning
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/choose_recipe select atomic
d-i partman/default_filesystem string ext4
# Users and passwords
# the user and password are used to test the script
d-i passwd/root-password password MyPa$$w0rtIsN0tThis
d-i passwd/root-password-again password MMyPa$$w0rtIsN0tThis
d-i passwd/user-fullname string Admin
d-i passwd/username string admin
d-i passwd/user-password password admin
d-i passwd/user-password-again password admin
d-i user-setup/allow-password-weak boolean true
# Package selection
d-i pkgsel/include string openssh-server
d-i pkgsel/include string ubuntu-desktop
# OpenStack Package selection
d-i pkgsel/include string openssh-server
d-i pkgsel/include string ubuntu-cloud-keyring
d-i pkgsel/include string python3-pip
d-i pkgsel/include string python3-openstackclient
d-i pkgsel/include string python3-memcache
d-i pkgsel/include string rabbitmq-server
d-i pkgsel/include string mariadb-server
d-i pkgsel/include string qemu-kvm
d-i pkgsel/include string libvirt-bin
d-i pkgsel/include string bridge-utils
# GRUB
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean false
# Finish installation
d-i finish-install/reboot_in_progress note
When it boots, it shows it finds the seed file, waits 10 seconds... does stuff, and then I see the language selection prompt waiting for me to confirm English as an installation language.
I can't google where I am going wrong, hope some one here spots my error