Commit Graph

65 Commits

Author SHA1 Message Date
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
Ryan Harper a16c301eed Drop python3-parted use
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>
2015-08-27 14:26:37 -05:00
Adam Stokes 1dbb837fd2 Add python3-tornado to geninstaller reqs
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:52:48 -04:00
Ryan Harper 9836dd0cf2 Fix psuedo-random hangs on make run
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>
2015-08-21 14:56:30 -05:00
Wesley Wiedenmeier f8e67e95bd Updated partitioning template to match new config:
- 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
2015-08-12 12:15:31 -05:00
Wesley Wiedenmeier 64ec2ae157 Merge branch 'master' of github.com:CanonicalLtd/subiquity into offline 2015-07-24 10:27:58 -05:00
Wesley Wiedenmeier c6ae4b1619 Fixed offline mode
- 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
2015-07-24 10:26:35 -05:00
Adam Stokes 0a9ba876bb Merge pull request #22 from CanonicalLtd/trivial-fixes
Some trivial fixes to help with initial development
2015-07-24 09:12:55 -04:00
Ryan Harper 65b9cb396a Add postinstall cleanup
Inject a postinstall config to curtin installer to cleanup cloud image
on target.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-23 14:57:42 -05:00
Diogo Matsubara f8e6622fb4 Merge branch 'master' into trivial-fixes 2015-07-23 16:34:47 -03:00
Diogo Matsubara 714a2d6d4f trivial fixes: devel dependencies, use git@github url instead of http to avoid password. 2015-07-23 13:23:00 -03:00
Wesley Wiedenmeier 20a2870d32 Finished offline mode setup
- 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
2015-07-22 15:59:23 -05:00
Wesley Wiedenmeier a93b4bbda5 Merge branch 'master' of github.com:CanonicalLtd/subiquity into offline 2015-07-22 13:30:12 -05:00
Wesley Wiedenmeier 411656ed99 Started adding support for offline installer image
- 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
2015-07-22 13:24:40 -05:00
Ryan Harper c121044808 Use mkdir -p for repeated runs and avoiding warnings.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-21 19:05:33 -05:00
Wesley Wiedenmeier bd2f6014e5 Cleaned up boot appearance
- Use 'quiet splash' for graphical, but display boot output when booting over
   serial
2015-07-20 10:27:20 -05:00
Wesley Wiedenmeier 117042f2b4 Fixed grub2 config to work without a vga card
- Try to set up both gfxterm and serial term, but if either fails,
   continue with the other.
2015-07-20 09:59:42 -05:00
Wesley Wiedenmeier a347eea9eb De-interlaced splash.png
- Grub2 does not support interlaced png
2015-07-18 21:25:43 -05:00
Wesley Wiedenmeier 7b374a1af7 Merge branch 'master' of github.com:CanonicalLtd/subiquity into grub2 2015-07-18 20:51:38 -05:00
Wesley Wiedenmeier 31af65f9cb Added support for serial consoles in grub2 menu 2015-07-18 20:47:36 -05:00
Wesley Wiedenmeier 5861890397 Added options to boot using serial or graphical tty 2015-07-09 15:43:34 -05:00
Wesley Wiedenmeier fbfebeb8ed Added loading part_msdos and part_gpt modules 2015-07-09 10:26:28 -05:00
Wesley Wiedenmeier a520cd897d Added default and timeout 2015-07-08 16:41:09 -05:00
Wesley Wiedenmeier d786eb2e86 Fixed font issue by manually loading unicode.pf2 2015-07-08 15:09:31 -05:00