This is a basic problem that has perplexed me for a while. On a machine running Ubuntu, is it possible to mount a new disk, run the Ubuntu installer the same as you would from a live CD and install on that new disk? I haven't figured out how to find the installer program(s) or what would prevent me from doing so. It sure would aid in deployment of the rare single machines if I could do a net install from the machine running my local mirror!
How to do an fully automated Ubuntu 20.04 Server install using PXE and the live server image?
Reason
With the 20.04 release, it seems clear Ubuntu is further pushing the live server installer (subiquity) option. The debian-installer (d-i) image has been renamed legacy. So has the netboot installer I typically prefer. The 20.04 release also introduces a new automated installation option for the live server installer.
I want netinstall, but I can't!
Just because I don't have ethernet port at all! And netinstall don't have wifi drivers!
Sounds awesome, right?
I'm seeing a bizarre grey screen appear right after the main installation page shows up in Ubuntu Bionic. I'm installing this on a VM and I duplicated the settings from an exact replica of the machine I'm installing onto that worked fine with no issues. This is coming off of the Ubuntu 18.04.1 LTS NetInstaller "mini.iso". I see a mention about 'klogd' before this happens. Any ideas?
Let me provide as much information as I can about what I'm doing:
I work in a lab development environment managing over 100 server systems. We frequently need to re-image systems with different operating systems and are using CloneZilla to do this quick and easy. CloneZilla is installed to a USB drive and its grub.cfg
file configured to launch different OS installers. One of the operating systems (as you can imagine) is Ubuntu (both 14.04 and 16.04). It's configured to boot Ubuntu's network installer and load a preseed/kickstart file from a local web server:
#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T
#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone --utc America/Los_Angeles
#Root password
rootpw --disabled
#Initial user
user lab --fullname "Lab" --iscrypted --password $1$XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url http://ubuntu.osuosl.org/ubuntu
preseed mirror/http/proxy string "http://proxy.corp.com:123"
#System bootloader configuration
#bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#System authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=dhcp
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
#preseed functions
preseed base-installer/kernel/image string linux-image-generic
preseed base-installer/kernel/override-image string linux-image-generic
preseed clock-setup/ntp-server string pool.ntp.org
preseed partman-auto/choose_recipe select atomic
preseed partman-auto/disk string /dev/sda
preseed partman-auto/method string regular
preseed partman/choose_partition select finish
preseed partman/confirm boolean true
preseed partman/confirm_nooverwrite boolean true
preseed partman/default_filesystem string ext4
preseed partman-lvm/confirm boolean true
preseed partman-lvm/device_remove_lvm boolean true
preseed partman-md/confirm boolean true
preseed partman-md/device_remove_md boolean true
preseed partman-partitioning/choose_label string gpt
preseed partman-partitioning/confirm_write_new_label boolean true
preseed partman-efi/non_efi_system boolean true
preseed pkgsel/update-policy select unattended-upgrades
preseed grub-installer/only_debian boolean true
preseed grub-installer/with_other_os boolean true
preseed netcfg/get_hostname string hostname
preseed netcfg/get_domain string domain
# auto method must be lvm
preseed partman-basicfilesystems/choose_label string gpt
preseed partman-basicfilesystems/default_label string gpt
preseed partman-partitioning/default_label string gpt
preseed partman/choose_label string gpt
preseed partman/default_label string gpt
preseed partman-auto/text/boot-root-all :: \
1 1 1 free \
$gptonly{ } \
$primary{ } \
$bios_boot{ } \
method{ biosgrub } \
. \
512 100 512 vfat \
$gptonly{ } \
$primary{ } \
method{ efi } \
format{ } \
$lvmignore{ } \
mountpoint{ /boot/efi } \
.\
128 512 256 ext2 \
$defaultignore{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext2 } \
mountpoint{ /boot } \
. \
1024 4096 -1 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.
preseed partman-auto/choose_recipe select boot-root-all
# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
preseed partman-partitioning/confirm_write_new_label boolean true
preseed partman/choose_partition select finish
preseed partman-md/confirm boolean true
preseed partman/confirm boolean true
preseed partman/confirm_nooverwrite boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
preseed grub-installer/only_debian boolean true
preseed grub-installer/with_other_os boolean true
preseed grub-installer/bootdev string /dev/sda
#addtional packages
%packages --resolvedeps
openssh-server
libvirt-bin
vim
libpam-systemd
dbus
bash-completion
This is the preseed/kickstart file for Ubuntu 16.04 (with some identifying information stripped out).
The network installer successfully boots and begins the automated install process. However, instead of installing to the local hard drive or SSD, it installs to the USB installation drive and overwrites the CloneZilla image.
Other operating systems are installed fine through CloneZilla using their own local or network installers. It seems to just be Ubuntu having the problem.
Our current workaround is to immediately pull the USB drive out of the system once you can see the network installer boot and begin initializing. The network installer has already been loaded into RAM so it keeps going and only detects the local drive. You have to be quick because the network installer initializes quickly from RAM and if you're too late the USB drive is usually already corrupted.
I searched the partman
documentation in hopes of finding a configuration option to tell the installer to ignore the source media device but I guess since it's a network install there is no way to do that?
Does anyone know of a preseed/kickstart configuration option that would solve this issue?