1

I'm trying to set up a method for installing Ubuntu on some boxes. The boxes are x86 machines that boot off of internal MMC storage. I'd like the method to be as automated as possible, as we might have a large number of boxes to install it on; my primary goal is to make it so that the machines are each in a consistent state after installation. I found this question, but neither of the answers solve this issue.

I'm using a preseed file to automate the installation steps; the installation seems to work through the partitioning step, but it fails with a frustratingly vague error message. Here are the lines in /var/log/syslog that I believe are relevant:

Aug 25 17:46:07 base-installer: apt-install or in-target is already running, so you cannot run either of
Aug 25 17:46:07 base-installer: them again until the other instance finishes. You may be able to use
Aug 25 17:46:07 base-installer: 'chroot /target ...' instead.
Aug 25 17:46:07 in-target: Unexpected error; command not executed: 'sh -c debconf-apt-progress --no-progress --logstderr --     apt-get -q -y --no-remove install busybox-initramfs'
Aug 25 17:46:07 base-installer: error: exiting on error base-installer/kernel/failed-package-install

Here is the preseed file I'm using:

# no splash and be verbose
d-i debian-installer/splash boolean false
d-i debian-installer/quiet  boolean false

# installer locale
d-i debian-installer/locale string en_US

# keyboard
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select us

# network
d-i hw-detect/load_firmware boolean true
d-i netcfg/choose_interface select enp1s0
d-i netcfg/disable_autoconfig boolean true
d-i netcfg/disable_dhcp boolean true
d-i netcfg/confirm_static boolean true
d-i netcfg/get_ipaddress string my-lan-ip
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string my-lan-gateway
d-i netcfg/get_nameservers string my-nameserver
d-i netcfg/get_hostname string my-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/hostname string my-hostname

# software mirror
d-i mirror/protocol string http
d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string my-http-proxy
d-i mirror/suite string xenial

# accounts
d-i passwd/root-login boolean false
d-i passwd/username string myuser
d-i passwd/user-fullname string Some Full Name
d-i passwd/user-password-crypted password my-encrypted-password
d-i user-setup/encrypt-home boolean false

# clock
d-i clock-setup/utc boolean true
d-i time/zone string US/Eastern
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string my-ntp-server

# partitioning
d-i partman-auto/disk string /dev/mmcblk0
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select multi
d-i partman/default_filesystem string ext4
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/mount_style select uuid

# installation
d-i live-installer/net-image string /install/filesystem.squashfs
d-i base-installer/kernel/image string linux-image-generic

# apt
d-i apt-setup/restricted boolean true
d-i apt-setup/universe boolean true
d-i apt-setup/backports boolean true

# package selection
tasksel tasksel/first multiselect standard
d-i pkgsel/include string a few packages
d-i pkgsel/upgrade select safe-upgrade
d-i pkgsel/language-packs multiselect en
d-i pkgsel/update-policy select unattended-upgrades
popularity-contest popularity-contest/participate boolean false
d-i pkgsel/updatedb boolean true

# bootloader
d-i grub-installer/only_debian boolean true
d-i grub-installer/bootdev  string /dev/mmcblk0

# finishing
d-i debian-installer/exit/poweroff boolean true
d-i finish-install/reboot_in_progress note

I am using the preseed file on a USB drive that has the Ubuntu Server 16.04.3 image written to it, with the file isolinux/txt.cfg modified to use my preseed file. Installation is successful when I do a normal installation, so I believe that it is an issue with the preseed file.

Note that the boxes do not have internet access; they must use a HTTP proxy for apt. I have confirmed that the HTTP proxy is working correctly, and it is specified correctly in the preseed file.

I have tried re-writing the ISO image, which still results in the same error.

Is there an issue with my preseed file that is causing installation to fail?

1 Answer 1

1

It turns out that there was another interesting error in syslog that I had missed:

Aug 25 21:03:12 live-installer: /usr/bin/ckbcomp: Can not find file "symbols/en" in any known directory
Aug 25 21:03:12 base-installer: warning: /usr/lib/post-base-installer.d/25live-installer-console-setup returned error code 1

This is what my modified txt.cfg looked like:

default my-installation
LABEL my-installation
  menu label ^my custom installation
  kernel /install/vmlinuz
  append  file=/cdrom/preseed/my-installation.seed debian-installer/locale=en_US locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=en console-setup/layoutcode=en netcfg/choose_interface=enp1s0 initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/ram rw quiet

I had gotten the "layoutcode=en" directives (which are meant to skip the keyboard prompts) from this answer, but it turns out that it should be 'us', not 'en'. Changing this causes the ckbcomp command to succeed, which results in a successful system installation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .