<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2FUbuntu%2FAutomated_Installation</id>
	<title>Linux/Ubuntu/Automated Installation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2FUbuntu%2FAutomated_Installation"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/Ubuntu/Automated_Installation&amp;action=history"/>
	<updated>2026-05-07T04:25:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/Ubuntu/Automated_Installation&amp;diff=5722&amp;oldid=prev</id>
		<title>Kenneth: /* Get Preseed */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/Ubuntu/Automated_Installation&amp;diff=5722&amp;oldid=prev"/>
		<updated>2020-10-16T00:53:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Get Preseed&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Get Preseed ==&lt;br /&gt;
&lt;br /&gt;
Install debconf:&lt;br /&gt;
 apt install debconf-utils&lt;br /&gt;
&lt;br /&gt;
find out all of the current preseed settings from your current install, you would run:&lt;br /&gt;
 debconf-get-selections --installer &amp;gt; install-options.cfg&lt;br /&gt;
&lt;br /&gt;
To dump the entire debconf database containing these values:&lt;br /&gt;
 debconf-get-selections &amp;gt; alloptions.cfg&lt;br /&gt;
&lt;br /&gt;
debconf pulls these options from:&lt;br /&gt;
 /var/log/installer/cdebconf/questions.dat&lt;br /&gt;
&lt;br /&gt;
Ref:&lt;br /&gt;
* Performing an automated Ubuntu install using preseeding - https://searchitchannel.techtarget.com/feature/Performing-an-automated-Ubuntu-install-using-preseeding&lt;br /&gt;
* B.3. Creating a preconfiguration file - https://help.ubuntu.com/lts/installation-guide/armhf/apbs03.html&lt;br /&gt;
* How to create ubuntu installation preseed file - Ask Ubuntu - https://askubuntu.com/questions/595826/how-to-create-ubuntu-installation-preseed-file&lt;br /&gt;
* preseed - How do I create a completely unattended install of Ubuntu Desktop 16.04.1 LTS? - Ask Ubuntu - https://askubuntu.com/questions/806820/how-do-i-create-a-completely-unattended-install-of-ubuntu-desktop-16-04-1-lts&lt;br /&gt;
* Building a Fully Automated Ubuntu Installation Process - Scott&amp;#039;s Weblog - The weblog of an IT pro focusing on cloud computing, Kubernetes, Linux, containers, and networking - https://blog.scottlowe.org/2015/05/20/fully-automated-ubuntu-install/&lt;br /&gt;
** This one uses PXE&lt;br /&gt;
&lt;br /&gt;
== Make Fully ==&lt;br /&gt;
&lt;br /&gt;
src: https://askubuntu.com/questions/806820/how-do-i-create-a-completely-unattended-install-of-ubuntu-desktop-16-04-1-lts&lt;br /&gt;
&lt;br /&gt;
Current Solution&lt;br /&gt;
I have currently created an unattended install, but am not sure if it is correct - meaning that I should have edited the isolinux/isolinux.cfg&lt;br /&gt;
&lt;br /&gt;
There were many differences between the post I linked and the Ubuntu Desktop image. Here is my solution:&lt;br /&gt;
&lt;br /&gt;
Step 1&lt;br /&gt;
&lt;br /&gt;
Mounted Ubuntu ISO so that I can copy the contents to another directory and then edit the pertinent files.&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /mnt/iso&lt;br /&gt;
 mount -o loop ubuntu.iso /mnt/iso&lt;br /&gt;
&lt;br /&gt;
Step 2&lt;br /&gt;
&lt;br /&gt;
I then copied the ISO files to another directory for editing.&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /opt/ubuntuiso&lt;br /&gt;
 cp -rT /mnt/iso /opt/ubuntuiso&lt;br /&gt;
&lt;br /&gt;
Step 3&lt;br /&gt;
&lt;br /&gt;
I edited the isolinux/isolinux.cfg file and replaced everything inside with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
default live-install&lt;br /&gt;
label live-install&lt;br /&gt;
  menu label ^Install Ubuntu&lt;br /&gt;
  kernel /casper/vmlinuz.efi&lt;br /&gt;
  append  file=/cdrom/ks.preseed auto=true priority=critical debian-installer/locale=en_US keyboard-configuration/layoutcode=us ubiquity/reboot=true languagechooser/language-name=English countrychooser/shortlist=US localechooser/supported-locales=en_US.UTF-8 boot=casper automatic-ubiquity initrd=/casper/initrd.lz quiet splash noprompt noshell ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The append line is very long so for easy reading, here are all the options I used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
file=/cdrom/ks.preseed &lt;br /&gt;
auto=true &lt;br /&gt;
priority=critical &lt;br /&gt;
debian-installer/locale=en_US &lt;br /&gt;
keyboard-configuration/layoutcode=us &lt;br /&gt;
ubiquity/reboot=true &lt;br /&gt;
languagechooser/language-name=English &lt;br /&gt;
countrychooser/shortlist=US &lt;br /&gt;
localechooser/supported-locales=en_US.UTF-8 &lt;br /&gt;
boot=casper &lt;br /&gt;
automatic-ubiquity &lt;br /&gt;
initrd=/casper/initrd.lz &lt;br /&gt;
quiet &lt;br /&gt;
splash &lt;br /&gt;
noprompt &lt;br /&gt;
noshell&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I found that all these boot parameters were needed to get a completely unattended install. For Ubuntu Server, it may be different.&lt;br /&gt;
&lt;br /&gt;
Step 4&lt;br /&gt;
&lt;br /&gt;
I tried using and creating many preseed files, but I found the more complex, the more chance for errors. This is currently my simple preseed file that works with the above isolinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### Partitioning&lt;br /&gt;
d-i partman-auto/disk string /dev/sda&lt;br /&gt;
d-i partman-auto/method string regular&lt;br /&gt;
d-i partman-lvm/device_remove_lvm boolean true&lt;br /&gt;
d-i partman-md/device_remove_md boolean true&lt;br /&gt;
d-i partman-auto/choose_recipe select atomic&lt;br /&gt;
&lt;br /&gt;
# This makes partman automatically partition without confirmation&lt;br /&gt;
d-i partman-partitioning/confirm_write_new_label boolean true&lt;br /&gt;
d-i partman/choose_partition select finish&lt;br /&gt;
d-i partman/confirm boolean true&lt;br /&gt;
d-i partman/confirm_nooverwrite boolean true&lt;br /&gt;
&lt;br /&gt;
# Locale&lt;br /&gt;
d-i debian-installer/locale string en_US&lt;br /&gt;
d-i console-setup/ask_detect boolean false&lt;br /&gt;
d-i console-setup/layoutcode string us&lt;br /&gt;
&lt;br /&gt;
# Network&lt;br /&gt;
d-i netcfg/get_hostname string unassigned-hostname&lt;br /&gt;
d-i netcfg/get_domain string unassigned-domain&lt;br /&gt;
d-i netcfg/choose_interface select auto&lt;br /&gt;
&lt;br /&gt;
# Clock&lt;br /&gt;
d-i clock-setup/utc-auto boolean true&lt;br /&gt;
d-i clock-setup/utc boolean true&lt;br /&gt;
d-i time/zone string US/Pacific&lt;br /&gt;
d-i clock-setup/ntp boolean true&lt;br /&gt;
&lt;br /&gt;
# Packages, Mirrors, Image&lt;br /&gt;
d-i base-installer/kernel/override-image string linux-server&lt;br /&gt;
d-i base-installer/kernel/override-image string linux-image-amd64&lt;br /&gt;
d-i mirror/country string US&lt;br /&gt;
d-i mirror/http/proxy string&lt;br /&gt;
d-i apt-setup/restricted boolean true&lt;br /&gt;
d-i apt-setup/universe boolean true&lt;br /&gt;
d-i pkgsel/install-language-support boolean false&lt;br /&gt;
tasksel tasksel/first multiselect ubuntu-desktop&lt;br /&gt;
&lt;br /&gt;
# Users&lt;br /&gt;
d-i passwd/user-fullname string Liason&lt;br /&gt;
d-i passwd/username string liason&lt;br /&gt;
d-i passwd/user-password-crypted password [crpyt 3]&lt;br /&gt;
d-i passwd/root-login boolean true&lt;br /&gt;
d-i passwd/root-password-crypted password [crypt 3]&lt;br /&gt;
d-i user-setup/allow-password-weak boolean true&lt;br /&gt;
&lt;br /&gt;
# Grub&lt;br /&gt;
d-i grub-installer/grub2_instead_of_grub_legacy boolean true&lt;br /&gt;
d-i grub-installer/only_debian boolean true&lt;br /&gt;
d-i finish-install/reboot_in_progress note&lt;br /&gt;
&lt;br /&gt;
# Custom Commands&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I didn&amp;#039;t include my encrypted passwords so if you try this preseed file, please change them to an encrypted password. Here is 3 ways to make the password.&lt;br /&gt;
&lt;br /&gt;
Step 5&lt;br /&gt;
&lt;br /&gt;
I created the new ISO from the the /opt/ubuntuiso/ directory.&lt;br /&gt;
&lt;br /&gt;
 mkisofs -D -r -V ATTENDLESS_UBUNTU -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /opt/autoinstall.iso /opt/ubuntuiso&lt;br /&gt;
&lt;br /&gt;
Step 6&lt;br /&gt;
&lt;br /&gt;
I finally tested it with Virtualbox and it created a completely unattended install.&lt;br /&gt;
&lt;br /&gt;
== Script on Ubuntu 18 ==&lt;br /&gt;
&lt;br /&gt;
https://stackoverflow.com/questions/42145522/debconf-get-selections-installer-output-empty&lt;br /&gt;
&lt;br /&gt;
mail script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cat mail&lt;br /&gt;
set -x&lt;br /&gt;
# x=mail; cd /var/tmp; wget http://gw/ks/post/ub/$x -O $x; sh ./$x&lt;br /&gt;
#&lt;br /&gt;
# ref: http://blog.delgurth.com/2009/01/19/pre-loading-debconf-values-for-easy-installation/&lt;br /&gt;
&lt;br /&gt;
d=`grep search /etc/resolv.conf | sed &amp;#039;s/search //&amp;#039;`&lt;br /&gt;
hostname=`hostname`&lt;br /&gt;
fqdn=$hostname.$d&lt;br /&gt;
&lt;br /&gt;
cat&amp;lt;&amp;lt;EOF | debconf-set-selections&lt;br /&gt;
postfix postfix/main_mailer_type        select  Internet with smarthost&lt;br /&gt;
postfix postfix/recipient_delim string  +&lt;br /&gt;
postfix postfix/mailname        string  $fqdn&lt;br /&gt;
postfix postfix/chattr  boolean false&lt;br /&gt;
postfix postfix/destinations    string  $fqdn, \$myhostname, $hostname, localhost.localdomain, localhost&lt;br /&gt;
postfix postfix/relayhost       string  mailhost.foobar.com&lt;br /&gt;
postfix postfix/procmail        boolean true&lt;br /&gt;
postfix postfix/compat_conversion_warning       boolean true&lt;br /&gt;
postfix postfix/mynetworks      string  127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128&lt;br /&gt;
postfix postfix/mailbox_limit   string  0&lt;br /&gt;
postfix postfix/rfc1035_violation       boolean false&lt;br /&gt;
postfix postfix/protocols       select  all&lt;br /&gt;
postfix postfix/main_cf_conversion_warning      boolean true&lt;br /&gt;
postfix postfix/root_address    string&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
debconf-get-selections | grep postfix&lt;br /&gt;
&lt;br /&gt;
apt-get -qq -y install postfix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the %post section of the kickstart with that mail script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%post --interpreter=/bin/bash&lt;br /&gt;
&lt;br /&gt;
exec &amp;gt; /root/post.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
set -x&lt;br /&gt;
scripts=&amp;quot;&lt;br /&gt;
autofs&lt;br /&gt;
rootssh&lt;br /&gt;
users&lt;br /&gt;
sudo&lt;br /&gt;
mail&lt;br /&gt;
&amp;quot;&lt;br /&gt;
for x in $scripts; do&lt;br /&gt;
wget http://gw/ks/post/ub/$x -O $x; sh ./$x&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 16.04.6 Preseed ==&lt;br /&gt;
&lt;br /&gt;
See [[Linux/Ubuntu/Automated Installation/Ubuntu 16.04.6]]&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 18.04.1 Preseed ==&lt;br /&gt;
&lt;br /&gt;
See [[Linux/Ubuntu/Automated Installation/Ubuntu 18.04.1]]&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 18.04.2 Preseed ==&lt;br /&gt;
&lt;br /&gt;
See [[Linux/Ubuntu/Automated Installation/Ubuntu 18.04.2]]&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 18.10 Preseed ==&lt;br /&gt;
&lt;br /&gt;
See [[Linux/Ubuntu/Automated Installation/Ubuntu 18.10]]&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>