Use a flag to set efi mode or not. Switch to IDE controller for
disks as UEFI bios doesn't support virtio block devices.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Update grub2 configuration for UEFI booting with fallback to bios mode.
Include new detection scheme so we don't list existing partitions of the
installer.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
With updated kernels, overlayroot programs will fail with
a disconnected_path error. Resolve our use of dhclient by
adding the allow_disconnected flag to the profile.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
We can't use curses_display with an external event loop (tornado). The good
news is that we don't have to. Instead we switch to using agetty to bypass
login, specify the installer and options to execture. This also handles
respawning the installer and works both on serial and without.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Using parted required root privileges since it opened the underlying device.
Instead create our own Disk model and use sysfs interface for extracting
size information.
This also clears the way for providing device data via probert input. This
means we can feed subiquity a probert dump and have it present that to
the installer UI even if we're running on a different system.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Non-virtio nics get persistent names which require a 2 minute timeout
which slows the installer down. Use net.ifnames=0 in grub config to
handle non virtio nics getting persistent names until a fix arrives.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- storage config is now a dict, with "version: 1" and "config: <storage
config>"
- switched curtin branch to use to lp:curtin, because custom storage features
are now available there
- added apt-get update before installing packages
- install all packages at once instead of looping over them
- check for error from apt-get install
- don't try to chroot if copying resolv.conf fails
- Removed package list from installer-user-data, and added a placemarker
instead
- geninstaller inserts the package list INSTALLER_DEPS into
installer-user-data if OFFLINE is set to no, if OFFLINE is set to yes,
geninstaller chroots into rootfs and does apt-get install for everything in
INSTALLER_DEPS
- If geninstaller is run with -o or --offline, then during generate_img,
chroot into target and run apt-get install with all required packges for
subiquity.
- At the moment, cloud-init will still attempt to install packages when it
boots without network, then fail over to the next part of the init, and
eventually will run subiquity.
- While this is functional for an offline installer, it is preferrable to
tell cloud-init not to try to install packages, to avoid extra delays
and to keep errors out of the cloud-init log
- installer/geninstaller: when -b grub2 flag is given, installs grub2 using
grub-install, copies installer/resources/grub/grub.cfg onto target
- installer/resources/grub/grub.cfg: grub configuration that in addition to
having a menuentry for the installer, scans all partitions on the system
other than the one it is running from for linux installations and creates
menuentries for the other installations as well, to deal with potential
situations where the user reboots the system after installing but does not
remove the installation disk
Not clear how else to resolve this, possibly patch to upstream kernel
but unlikely. so let's disable the floppy disk in our VM.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Use updated probert *Info class for accessing object data
- Add --dry-run parameter to prevent invoking curtin when testing
- Add new make target to run ui-view by default with --dry-run
- Use a template to write out curtin config file for installation
- Use virtio disks and multiple nics to test probing.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Update subiquity welcome controller to call probert to extract
host information and present it to the user briefly before
invokin the curtin installer.
Add the install_src to git clone probert. Pack this as a tarball
in the user-data like subiquity.
Update user-data package installs for new probert deps.
Modify boot parameters to handle systemd persistent nic naming;
we may not always have eth0 as a nic. Subsequently update
user-data to use bootcmd to automatically attempt to bring up
nics during the boot before the installer.
Finally fix commandline parsing/output in geninstaller.
Implement version parameter and better caching of previous
maas ephemeral images.
Fix issue with removing cache after unpacking rootfs which is
now owned by root (add sudo to rm of cache).
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Controls whether we launch subiquity over serial or on the tty.
Add installer resource files as dependencies to force image
regen when modified.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Hacky method, but in welcome controller, use subprocess to
call a script which invokes curtin at a known location with
a specific set of parameters.
Modify the installer configuration and start-up scripts to
ensure Subiquity runs on tty1 and keeps the service running.
Upon hitting 'Confirm' Subiquity will exec curtin_wrap.sh
which calls the *real* curtin. Cloud-init user-data has been
modified to unpack the curtin archive embedded.
When complete, the target.img file is bootable.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Tar up the subiquity code and inject that into the user-data
- Add support for encoding when adding binary files
- Until we have a way to detect serial presence, run installer on tty1
- Add power_state hook to shut machine off after subiquity exits
- git status ignore image file in installer dir
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>