Preparing the preseed for unattended installation sometimes could be challenging. This article presents the right way to analyze an installation failure in one of the main steps – “select and install software”.
There is a ubuntu installation preseed file for our Bionic unattended installation, which uses the “pkgsel” to install first packages in the new system:
d-i pkgsel/include string openssh-server wget vim git python gpg ntp d-i pkgsel/upgrade select full-upgrade d-i pkgsel/update-policy select unattended-upgrades
When an installation step in the preseed of a unattended installation fails the setup stops with a “Continue” confirmation.
Here is what you can do to check what exactly fails in step “select and install software”:
- Start a shell in the current installation boot. Press “Ctrl+Alt+F2” to start the shell. You may use “Ctrl+Alt+F3” and “Ctrl+Alt+F4” for two more consoles and “Ctrl+Alt+F1” to return to the installation wizard.
- Check the /var/log/syslog, in which file the debconf writes the logging information.
- Find the lines where the step “select and install software” starts and look for errors after that. In this file, you can see all the step titles during, which the setup passes and they are named the same way the windows’ titles during the installation wizard.
Here is the real world output
Presing the “CTRL+ALT+F2” to start the BusyBox built-in shell, which is ash not bash!
Be careful there are some difference between ash and bash.
Last 20 lines shows the problem – pkgsel failed to install packages in step “select and install software”.
The installation wizard stops.
The problem is in the package “ntp”, the setup cannot install the “ntp” package because of unmet dependencies.
Because it is not so important to install ntp at this stage we added the package to the script executed in “preseed/late_command” and removed the package from the pkgsel line in the preseed file. In general, our problem was because we set local repositories for the bionic packages, but the setup cannot update list of available packages when the you set Bionic mirror to be unofficial local repository.
One thought on “Debug Ubuntu preseed failure – select and install software”
It helped! Thank you.