Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am preparing my preseed file for the unattended installation of Ubuntu using a CD iso image. This is the following file:

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

# Keyboard selection
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us

### Network configuration for CDROM or USB stick only
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/wireless_wep string

### Clock and time zone setup
d-i clock-setup/utc boolean true
d-i time/zone string US/Eastern

### Partitioning
d-i partman-auto/method string lvm
d-i partman-lvm/confirm boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-auto/choose_recipe select atomic
d-i partman/confirm_write_new_label boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/choose_partition select finish
d-i partman/confirm 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

### Account setup
d-i passwd/user-fullname string Ubuntu User
d-i passwd/username string ubuntu
d-i passwd/user-password-crypted password $1$1AniiGAw$ZsUcBK840ZrkmoVIvTneP1
d-i user-setup/encrypt-home boolean false

### Apt setup
d-i apt-setup/use_mirror boolean false

### Package selection
tasksel tasksel/first multiselect ubuntu-desktop
d-i pkgsel/updatedb boolean false

### Boot loader installation
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true

### Finishing up the installation
d-i finish-install/reboot_in_progress note

### X configuration
xserver-xorg xserver-xorg/autodetect_monitor boolean true
xserver-xorg xserver-xorg/config/monitor/selection-method \
       select medium
xserver-xorg xserver-xorg/config/monitor/mode-list \
       select 1024x768 @ 60 Hz


Thanks in advance

share|improve this question

You could use the preseed/late_command command, put the following snippet at the end of your existing pressed file:

d-i preseed/late_command in-target apt-get update; \
                         in-target apt-get install -y --force-yes package_A; \
                         in-target apt-get install -y --force-yes package_B; \

Visit this link for further details about this command.

share|improve this answer
I put this part at the end of my preseed file to install the package zsh: "d-i preseed/late_command string in-target apt-get install -y --force-yes zsh" but it doesn't seem to work, I didnt find the zsh package after the installation by running this command in terminal : "dpkg -l | grep zsh" – Tanios191 Apr 14 '14 at 22:42
Any suggestions? – Tanios191 Apr 15 '14 at 12:24
Try without the string option as all commands are not supposed to be interpreted. I've updated my answer accordingly – Sylvain Pineau Apr 15 '14 at 12:40
It is still not working giving me an error when system and software part is being installed – Tanios191 Apr 15 '14 at 22:17
Any new suggestions? – Tanios191 Apr 21 '14 at 15:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.