Commit Graph

88 Commits

Author SHA1 Message Date
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
Wesley Wiedenmeier 2cfe2ffe71 Added support for more advanced booting with grub2
- 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
2015-07-08 14:21:42 -05:00
Ryan Harper 269af56576 Updated bootsplash
Less flashy for now.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 14:01:48 -05:00
Ryan Harper cd52672fd7 Hide floppy error output
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>
2015-07-06 13:55:42 -05:00
Ryan Harper 2b06bdc1da Call curtin to complete install
- 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>
2015-07-06 12:34:24 -05:00
Ryan Harper fa80b0cabe Add probert to subiquity
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>
2015-06-25 21:12:42 -05:00
Ryan Harper 29c2d3301e Add new menu choices (text vs serial)
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>
2015-06-17 15:47:28 -05:00
Ryan Harper d3c0b55dbe Call curtin installer from subiquity
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>
2015-06-17 15:47:23 -05:00
Adam Stokes b9807ed5b9 Fix timeout and stopping of systemd when chvt is run.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-17 16:04:45 -04:00
Ryan Harper 4cd052c6ef Runtime check on which qemu is being used and install the prereq before attempting to use qemu-system-xxxx. 2015-06-17 13:09:52 -05:00
Ryan Harper 698e76127a syslinux binaries aren't standalone, so copy all .c32 files into extlinux target dir. 2015-06-17 13:09:21 -05:00
Ryan Harper eeadb43f93 add gdisk prereq for sgdisk command 2015-06-17 13:08:27 -05:00
Ryan Harper 4d73e1f27c make sure dldir exists before downloading things. 2015-06-17 13:07:56 -05:00
Ryan Harper 7d536c917a Fix issue 3
Install simplestreams package in the prereqs for building installer image.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-17 08:38:12 -05:00
Ryan Harper fc269dff06 Use subiquity inside the install image
- 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>
2015-06-16 14:45:05 -05:00
Ryan Harper a2ad7bf8ed Initial import of installer image building
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-15 14:38:51 -05:00