I want to install Ubuntu Desktop 16.04.1 LTS completely unattended. Put ISO CD in and walk away.
- Boot parameters incorrect
- Questions still being asked and needing mouse clicks
- Convoluted answers using kickstart/preseed
- Documentation examples no working as stated, specifically from partman and ubunutu
I came across this post here and it was close to what I needed but didn't quite accomplish what I needed since it was for Ubuntu Server. The post suggests using a "non-graphical" Ubuntu install, but I couldn't find a non-graphical install for Ubuntu Desktop, which makes sense. I tried to adapt the steps and get it working for Ubuntu Desktop 16.04.1 LTS.
I have used all the following resources...
Apparently I can't include all of my resources because askubuntu doesn't allow more than 2 links. Well that's not very helpful - so here is just a list:
- Ubuntu install.en.pdf
- Preseed Examples
- Ubiquity Installer Documentation
- Partman Documentation and Examples
- Partition Recipe Explaination of the 3 numbers and their weighting
- A More Complex Preseed Example
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
There were many differences between the post I linked and the Ubuntu Desktop image. Here is my solution:
Mounted Ubuntu ISO so that I can copy the contents to another directory and then edit the pertinent files.
mkdir -p /mnt/iso mount -o loop ubuntu.iso /mnt/iso
I then copied the ISO files to another directory for editing.
mkdir -p /opt/ubuntuiso cp -rT /mnt/iso /opt/ubuntuiso
I edited the
isolinux/isolinux.cfg file and replaced everything inside with the following:
default live-install label live-install menu label ^Install Ubuntu kernel /casper/vmlinuz.efi 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 ---
The append line is very long so for easy reading, here are all the options I used:
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
I found that all these boot parameters were needed to get a completely unattended install. For Ubuntu Server, it may be different.
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
### Partitioning d-i partman-auto/disk string /dev/sda d-i partman-auto/method string regular d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true d-i partman-auto/choose_recipe select atomic # This makes partman automatically partition without confirmation 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/confirm_nooverwrite boolean true # Locale d-i debian-installer/locale string en_US d-i console-setup/ask_detect boolean false d-i console-setup/layoutcode string us # Network d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_domain string unassigned-domain d-i netcfg/choose_interface select auto # Clock d-i clock-setup/utc-auto boolean true d-i clock-setup/utc boolean true d-i time/zone string US/Pacific d-i clock-setup/ntp boolean true # Packages, Mirrors, Image d-i base-installer/kernel/override-image string linux-server d-i base-installer/kernel/override-image string linux-image-amd64 d-i mirror/country string US d-i mirror/http/proxy string d-i apt-setup/restricted boolean true d-i apt-setup/universe boolean true d-i pkgsel/install-language-support boolean false tasksel tasksel/first multiselect ubuntu-desktop # Users d-i passwd/user-fullname string Liason d-i passwd/username string liason d-i passwd/user-password-crypted password [crpyt 3] d-i passwd/root-login boolean true d-i passwd/root-password-crypted password [crypt 3] d-i user-setup/allow-password-weak boolean true # Grub d-i grub-installer/grub2_instead_of_grub_legacy boolean true d-i grub-installer/only_debian boolean true d-i finish-install/reboot_in_progress note # Custom Commands
I didn'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.
I created the new ISO from the the
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
I finally tested it with Virtualbox and it created a completely unattended install.
Should I have to be editing the
In the other post, it seems they are able to edit the
isolinux/txt.cfg file and are able to make that work. I tried for about an hour to use the
isolinux/txt.cfg, but it did not work.
Does anyone have a working more complex partman recipe which directly specifies partitions? Or a working LVM setup? I tried to use a simple LVM setup, but it after reboot it wouldn't boot and would just sit a black screen. Also, not a single one of the preseed examples I listed in the documentation worked either.
Thank you for any help.