Drive various decisions that used to be keyed off core boot capabilities
and special purpose bits of the API by the new guided capability stuff.
I tried to think of a way to do this incrementally and failed. It might
be easier to review the new code rather than the diff in places.
There are some install scenarios where manual partitioning is not
possible at all. The current way we install core boot classic is one
(although that might change as and when we get partial gadgets) but
other situations might be when doing an install that just creates a
reset partition, or when installing a dd image rather than a squashfs.
Before running curthooks, we now look in the target if there is an
installed kernel. If there is, we instruct curtin _not_ to install
another one.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
By default, OEM meta-packages get installed on ubuntu-desktop and don't
get installed on ubuntu-server. Using autoinstall, we can now give more
control. The autoinstall section supports the following:
Install on server and desktop:
oem:
install: true
Do not install even on desktop:
oem:
install: false
Install only on desktop (the default):
oem:
install: auto
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
OEM meta-packages have an attribute stating if they want the OEM kernel
or the "default" kernel to be installed alongside them.
That said, in the OEM archive, they expect the "default" OEM kernel to
be the HWE kernel. This is only true for ubuntu-desktop. Let's not
install OEM meta-packages on ubuntu-server for now.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
When installing on certified hardware, we now look for the
Ubuntu-Oem-Kernel-Flavour attribute of the OEM meta-package to determine
which kernel flavour we should use. This attribute can take two values:
* oem -> in which case we make use of the override to install the
OEM kernel flavor
* default -> in which case we get the kernel flavor that was originally
configured.
If the attribute is not present or contains any other value, it is
treated the same as if it was "oem".
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Before running curtin's curthooks, we use the kernel model to configure
which kernel meta-package we want to install on the target system.
There are multiple ways to select the kernel flavor, including
autoinstall directives or placing a file in
/etc/subiquity/kernel-meta-package.
That said, if we install Ubuntu on certified hardware, the OEM
meta-package will have something to say about the expected kernel
flavor. When installing the kernel meta-package, it will automatically
pull the kernel that it expects to run on.
Therefore, we should make it possible to override the kernel flavor so
that we don't end up with multiple kernels installed.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>