2252 Commits

Author SHA1 Message Date
Didier Roche
69f6b3795b
Allow the ubuntu-desktop-installer to request snap seeding state
This is used to only start the installer after all snaps have been
seeded.

Co-Authored-By: Dennis Loose <dennis.loose@canonical.com>
2025-07-15 16:24:10 +02:00
Didier Roche
8a70acb1ec
Make sure the system was seeded before starting the installer
The installer is a snap, and as such, the system needs to be seeded
first to avoid a race during live boot.
Fixes https://bugs.launchpad.net/ubuntu-desktop-provision/+bug/2114923
2025-07-11 13:05:08 +02:00
Adriano Cordova
4f0c09311d
ubuntu-cpc: enable cpc fixes for riscv
LXD is going to support launching riscv64 virtual machines,
and for riscv64 virtual machines to be usable the console
needs to be properly set. This and other fixes are currently
done in the hook 999-cpc-fixes.chroot, which was disabled for
riscv64 and which this commit enables.

Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
2025-07-01 09:13:38 -04:00
Michael Hudson-Doyle
2ea437c340 Merge branch 'nvidia-kernels' into ubuntu/master 2025-06-17 22:21:14 +12:00
Dan Bungert
4c2baf9e58 server: fix hwe kernel layer having multiple kernels
LP: #2112501
2025-06-13 11:22:39 -06:00
Dan Bungert
f33c8ba809 lb_binary_layered: second take on fixing mtimes 2025-06-13 11:19:18 -06:00
Didier Roche
231ee26831 Switch some TPM FDE components to edge channels
We want the firmware updater and security center pointing to edge too.
The model only allow to select it, but we need to invoke them by
default in snap prepare-image
2025-06-13 10:54:19 -06:00
Didier Roche
a02700313a
Move snapd to edge for the TPM FDE snaps
We need edge on the live session too so that subiquity knows about
latest and greatest on TPM FDE support. We will revert that once snapd
is released to the stable channel.
2025-06-13 11:47:57 +02:00
Antoine Lassagne
208d53affc Allow to chose nvidia kernel instead of generic 2025-06-13 09:32:08 +02:00
Dan Bungert
75ad30fe5d Revert "lb_binary_layered: fix mtimes in layered squashfses"
This reverts commit eec13dad681c66f3a318600827f52dde55291f9f.
2025-06-10 07:55:37 -06:00
Dan Bungert
eec13dad68 lb_binary_layered: fix mtimes in layered squashfses
layer construction involves rsync, and that process ignores times to
avoid some of the layers being larger than they would otherwise where
the only difference is times.  This saves a small amount of space,
around 14MiB, but results in files in the layers having non-intended
time values.  Ensure mtime and atime in the source chroot match what is
found in the destination chroot.
2025-06-02 12:23:02 -06:00
Dan Bungert
a0d948f17b desktop: TPMFDE snapd from latest/edge 2025-05-28 10:03:56 -06:00
Dan Bungert
37dd412bfa desktop: TPMFDE kernel from 25.10/candidate 2025-05-23 19:50:34 -06:00
Dan Bungert
dde90dfb79 desktop: cherry-pick pc-kernel from different channel
To get 25.10 Desktop ISOs with TPMFDE bits, we need matching pc-kernel
and snapd otherwise we get errors like so when running
`snap prepare-image`:

WARNING: the kernel for the specified UC20+ model does not carry
assertion max formats information, assuming possibly incorrectly the
kernel revision can use the same formats as snapd
error: snapd 2.68+ is not compatible with a kernel containing snapd
prior to 2.68

Use the "dangerous" model, which allows overriding the channel, and pick
up the matching pc-kernel which is not yet on 25.10/stable, where the
non-dangerous model would expect to find it.
2025-05-23 09:53:18 -06:00
Dan Bungert
83022a6ebe desktop: add notes about generation of a signed model 2025-05-22 10:29:05 -06:00
Dan Bungert
237595f90a desktop: no long skip 020-ubuntu-enhanced-sb.binary 2025-05-14 16:14:28 +02:00
Dan Bungert
f472f1e437 desktop: update TPMFDE model for questing 2025-05-14 16:14:28 +02:00
Dan Bungert
5dc5cd082a desktop: skip 020-ubuntu-enhanced-sb.binary 2025-05-05 15:06:53 +02:00
Dan Bungert
8c4996cce7 server: provide network config direct to netplan 2025-04-28 09:26:35 -06:00
Dan Bungert
5f5a686760 desktop: no longer involve cloud-init in early networking
LP: #2107225
2025-04-23 16:23:19 -06:00
Tomáš Virtus
60641d7411
ubuntu-cpc: Restore UseDomains=true
Also see https://bugs.launchpad.net/cloud-images/+bug/2106729.

Since Oracular[1]:

    Ubuntu’s systemd-networkd no longer sets UseDomains=true for managed
    network interfaces. In effect, this means that search domains
    configured in DHCP leases will not be reflected in /etc/resolv.conf
    by default. This change aligns Ubuntu’s default behavior with that
    of upstream. System administrators may choose to override this
    default on a global, or per-interface basis. See systemd.network 4
    for details.

The default in systemd is UseDomains=false. From systemd.network(5)[2]:

    DHCP=

        Furthermore, note that by default the domain name specified
        through DHCP is not used for name resolution. See option
        UseDomains= below.

    UseDomains=

        It is recommended to enable this option only on trusted
        networks, as setting this affects resolution of all hostnames,
        in particular of single-label names. It is generally safer to
        use the supplied domain only as routing domain, rather than as
        search domain, in order to not have it affect local resolution
        of single-label names.

It has been reported to us by few clouds that this breaks local name
resolution. For instance, in Google Cloud Compute, users can no longer
reach instances in the same zone[3] nor Google Cloud services[4] by
their names.

Arguably, the security concerns for having this option disabled are not
valid in cloud environments. As one of our partners said:

    IIUC, the motivation to disable UseDomains by default is that a
    laptop might be used on an untrusted network where the domains
    provided by DHCP can be a security issue, directing users to places
    they don't intend.

    But it's not possible for a cloud instance to be connected to an
    untrusted network (barring a breached account).

    The way I'm looking at this is that DHCP option 119 exists for the
    express purpose of allowing a network administrator to configure the
    DNS search path for computers on that network. I understand there's
    a security concern if that network isn't a datacenter. But in the
    cloud there's no concern (in some clouds, it's not even possible for
    DHCP response packets to come from anywhere but the cloud's own
    DHCP).

We should restore this setting in cloud images.

[1] https://discourse.ubuntu.com/t/oracular-oriole-release-notes/44878
[2] https://manpages.ubuntu.com/manpages/plucky/en/man5/systemd.network.5.html
[3] https://cloud.google.com/compute/docs/internal-dns
[4] https://cloud.google.com/compute/docs/metadata/overview
2025-04-10 17:25:16 +02:00
Dave Jones
8add8daa49
ubuntu-image: Avoid filling tmpfs-based /tmp 2025-03-20 17:22:32 +00:00
Dan Bungert
c1d898ed2c desktop: update tpmfde model for pc-kernel channel
* Updated model to move pc-kernel to channel 25.04/stable
* Move model from heredoc to a file
2025-03-13 11:03:10 -06:00
Jess Jang
fa00c36419 feat: Add 6.14 kernel apparmor features' preseeds 2025-03-12 21:05:01 -05:00
Dan Bungert
20590f0dbf ubuntu-desktop: update model for 25.04 and components
This model intentionally uses pc-kernel from a branch, for components
testing purposes.  We'll have to update this again before release when
the desired pc-kernel is on a stable channel.
2025-03-11 09:14:18 -06:00
Dan Bungert
b79160bf08 server: delete the initrd but not initrd.img symlink
The initrd is recreated later.  Leave the symlink.
2025-03-10 16:27:45 -06:00
Dan Bungert
d2050181d4 subiquity: easier bridge kernel setup
For subiquity installs, make it easier to enable bridge kernel, just a
boolean to set true/false.  Don't enable yet though.
2025-03-04 15:50:15 -07:00
Michael Hudson-Doyle
e814e02bf4 Again in ubuntu-server builds, configure LAYERFS_PATH in the kernel layer and ensure the initrd is freshly regenerated in that layer. LAYERFS_PATH was being set to the layer below the kernel layer, which meant that the live session did not get access to all the modules in the case that the kernel had not been installed in the base layer, which in turn means that installs fail. (LP: #2100148)
* Again in ubuntu-server builds, configure LAYERFS_PATH in the kernel layer
  and ensure the initrd is freshly regenerated in that layer. LAYERFS_PATH
  was being set to the layer below the kernel layer, which meant that the
  live session did not get access to all the modules in the case that the
  kernel had not been installed in the base layer, which in turn means that
  installs fail. (LP: #2100148)
* While we're at it, delete any initrd from any other layer than a kernel
  layer, as they just waste space on the ISO.
2025-02-27 20:32:56 +13:00
Michael Hudson-Doyle
ff331b2d94 In ubuntu-server builds, install the first kernel in the base layer, not the "ga" kernel (which may not be installed at all, as is the case in e.g. the arm64+largemem builds). 2025-02-27 20:31:38 +13:00
Adriano Cordova
949f980646 riscv: add SUBARCH 'jh7110'
Add SUBARCH 'jh7110' for jh7110-based boards.
2025-02-25 15:28:36 -03:00
John Chittum
e85f367421
feat(ubuntu-cpc): sbom generation everywhere
patch create_manifest to produce an sbom when called by an ubuntu-cpc
project. Patch all the ubuntu-cpc hooks and series files to include the
newly generated manifests, filelists, and sboms. Generates a number of
new artifacts in the builds. the snap utilized, cpc-sbom, is an open
source repo and a provided via a hidden snap. there is no intention of
publisizing the snap or how we generate sboms, however partners require
the ability to audit if required.

defensively checks if the snap is already installed, in the case of
multiple hooks being called in a single build (thus sharing a build
host), and only if called in an ubuntu-cpc project.

(cherry picked from commit 7c7b7df89dc96169db1f255d6bba901ebb63a43c)
2025-02-25 13:18:55 +01:00
Simon Poirier
7f5b9374b2 fix: increase ppc64el disk size to 2.4Gib
ppc64el was and still is a bit low compared to other ubuntu-cpc archs
and started running out of space.
2025-02-19 16:12:28 -05:00
Simon Quigley
00b7f2dc35 Correct back to sh from previous commit for now 2025-02-19 02:18:53 -06:00
Simon Quigley
818af83d4d Add support for multiple pools (/var/lib/{livefs,preinstalled}-pool/). 2025-02-19 02:15:04 -06:00
Simon Quigley
784c7d3060 Make the package completely Lintian-clean except for no-dep5-copyright. 2025-02-18 22:53:52 -06:00
Simon Quigley
29ee4398e8 Move from http://ppa.launchpad.net to https://ppa.launchpadcontent.net when specifying EXTRA_PPAS. 2025-02-18 22:22:10 -06:00
Michael Hudson-Doyle
5fb3d42d36 Pre-emptively include the override to not try to build HWE kernel layer in post .2 server riscv64 ISOs. 2025-02-17 11:17:35 +13:00
Michael Hudson-Doyle
99f61b2ad7 live-build/ubuntu-mini-iso/hooks/01-mini-iso.chroot_early: Fix paths that should have been adjusted when code moved from binary to chroot hook. 2025-02-14 11:02:21 +13:00
Michael Hudson-Doyle
11f1a1dc84 live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary: Drop the assumption that the uncompressed part of the initrd is unpacked to a directory called "main". 2025-02-14 11:01:45 +13:00
Dan Bungert
bf17ce99e1 build: fix FLAVOUR set for lowlatency
similar to: 06fd5dacc34d018142e8fa713b6eba6011ababfc
(cherry picked from commit 2a9992ad7d538567a6449059d998bfc8c6d3103f)
2025-02-13 13:00:16 -07:00
Simon Poirier
1ee581ca0c fix(buildd): add udev to buildd images. (LP: #2092196)
On 24.10 forward, networkd relies on udev for interface setup. This addresses
forever pending interfaces in networkd on buildd lxd images.
2025-02-13 13:42:50 -05:00
Thomas Bechtold
5c61d04183
Add 6.12 kernel apparmor features preseeds
Plucky is currently on kernel 6.12 so preseeding fails with a apparmor
feature mismatch given that the live-build/apparmor/generic tree is
used. Adding a 6.12 tree (which is identical with the 6.11 tree)
solves this.
2025-02-13 12:12:35 +01:00
Dan Bungert
e3355e29d8 ubuntu-server: default-layer.conf in casper pass
default-layer.conf needs to be done in the casperization pass or we
don't get that file.
2025-02-11 08:30:38 -07:00
Chris Peterson
03f95a7c04 ubuntu-core-installer: update install-sources.yaml with kernel 2025-02-05 13:58:18 -08:00
Chris Peterson
86506c838d write_kernel_yaml: quote the default argument 2025-02-05 13:58:10 -08:00
Michael Hudson-Doyle
e7153d9d3d Similar changes for ubuntu-mini-iso build. 2025-02-05 11:24:25 +13:00
Michael Hudson-Doyle
8d7efb4d15 Move configuration of casper in ubuntu-serve:live builds to a "chroot early" hook for the installer layer and remove the now unnecessary update-initramfs from the binary hook that breaks because mkinitramfs now requires that /sys is mounted. (LP: #2097280) 2025-02-05 11:23:58 +13:00
Michael Hudson-Doyle
bdd7d035e2 Stop producing a rootfs tarball for the ubuntu-mini-iso builds. 2025-02-05 11:20:18 +13:00
Michael Hudson-Doyle
c17a99bc1f Allow snapd to re-exec in installer environment (the issues between snapd, overlayfs and apparmer that meant re-execing caused problems were fixed in snapd a long time ago). 2025-01-29 06:39:25 +13:00
Heinrich Schuchardt
0c5b7dfd0c riscv: correct installation path of dtbs
U-Boot with distroboot has:

efi_dtb_prefixes=/ /dtb/ /dtb/current/

So we should install the device-trees into dtb/ and not dtbs/ on the EFI
system partition.

Fixes: 365435ad2dbe ("riscv: copy device trees to the ESP")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-01-27 13:49:26 +01:00