Subshell cd to source dir was silently failing. Instead use
tar -C and add an additional check on that we did generate
a subiquity tarball for the installer image.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Make offline mode default. We always want to
install the packages required to run the installer in the
image we generate.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
We want geninstaller to acquire the subiquity source from either
the in-tree directories, or if running installed from a deb, the
path where it was installed.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
After renaming bin/subiquity to bin/subiquity-tui we broke a
few things that invoked subiquity via bin/subiquity which is
now bin/subiquity-tui
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
geninstaller, which is installed as /usr/bin/subiquity-geninstaller
needed some changes to allow it to run outside of the build tree.
Quieted the output from geninstaller a lot and redirect the verbosity
into the log file.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Instead of tracking many directories, we'll use only one
overlay directory to hold any scripts or change we want to
see applied over the base image.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
overlayfs changed mount options between different kernel versions.
In some cases, an Ubuntu release may have a different kernel than
what was included during the release, so instead use the version
included in the module itself to determine what parameters to pass
when mounting.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Fix up issues with efi mode grub serial configuration
- Modify blockdev model to order storage configuration output
- Handle when we're running in uefi mode
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
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>