Commit Graph

6016 Commits

Author SHA1 Message Date
Michael Hudson-Doyle acbc26bb36 configure a UEFI boot entry to boot into a reset partition if present 2023-07-17 13:58:55 +12:00
Michael Hudson-Doyle 1f01efa4fb configure a grub menuentry to boot into a reset partition if present 2023-07-17 13:57:49 +12:00
Michael Hudson-Doyle b23d553220 fix using late-commands and reset-partition-only at the same time 2023-07-17 13:54:57 +12:00
Michael Hudson-Doyle f8bf1105bf
Merge pull request #1716 from mwhudson/refactor-install-package-from-pool
factor out code to install a package from the pool in the live session
2023-07-13 11:47:36 +12:00
Michael Hudson-Doyle cb1e760207 add docstring to PackageInstaller 2023-07-13 11:37:43 +12:00
Michael Hudson-Doyle 743c350b1f factor out code to install a package from the pool in the live session 2023-07-12 13:38:37 +12:00
Michael Hudson-Doyle 02e5bc3c17 rename WLANSupportInstallState to PackageInstallState 2023-07-12 13:03:29 +12:00
Michael Hudson-Doyle 5af40f0b28
Merge pull request #1710 from mwhudson/annotate-fsmodel
add annotations to storage model objects
2023-07-12 10:41:57 +12:00
Michael Hudson-Doyle 097982fa82
Merge pull request #1714 from mwhudson/update-probert
Update probert
2023-07-12 09:29:36 +12:00
Dan Bungert b6e45ce18b
Merge pull request #1711 from s-makin/RTD-config-file
Add readthedocs config file
2023-07-11 15:22:58 -06:00
Michael Hudson-Doyle c1d8dcf381 refresh simple.json, in particular with maj:min mount data 2023-07-11 23:11:31 +12:00
Michael Hudson-Doyle f0ce323ca2 update probert 2023-07-11 23:11:31 +12:00
Michael Hudson-Doyle 07cc844009
Merge pull request #1713 from mwhudson/organize-examples
tidy up examples/ directory
2023-07-11 23:09:29 +12:00
Michael Hudson-Doyle 2c75df0ddf remove now-redundant parts of the file names in examples/ 2023-07-11 22:46:19 +12:00
Olivier Gayot 560247ec02
Merge pull request #1712 from ogayot/pr/bump-curtin-kernel-null
snapcraft: pickup curtin's 'kernel: null' fix
2023-07-11 09:13:30 +02:00
Michael Hudson-Doyle 6b35e5e4a1 tidy up examples/ directory
Move machine configs, sources, autoinstall files and dry-run configs
into their own subdirectories.
2023-07-11 12:49:22 +12:00
Olivier Gayot 9de3beb6ce snapcraft: pickup curtin's 'kernel: null' fix
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-07-10 18:26:37 +02:00
Sally Makin d60ceef09c Add readthedocs config file
This file (.readthedocs.yaml) will be required to build RTD projects
(effective from 25th September 2023)
2023-07-10 14:49:47 +01:00
Michael Hudson-Doyle 06977b3b90 remove redundant attr.ib objects 2023-07-10 11:04:26 +12:00
Michael Hudson-Doyle 678f730937 set kw_only and auto_attribs for all storage model objects 2023-07-10 11:04:26 +12:00
Michael Hudson-Doyle 53e6738e5f add annotations to all storage model objects 2023-07-10 11:04:26 +12:00
Michael Hudson-Doyle 95e520ddf8
Merge pull request #1706 from mwhudson/manual-capability
add a target/capability for manual partitioning
2023-07-08 21:31:03 +12:00
Michael Hudson-Doyle 4d52155e09 remove obsolete comment 2023-07-08 21:19:42 +12:00
Michael Hudson-Doyle c554428512 create a method for indicating if a capability can be customized
Currently the only capability that cannot be customized are the core
boot ones, but (a) that will change (b) it obscures the intent of the
check.
2023-07-06 14:52:12 +12:00
Michael Hudson-Doyle a97909cdd5 handle manual capability/target in guided POST
This just makes things a bit more regular.
2023-07-06 14:33:17 +12:00
Michael Hudson-Doyle 9ef996292d have v2_guided_GET indicate when manual partitioning is possible
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.
2023-07-06 14:31:33 +12:00
Michael Hudson-Doyle 00c65f7246
Merge pull request #1705 from mwhudson/bye-v1-guided
move server client (mostly) to v2 guided API
2023-07-06 11:33:56 +12:00
Olivier Gayot 54465d16fa
Merge pull request #1703 from ogayot/install-oem-ensure-one-kernel
OEM: ensure only one kernel gets installed
2023-07-04 12:03:47 +02:00
Michael Hudson-Doyle 1594963ed5 remove guided_GET and associated types
It does not really say good things that I didn't have to remove any
tests...
2023-07-04 17:14:07 +12:00
Michael Hudson-Doyle b95fd2eb1c convert guided_POST to take a GuidedChoiceV2
can't call v2_guided_POST yet because the return type differs
2023-07-04 17:14:05 +12:00
Michael Hudson-Doyle c08666f418 move server client from guided_GET to v2_guided_GET 2023-07-04 16:59:38 +12:00
Michael Hudson-Doyle 7a2db2d3f7 test and fix for defective encrypted case 2023-07-04 16:57:19 +12:00
Michael Hudson-Doyle 7d6371ee45 add a way for v2_GET to include appropriate raid devices 2023-07-04 16:47:58 +12:00
Olivier Gayot 6424c3c52b oem: ensure a single kernel gets installed
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>
2023-07-03 09:59:45 +02:00
Olivier Gayot b844119b79 oem: disable OEM meta-packages installation on core boot classic
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:53:12 +02:00
Olivier Gayot e6ccfcc118 oem: allow to disable install on desktop and force install on server
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>
2023-06-30 20:53:12 +02:00
Olivier Gayot 7e8c1eedd5 oem: raise error on certified hardware if a specific kernel is requested
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:53:12 +02:00
Olivier Gayot 30dff3f8d9
Merge pull request #1702 from ogayot/install-oem-kernel-selection
Override requested kernel flavor on certified hardware
2023-06-30 20:52:05 +02:00
Olivier Gayot f92e675abb oem: raise error on certified hardware if a specific kernel is requested
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:51:09 +02:00
Olivier Gayot 527522f748 oem: skip listing OEM metapkgs on ubuntu-server
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>
2023-06-30 20:51:09 +02:00
Olivier Gayot 69a840fdb9 oem: check if OEM meta-packages want OEM or default kernel flavor
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>
2023-06-30 20:51:09 +02:00
Olivier Gayot 1c2979811c kernel: move conversion flavor -> pkgname outside the ctrler
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:51:09 +02:00
Olivier Gayot cae7765fbf kernel: add a way to override the kernel metapkg we want to install
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>
2023-06-30 20:51:09 +02:00
Olivier Gayot fc458ff109
Merge pull request #1700 from ogayot/install-oem
Install (and optionally upgrade) available OEM meta-packages
2023-06-30 20:49:33 +02:00
Olivier Gayot 6492ddc50c
Merge pull request #1704 from ogayot/doc-add-active-directory-schema
documentation: update autoinstall schema to include active-directory
2023-06-30 10:53:03 +02:00
Michael Hudson-Doyle 5ba9e524d8
Merge pull request #1697 from mwhudson/reset-only
support for creating only a reset partition
2023-06-30 16:53:55 +12:00
Michael Hudson-Doyle 64ad6514a3 suggestion from review 2023-06-30 16:43:01 +12:00
Dan Bungert 446f3772d3
Merge pull request #1687 from dbungert/default-user-none
server: fix when cloud-config has no default user
2023-06-29 16:20:23 -06:00
Dan Bungert 5bd9a4fc94 server: fix when cloud-config has no default user
If a cloud-config is sent that adjusts the users but creates no default
user, Subiquity crashes with a exception while mishandling the None.

cloudinit.distros.ug_util.extract_default is documented as returning
None in the event that the default user cannot be found.

Example bad cloud-config:
```yaml
users:
- name: ubuntu-server
```
2023-06-29 15:51:01 -06:00
Olivier Gayot 8f7760462a documentation: update autoinstall schema to include active-directory
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-29 14:26:54 +02:00