unattended Bionic server install - set language

I am trying to automate the installation of Ubuntu Server 18.04 Bionic using a custom ISO. No existing solutions I can find seem to work. All I want to accomplish at this point is to automatically select the language. At least then I can verify I'm not going down another dead-end.

For the ISO, I've started with ubuntu-18.04-live-server-amd64.iso, and I've updated the ISO to have the following files:

preseed.cfg

d-i debian-installer/locale string en_US
d-i debian-installer/language string en

ks.cfg

auth
bootloader
keyboard us
lang en_US
langsupport en_US
mouse
part / --onpart=sda1 --grow
rootpw --disabled
timezone --utc

isolinux/lang

en

isolinux/langlist

en

isolinux/txt.cfg

default live
label live
  menu label ^Install Ubuntu Server
  kernel /casper/vmlinuz
  append boot=casper initrd=/casper/initrd.gz auto file=/cdrom/preseed.cfg locale=en_US languagechooser/language-name=English localechooser/supported-locales=en_US.UTF-8 countrychooser/shortlist=US priority=critical ks=cdrom:/ks.cfg ---

isolinux/isolinux.cfg

path 
include menu.cfg
prompt 0
timeout 1

I've verified the "live" block is being started by renaming it and seeing that the system will not even boot then.

I've tried numerous combinations of different approaches. This is the simplest test case I can come up with that does nothing but attempt to set the language in every documented way I can find.


Solution 1:

As far as I know, preseed system only work with Debian Installer used by alternate ISO. It will definitely not working with live ISO.

Solution 2:

As @olivierb2 states, only the non-Live DVD will allow you to automate.

In your isolinux/txt.cfg

  • Live DVD has the kernel @ /casper/vmlinuz
  • The non-Live has the kernel @ /install/vmlinuz

From your code above, it looks like you are using the Live DVD..

Download from here http://cdimage.ubuntu.com/releases/18.04/release/ (as long as it matches your CPU and does not contain the word 'Live' in the file name).