We’ve done some work lately to make it a bit easier to transition from Debian Installer to Subiquity. Those of you using preseed files may be interested in the new tool autoinstall-generator, available now as a Snap.
This work is being released with basic functionality in place - we know more things can be done here, and wanted to release and collect feedback.
In particular, it is understood that the preseed format supports things such as partitioning and network handling in more complicated ways than autoinstall-generator supports today.
usage: autoinstall-generator.py [-h] [-c] [-d] [-V] infile [outfile] positional arguments: infile Debian install preseed file, or a dash to read stdin outfile Subiquity autoinstall yaml optional arguments: -h, --help show this help message and exit -c, --cloud output in cloud-config format -d, --debug include commented out debug output explaining the conversions performed -V, --version show version and exit
autoinstall-generator my-preseed.txt my-autoinstall.yaml
This basic usage will convert the preseed file to the autoinstall format.
autoinstall-generator my-preseed.txt my-cloud-config.yaml --cloud
This usage will convert the preseed file to the cloud-config format with the autoinstall data contained within the autoinstall section. Depending on how the data will be loaded to the installer, it may be needed in autoinstall or in cloud-config formats.
autoinstall-generator my-preseed.txt my-autoinstall.yaml --debug
This usage adds debug information to the end of the yaml in the form of comments.
The debug output looks like this:
# 4: Directive: d-i debian-installer/locale string en_US # Mapped to: locale: en_US
This represents a single-line directive that was recognized and mapped to an Autoinstall equivalent. The ‘4’ indicates that the directive was found on line 4 of the input.
# 7: Unsupported: d-i debian-installer/language string en
Other directives are known to be unsupported, and are marked as such.
# 52: Directive: d-i netcfg/get_ipaddress string 192.168.1.42 # 53: And: d-i netcfg/get_netmask string 255.255.255.0 # Mapped to: network: # ethernets: # any: # addresses: # - 192.168.1.42/24 # match: # name: en* # version: 2
Some directives get combined into a single section, such as the two netcfg items above.
# 436: Directive: pkg-a pkg-a/my-q boolean false # 437: And: pkg-b pkg-a/my-other-q boolean true # Mapped to: debconf-selections: | # pkg-a pkg-a/my-q boolean false # pkg-b pkg-a/my-other-q boolean true
It will also pass along directives believed to be out of scope for the installer to the debconf-selections section. Note that the above are just fake examples and not real debconf selections.
An introduction to the autoinstall format can be found at https://ubuntu.com/server/docs/install/autoinstall. See also the quickstart guide and the Autoinstall file format reference.
I look at this as a work in progress so please share your thoughts.
Bugs & Feature requests: feel free to discuss below, or report on launchpad.