Commit Graph

88 Commits

Author SHA1 Message Date
Michael Hudson-Doyle d88ff7bf9a add flag to geninstaller to install local subiquity 2017-01-11 14:53:53 +13:00
Michael Hudson-Doyle 7b65d54624 fix installer/README.md now that geninstaller actually completes 2017-01-06 09:42:56 +13:00
Steve Langasek 7944fd97d9 forcibly kill any dirmngr and gpg-agent processes spawned by apt-key / add-apt-repository in yakkety+ 2017-01-04 17:00:54 -08:00
Steve Langasek 4f1b4cc3c1 And further cleanup of bootloader deps 2017-01-04 15:53:10 -08:00
Steve Langasek 4db8b82241 ... and dosfstools 2017-01-04 15:51:28 -08:00
Steve Langasek e7d42f5a57 rsync also required 2017-01-04 15:43:16 -08:00
Steve Langasek efe7743ba7 Install ubuntu-cloudimage-keyring, cloud-image-utils from the right place 2017-01-04 15:36:34 -08:00
Steve Langasek c7dbab1968 Explicitly include wget 2017-01-04 15:32:08 -08:00
Steve Langasek c7d9dc0e78 Don't ever use umount -l if you want to act on the device afterwards (e.g. by using kpartx -d) 2017-01-04 15:31:55 -08:00
Steve Langasek 2c45a24efd Don't tell the user to manually install packages that will be installed by geninstaller anyway 2017-01-04 15:02:39 -08:00
Steve Langasek e2c31760b8 geninstaller has no .sh extension here 2017-01-04 14:09:01 -08:00
Michael Hudson-Doyle c0c998c6b1 fix a couple of typos in installer/README.md 2017-01-04 16:35:40 +13:00
Mathieu Trudel-Lapierre fa6bd01408 Fix error in target image name in README for installer testing 2016-12-22 08:48:51 -05:00
Mathieu Trudel-Lapierre 750e3421cc Update README for image creation 2016-12-21 18:58:51 -05:00
Mathieu Trudel-Lapierre 47f530eb77 Rip out local curtin building, use the one from the subiquity PPA or archive. 2016-12-20 11:55:10 -05:00
Mathieu Trudel-Lapierre ca9a99ef5d More tweaks to iamge build. 2016-11-24 16:23:31 -05:00
Mathieu Trudel-Lapierre fde22cf8c4 More geninstaller fixage for MBR. 2016-11-23 11:00:54 -05:00
Mathieu Trudel-Lapierre 497fde3de8 Make geninstaller work again, call from branch root as installer/geninstaller blah. 2016-11-20 22:40:30 -05:00
Michael Hudson-Doyle 31b21799b7 remove dependency on netifaces 2016-11-07 16:56:36 +13:00
Ryan Harper 2007d6401b add check for empty loopdev to geninstaller
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2016-06-22 13:30:27 -05:00
Ryan Harper 153f41c989 Fix installer to work with latest curtin
The latest curtin now does package dep checks during installation
which may install and enable things like lvm2 and mdadm.  These
packages trigger running daemons which prevent the unmounting of
filesystem when building the installer image.  Resolve this by
re-implementing curtin's [un]disable_daemon_in_root functions.

Update runinstaller to use 3 spare disks as virtio to enable
raid testing.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-04 09:01:19 -06:00
Ryan Harper 50d859e866 Reduce size of rootfs layer and common mkfs and rsync options
Attempt to shrink the partition size for the rootfs via mkfs options
Ensure we use the same mkfs and rsync options everywhere.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-28 09:56:09 -05:00
Ryan Harper f5eb8faef4 Switch to 1M alignment for partition calculations
Make sure we continue to use 1M alignment, this helps
parted shift things around properly.  Don't reserve
space for root in installer image since it's read-only.
Add some fudge factor to the root image to allow for
sparse expansion.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-27 15:35:05 -05:00
Ryan Harper 7042fd93f9 Filter out lxcbr0 from network autostart
Wily images and newer now contain a lxcbr0 by default.
Ignore this interface and don't attempt to dhcp autostart it.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-27 10:12:28 -05:00
Ryan Harper 9361bdbd72 Calculate installer image partition sizes
The size of the rootfs fluxuates and sometimes does not fit in the
pre-allocated sizes.  Instead, calculate the size needed for the
rootfs read-only partition (+ 100M padding) and use the remaining
space for the overlay partition as it's needed when the install
image updates it's apt repository.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-27 10:12:28 -05:00
Ryan Harper eaa9926718 Install packages into overlay during build
Speed up install time by pre-installing required curtin packages
in the installer image.  Do this by optionally exploiting a
curtin feature which handles preparing the target for installation
of services that we don't want running during the image build.
Fallback on simple apt-get install but filter out daemon services
as this will break the image build.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-27 10:12:28 -05:00
Ryan Harper bba193efba Install curtin as a deb into installer target
Instead of packing up curtin via source, build a
deb from the source and inject that into the installer.
This also means we always are consuming an 'installed'
curtin (aka /usr/bin/curtin).

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-27 10:12:28 -05:00
Ryan Harper d048b58811 Fix install when using raid devices
RAID devices require special handling since they cannot be partitioned.
Adjust the blockdev model to accomodate this.
Fix sorting of our actions to handle proper ordering when using RAID devices
Implement whole-disk formatting view and controller
Update cloud-init configuration to ensure repeated runs of installer work

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-27 10:12:28 -05:00
Ryan Harper fa1ed52195 Update geninstaller paths for tarball creation
We're no longer packaging curtin_wrap.sh so we don't need to
tar up the bin dir.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-20 16:57:49 -05:00
Ryan Harper 8cb8eddb19 geninstaller: try a bit harder to tar up subiquity installer
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>
2015-09-30 14:19:02 -05:00
Ryan Harper f59187b290 runinstaller: Add format= qemu command
qemu doesn't like to probe formats, specify raw.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-30 14:02:50 -05:00
Ryan Harper ac3fd86bb5 Remove offline mode for installer
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>
2015-09-30 12:58:11 -05:00
Ryan Harper 1ec30081f7 fix string assignment in runinstaller variable
Assign package string to variable correctly.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-30 12:49:06 -05:00
Ryan Harper a5e14bcad9 Always make subiquity-tui available in /usr/local/bin
The subiquity service always expects subiquity-tui to be in
/usr/local/bin.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-30 12:48:21 -05:00
Ryan Harper 6fe10c0a1a Make sure we tar up either in-tree or installed subuiquity source
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>
2015-09-30 12:44:36 -05:00
raharper 8dd720eee8 Merge pull request #58 from CanonicalLtd/fix-runinstaller
Fix runinstaller to work after installed
2015-09-29 16:24:00 -05:00
Ryan Harper aef1858e69 Unbreak make and installer script with subiquity-tui rename
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>
2015-09-29 16:17:00 -05:00
Ryan Harper 141066c786 Fix runinstaller to work after installed
Cleanup runinstaller to be usable after install via package.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-29 15:55:07 -05:00
Ryan Harper 8b228d05a8 Fix geninstaller to be runnable outside of source tree
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>
2015-09-29 09:56:47 -05:00
Ryan Harper 23d644037a Switch to single overlay dir
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>
2015-09-28 09:01:46 -05:00
Ryan Harper 4f344714f9 Use probert package from subiquity-dev ppa
Use the packaged version of probert.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-28 09:01:46 -05:00
Ryan Harper 46974cf398 Update comments on overlayfs check
Expand on overlayfs version check.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-23 09:49:24 -05:00
Ryan Harper 79f072ec43 geninstaller: Check overlayfs module version instead of Ubuntu release
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>
2015-09-23 09:46:22 -05:00
Ryan Harper 5f424963dc Add efi deps to installer/geninstaller
geninstaller should ensure it has all of the packages it needs to build.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-23 09:22:28 -05:00
Ryan Harper d85bb52a63 Finish enabling EFI boot mode
- 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>
2015-09-22 22:19:54 -05:00
Ryan Harper b5b1a00744 Enable running installer in efi mode
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>
2015-09-22 13:37:51 -05:00
Ryan Harper df2c3c6aca Update grub2 configuration for UEFI
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>
2015-09-22 13:21:14 -05:00
Ryan Harper 522a546b5c Modify geninstaller for uefi booting
Switch image to use overlay partition and use uefi layout and boot loader
configuration.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 13:15:00 -05:00
Ryan Harper acab44c1ec Update dhclient apparmor profile under overlayroot
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>
2015-09-21 16:40:35 -05:00
Ryan Harper 2cf528d6d3 Fix serial mode
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>
2015-09-14 16:40:28 -05:00