2164 Commits

Author SHA1 Message Date
Pat Viafore
2c70ed158b
Make Ubuntu Vagrant box 40G. (LP: #1580596)
Vagrant images were previously put at 10G, but this was a regression
from Trusty, in which they were 40G.  This made it a tough sell for
users to upgrade if they were using a Ubuntu desktop experience.

This change does not impact disk usage as Vagrant with the virtualbox
provider dynamically allocates space with the VMDK.  On a test system,
the VMDK took up 1.1G of disk space according to df, and after
creating a 2G file in Vagrant, the VMDK grew to 3.1G.

Therefore, users who are running on a system with little free space will
not see adverse effects if they upgrade to a new vagrant image
2020-04-17 10:17:18 -05:00
Dimitri John Ledkov
ad64e38c48 Run snap info on the downloaded snap, rather than against the store. First of all snap info doesn't have --channel argument, thus queries the wrong channel, and depening on the cohort, a different snap might be visible too. Thus seed the base of the snap revision we dowanloaded, rather than some random one from the store. 2020-04-17 00:58:32 +01:00
Dimitri John Ledkov
a21a67ab52 Print subiquity ssh login details on s390x line based consoles. 2020-04-16 23:54:27 +01:00
Dimitri John Ledkov
56ac1865f7 Switch Ubuntu desktop to only hwe-20.04 kernel flavour. 2020-04-16 01:30:31 +01:00
Robert C Jennings
66041e9d8c
Do not unconditionally install the core snap
Seeing any snap via snap_preseed will evaluate the base for each snap
and seed the appropriate base.  There should be no reason to explicitly
seed the 'core' snap and with snaps moving to 'core18' this will add
'core' without need.
2020-04-09 14:38:45 -05:00
Robert C Jennings
14066ce389
Fix logic to ensure snapd is seeded in core18-only images
The _snap_post_process function is meant to install snapd if core18 is the
only core snap installed or removed snapd if core is installed and snapd
was not explicitly installed.  But the current logic in _snap_preseed
will never call _snap_post_process.  $core_name will never be empty
with the existing logic, but even if it were that would only be for the
'core' snap and we'd miss using the 'core18' logic that pulls in snapd.
Given the case statement in _snap_post_process can handle doing the
right thing given any snap we can just call it unconditionally.
2020-04-09 14:36:35 -05:00
Łukasz 'sil2100' Zemczak
d2a2ac41a4 Use the raspi KERNEL_FLAVOUR for the raspi images. 2020-04-08 10:06:09 +02:00
Dimitri John Ledkov
0415e42026 server: networkd applies the first sorted matching network file, thus prefix 'all' fallback networks with 'zz-'. 2020-04-03 12:59:05 +01:00
David Krauser
8bc9cb77a1 Safely set /etc/resolv.conf to an empty file in buildd images
In the buildd image chroot, /etc/resolv.conf is a symbolic link to
a configuration file in the /run directory. A call to truncate will
modify that file, which we should not do. Instead, we want to remove
the symbolic link and replace it with an empty file.
2020-03-27 15:17:05 -04:00
David Krauser
1aef616afd Include -security and -updates packages in bootable buildd images
The base image is built with packages from the release pocket; however,
we want the latest from updates and security. Those pockets are already
enabled, we just need to perform an upgrade to pull in the latest
packages.
2020-03-26 15:44:05 -04:00
Michael Hudson-Doyle
2498aadebb Call udevadm settle before kpartx -d
Back in 2017 some code was added to ignore failures tearing down loop
devices. But debugging that growpart race on cloud images made me (very)
aware of a potential cause of the race: doing something like zerofree on
a device will cause udev scripts to run, and if they are still running
by the time kpartx is called, you would expect the kpartx -d to fail. So
lets see if a udevadm settle helps, and get rid of one of the "sometimes
this fails but we don't know why" comments...
2020-03-21 00:08:07 +13:00
Dimitri John Ledkov
cb574d4cb3 minimized: reinstall packages one by one, instead of all of them together, as otherwise apt fails to immediately configure libc6:amd64 & libgcc-s1. LP: #1867607 2020-03-16 10:42:30 +00:00
Dimitri John Ledkov
910310dbbb Only install oem-20.04 kernel flavour on amd64, as it doesn't exist on other arches. 2020-03-13 20:18:16 +00:00
Michael Hudson-Doyle
7f09a42d85 Stop trying to extract autoinstall config during boot, subiquity will do it instead. 2020-03-10 10:42:32 +13:00
Łukasz 'sil2100' Zemczak
091976c4a6 Merge branch 'fix-raspi-gadgets' of git+ssh://git.launchpad.net/livecd-rootfs into ubuntu/master 2020-03-09 10:00:34 +01:00
Michael Hudson-Doyle
6e68a3f13c Do not start subiquity until cloud-final and snapd.seeded have completed. 2020-03-06 13:38:52 +01:00
Łukasz 'sil2100' Zemczak
40c51f78b8 Switch to using the generic pi gadget repo for classic, use the main branches. 2020-03-06 11:57:47 +01:00
Łukasz 'sil2100' Zemczak
95772fd9df Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into u-i-disk-info 2020-03-06 11:38:42 +01:00
Michael Hudson-Doyle
49e550fb9e Fix autoinstall-extracting runcmd in the case no user-data is passed. 2020-03-05 15:36:19 +01:00
Michael Hudson-Doyle
187fd01c37 re-add scripts-user to cloud_final_modules 2020-03-04 09:24:18 +01:00
Michael Hudson-Doyle
c969c8e4b9 add runcmd to copy autoinstall from user-data to /autoinstall.yaml 2020-03-03 15:08:52 +01:00
Michael Hudson-Doyle
0dc12a1122 remove stuff for copying autoinstall files around 2020-03-03 15:08:52 +01:00
Michael Hudson-Doyle
f6e5da24f9 enable cloud-init in live session on all architectures 2020-03-03 15:08:45 +01:00
Robert C Jennings
d214127b9f
Address snap base regression after snap-tool removal
With the removal of snap-tool failures are seen in image builds that do
not have the 'core' snap included by the seed.  This is the case for the
minimized subproject of the ubuntu-cpc project where lxd/core is removed.
In that subproject, any binary hook which adds a snap that is based
on 'core' will not add 'core' and fail 'snap debug validate-seed'.
snap-tool included the following logic in the 'snap-tool info' when
determining snap bases:

    # Have "base" initialized to something meaningful.
    if self.is_core_snap():
        snap_data["snap"]["base"] = ""
    elif snap_data["snap"].get("base") is None:
        snap_data["snap"]["base"] = "core"

The snap store does not return a base if the base is core which makes
this necessary.  This patch looks for the base in 'snap info' output
and if none is found (and the snap is not snapd or core) it assumes the
base is 'core' and installs it.  This restores the behavior lost in the
migration from snap-tool to snap cli.
2020-02-25 16:16:26 -06:00
Iain Lane
ede0be897b
Pass --verbose to snap info so that it includes the base. 2020-02-24 09:56:09 +00:00
Robert C Jennings
489f009e49
Use snap cli rather than custom snap-tool
snap-tool was added to support a deprecate cohort-key feature of the snap store.
Recent changes in snap assertions have added additional fields which snap-tool
is not retrieving.  This resulted in snap install failures on first boot.

This patch removes snap-tool and returns to using the snap cli.  This ensures
snap downloads will function without odd incompatibilities.
2020-02-21 14:56:25 -06:00
Łukasz 'sil2100' Zemczak
e9170e053b Rename the raspi3 SUBARCH to raspi 2020-02-21 12:46:43 +01:00
Dimitri John Ledkov
d7045b2e09 Fixup subiquity:
- drop ds-identify policy, not needed with improved cloud config
  - drop disabling network, doesn't work with ip=
  - fixup setting up the INSTALLER_ROOT mountpoint
2020-02-10 23:50:03 +00:00
Dimitri John Ledkov
17dc48cf65 Set uc20 image size to 10G. 2020-02-10 12:43:39 +00:00
Dimitri John Ledkov
438606c5e8 Encode CHANNEL specification in the UC20 model names. 2020-02-07 22:18:04 +00:00
Dimitri John Ledkov
3b1047fbc2 Configure a better nocloud datasource for subiquity cloud-init. 2020-02-07 22:11:54 +00:00
Dimitri John Ledkov
db0c7d68f2 Although the request flavour to install is oem-20.04, it really is called just oem on disk. Override the flavour name from oem-20.04 to oem when renaming built artefacts. This also means that ubuntu-cdimage needs to simply download 'oem' vmlinuz+initrd pairs, not 'oem-20.04'. 2020-01-30 11:13:51 +00:00
Dimitri John Ledkov
e062389eb9 * On s390x subiquity:
- enable cloud-init
  - make cloud-init handle the default/baked in networking configuration
  - install and enable openssh-server for the installation only
  - provide cloud.cfg that generates random installer user password
  - disable subiquity on sclp_line0 line based console
2020-01-29 14:16:00 +00:00
Dimitri John Ledkov
f6ca600af2 Install oem-20.04 kernel flavour on Ubuntu Desktop builds. 2020-01-28 15:05:36 +00:00
Łukasz 'sil2100' Zemczak
2870738f00 Merge the manually-pushed 2.636 from Laney. 2020-01-24 18:47:22 +01:00
Łukasz 'sil2100' Zemczak
95103e3d36 Ensure seed part. is mounted; wait for getty 2020-01-24 18:34:40 +01:00
Łukasz 'sil2100' Zemczak
2ca3cc9720 Use the datestamp parameter (stored in NOW) instead of the newly added BUILD_ID. 2020-01-16 18:55:24 +01:00
Michael Hudson-Doyle
a934e042d6 Merge branch 'lp-1855354' into ubuntu/master 2019-12-14 20:59:26 +13:00
Łukasz 'sil2100' Zemczak
fc6d956269 Support generating a .disk/info file via ubuntu-image if BUILD_ID is passed from cdimage to the builder. 2019-12-13 18:13:36 +01:00
Michael Hudson-Doyle
f27b432026 ubuntu-cpc hooks are Different 2019-12-13 13:16:34 +13:00
Michael Hudson-Doyle
fb31b64a7c preserve apt preferences for all projects 2019-12-13 13:16:34 +13:00
Michael Hudson-Doyle
d38ceab06d fix in case of no preferences 2019-12-13 13:16:34 +13:00
Michael Hudson-Doyle
94c2d606ca Preserve apt preferences created by any package we install (i.e. ubuntu-advantage-tools) against live-build's attempt to delete them. (LP: #1855354) 2019-12-13 13:16:33 +13:00
David Krauser
b71d1f990e Only build bootable buildd images for amd64 2019-12-12 13:54:32 -05:00
David Krauser
4a0b757dc7 Properly setup the chroot before using the network in buildd hook. 2019-12-12 13:51:25 -05:00
Łukasz 'sil2100' Zemczak
474f232840 Snapd for uc20 model assertions does not support global channel overrides. 2019-12-12 16:58:42 +01:00
David Krauser
612c731b26 Fix broken DNS in buildd image builds.
Instead of injecting an empty resolv.conf with an includes.chroot, we'll
inject it in late with a hook. The empty resolv.conf breaks DNS early in
the build, and causes some binary hooks to fail.
2019-12-11 15:06:11 -05:00
Łukasz 'sil2100' Zemczak
a1daf38b93 Add support for Ubuntu Core 20 builds by supporting uc20 models. 2019-12-10 15:27:06 +01:00
Dimitri John Ledkov
3551fc1a02 Ship two kernel flavours on desktop image. 2019-12-09 14:47:08 +00:00
Dimitri John Ledkov
39f675eaf6 Drop installing dummy transitional linux-signed-generic, these days linux-generic is always signed, on arches that need/support it. 2019-12-09 14:21:49 +00:00