1514 Commits

Author SHA1 Message Date
Steve Langasek
e55a349683 Drop use of --removable flag to grub-install from buildd/hooks
This now matches the cloud images (7c760864fdcb278ca37396f06f5e3f297428d63d)
fixing bootloader updates in the buildd images, but also fixing
compatibility with using devtmpfs for losetup.
2023-05-19 00:06:20 -07:00
Simon Poirier
9fd491886e fix: Bump armhf to 3.5G in disk-image-uefi (LP: #2011739)
This increase should cover the growth of packages, notably linux-firmware.
2023-03-21 09:26:49 -04:00
Łukasz 'sil2100' Zemczak
9d18e5d2e3 Backport hack from jammy for fixing offline installs. 2023-03-16 14:04:25 +01:00
Utkarsh Gupta
8be7e4ff50 Clean up whitespaces 2022-12-12 15:34:38 +05:30
Samir Akarioh
aa1c6d9e19 feat: Add metadata on ubuntu-oci image
Add a file build.info on etc/cloud
with the serial information

Signed-off-by: Samir Akarioh <samir.akarioh@canonical.com>
(cherry picked from commit 105acdebc783291f740294b5c317f3e6d2da9de4)
2022-11-22 12:21:40 +01:00
Michał Sawicz
0b01d8451c
Add arm64 buildd bootable image
(cherry picked from commit 997fd08e628219a277c0e67a9af5bf7dc0031c7f)
2022-07-18 10:23:53 -05:00
Utkarsh Gupta
fded2787e5 Merge remote-tracking branch 'ikapelyukhin/focal-backport-arm64-secureboot' into ubuntu/focal
* ikapelyukhin/focal-backport-arm64-secureboot:
  Update debian/changelog
  disk-image-uefi.binary: enable secureboot on the arm64 image.
2022-07-04 13:50:09 +05:30
Dimitri John Ledkov
c8dd849261
disk-image-uefi.binary: enable secureboot on the arm64 image.
(cherry picked from commit 122364df65ad4ecf768b6a488058bf37a023ab55)
2022-06-29 07:22:22 +02:00
Łukasz 'sil2100' Zemczak
e1d51ec263 Adjust the PROJECT name in the live-server hooks for SUBARCH. 2022-06-10 17:53:21 +02:00
Łukasz 'sil2100' Zemczak
7410fc4a3e Additional changes were needed for the server-live hooks, since those were exiting early for SUBARCH images. 2022-06-10 16:46:10 +02:00
Łukasz 'sil2100' Zemczak
f59dad4ce9 Some missing pieces. 2022-06-10 12:18:42 +02:00
Łukasz 'sil2100' Zemczak
8b0cd96803 Add intel-iot server images, build intel-iot with the 5.15 kernel. 2022-06-09 16:52:08 +02:00
Utkarsh Gupta
55dad01adc Merge remote-tracking branch 'toabctl/focal-backport-optional-allow-core-snaps' into ubuntu/focal
* toabctl/focal-backport-optional-allow-core-snaps:
  Update debian/changelog
  Allow to install core snap optionally
2022-03-10 14:51:51 +05:30
Thomas Bechtold
edc244249a Allow to install core snap optionally
Commit 245f7772bdb74 added code to abort the build if a snap wants to
install "core" (the 16.04 runtime). That's great but there are still
some CPC maintained image builds that use snaps based on "core". So
make it possible to continue the build if the "ALLOW_CORE_SNAP" env
variable is set.

(cherry picked from commit 34735684d5208981b2413047f67ee4c363d718d8)
2022-03-09 10:48:08 +01:00
Ivan Kapelyukhin
e64406f4f8
perf(cpc): split disk-image-uefi out of disk-image series file
Due to how `disk-image` file is structured, it builds BIOS and UEFI
images at the same time. However, certain images (e.g., GCE images)
require only UEFI image to be built, BIOS image is being simply
discarded. This results in longer build times.

Splitting out `disk-image-uefi` would allow images to use it instead of
`disk-image` and thus avoid building unused BIOS images.

`disk-image` now depends on `disk-image-uefi` for backward
compatibility.

(cherry picked from commit b40ce74fd67bbaa7f9ec94463d8da759724f9fec)
2022-03-03 15:57:11 +01:00
Ivan Kapelyukhin
9eb9d89a60
fix: unset initrdless_boot_fallback_triggered instead of setting it to 0
This fixes GCE shielded VM instances integrity monitoring failures on
focal and later. Our images are built with an empty /boot/grub/grubenv
file, however after the first boot `initrdless_boot_fallback_triggered`
is set to 0. This change in `grubenv` results in integrity monitoring
`lateBootReportEvent` error.

It seems that the only thing that's checking for this `grubenv` variable
is `grub-common.service`, and it is looking specifically for a `1`
value:

  if grub-editenv /boot/grub/grubenv list | grep -q
  initrdless_boot_fallback_triggered=1; then echo "grub:
  GRUB_FORCE_PARTUUID set, initrdless boot paniced, fallback triggered.";
  fi

Unsetting this variable instead of setting it to 0 would prevent issues
with integrity monitoring.
2022-02-22 07:06:07 +01:00
Łukasz 'sil2100' Zemczak
fe5576194e Use the classic gadget for raspi images 2022-02-15 19:43:50 +01:00
John Chittum
0fbafa9dbe Add sleep to workaround e2fsck errors
LP: 1960537 illustrates an issue where the calls to e2fsck in the
umount_partition call are failing due to an open file handle. At this
time, we are unable to find a root cause, and it's causing many builds
to fail for CPC. Adding a sleep 30 as a workaround as the file handle
releases within  that timeframe. This does not address root cause.
2022-02-10 15:39:25 -08:00
Steve Langasek
bf889e33e4 Treat it as a fatal error if we are asked to install a snap that would pull in the core snap. Ubuntu 20.04 and Ubuntu 22.04 official images should never require snaps that depend on an Ubuntu 16.04 runtime, this indicates a misconfiguration that will bloat the install. 2022-01-11 19:26:38 -08:00
Steve Langasek
83953bd041 We don't pipe grep to awk in this house, young man 2022-01-11 19:26:31 -08:00
Steve Langasek
dc629f4114 Do not look for a base snap on snaps of type base, because recursive dependencies are not allowed for snaps. LP: #1957123. 2022-01-11 19:26:27 -08:00
Michael Hudson-Doyle
f274748101 live-build/ubuntu-server/hooks/032-installer-squashfs.binary: be more careful in deleting snaps that snap-preseed has copied up into the live installer layer. (LP: #1952093) 2021-11-25 13:28:52 +13:00
Brian Murray
8288552dea Add the capability to build an ISO image for the Intel IoT project. Additionally, stop using universe with the project given that the kernel is now in main. 2021-11-16 17:17:54 -08:00
Łukasz 'sil2100' Zemczak
d9f7f2ec38 Whitespace fix 2021-10-29 17:13:15 +02:00
Łukasz 'sil2100' Zemczak
4131dad0da Fix rootfs resize and a grub2 font warning. 2021-10-29 15:34:53 +02:00
Brian Murray
6872371dc6 fix a typo in 099-ubuntu-image-customization.chroot 2021-10-28 11:11:45 -07:00
Łukasz 'sil2100' Zemczak
60ade114c4 Sneak in a small fix for a (currently) unused use-case. 2021-10-28 18:11:44 +02:00
Łukasz 'sil2100' Zemczak
498b83fe59 Add the 099-ubuntu-image-customization.chroot hook for desktop-preinstalled similarly to what we have in groovy+ for the pi desktop, but improved for amd64 platforms. We use it to generate a valid grub.cfg on the rootfs (similar to ubuntu-cpc) 2021-10-28 17:21:39 +02:00
Dimitri John Ledkov
efd0641f6c magic-proxy: replace http.client with urllib calls
Initialize passwords from sources.list.
Use urllib everywhere.
This way authentication is added to all the required requests.
And incoming headers, are passed to the outgoing requests.
And all the response headers, are passed to the original client.
And all the TCP & HTTP errors are passed back to the client.
Thus should avoiding hanging requests upon failure.
Also rewrite the URI when requesting things.
This allows to use private-ppa.buildd outside of launchpad.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
(cherry picked from commit dc2a472871907bbed3ab89d2a46d924ece80d514)
2021-09-28 13:48:45 +02:00
Dimitri John Ledkov
3d65dbb767 Change iptables calls, to query rules and quickly check that connectivity works after transparent proxy has been installed. LP: #1917920
(cherry picked from commit 1cd8fe14b70e98220c519d679217737672ee9019)
2021-09-28 13:48:41 +02:00
Jason C. McDonald
1c66b45338 Generate manifest for HyperV desktop images
Manifests are necessary for candidate checking in the
CPC automated workflow for building and publishing
HyperV desktop images. (#1940136)
2021-08-20 09:14:22 -07:00
Łukasz 'sil2100' Zemczak
4cf38c5151 Some more changes needed for enabling official intel-iot image builds. 2021-08-16 13:04:25 +02:00
Łukasz 'sil2100' Zemczak
44148c60a5 One more fix for intel-iot. 2021-08-12 13:45:35 +02:00
Łukasz 'sil2100' Zemczak
977c1cf74b A small fix for intel-iot 2021-08-04 17:35:11 +02:00
Łukasz 'sil2100' Zemczak
0b56fd53fe Revert /dev sharing improvements. 2021-08-02 22:13:43 +02:00
Łukasz 'sil2100' Zemczak
c3ebdc6f66 Backport fix for LP: #1938414 2021-07-29 11:06:53 +02:00
Łukasz 'sil2100' Zemczak
6568c5fa29 Merge branch 'ubuntu/focal' of git+ssh://git.launchpad.net/livecd-rootfs into bdmurray/focal-intel-iot 2021-07-29 10:31:38 +02:00
Brian Murray
6fac135f23 fix an extraneous || 2021-07-28 14:34:54 -07:00
Brian Murray
4b3f3c52dc add missing semicolons 2021-07-28 13:48:09 -07:00
Brian Murray
69afe8fd5d Add support for creating images (ubuntu-core and classic) with a kernel optimized for Intel IoT devices. (LP: #1938338) 2021-07-28 13:37:31 -07:00
Michael Hudson-Doyle
c27dbda4ca backport some system unit & cloud-init config changes from devel:
* Simplify how the subiquity client is run on the serial console in the live
  server environment, breaking a unit cycle that sometimes prevents
  subiquity from starting up at all. (LP: #1888497)
* Do not set the password for the installer user via cloud-init as subiquity
  can now do this itself. (LP: #1933523)
2021-07-23 12:07:26 +12:00
Dimitri John Ledkov
acb4de3be0 Cherry-pick 4428dbbf8f998c138093e3208bc7a0e7034714be
riscv64: generalise slightly how preinstalled server images are built, to allow using subarch to pick u-boot binaries to install.
2021-06-15 13:30:29 +02:00
Jean-Baptiste Lallement
fee8ba22f4 Added hook for AD support
Adding dependencies for Active Directory support to workaround LP: #1921862

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-05-21 16:56:38 +02:00
Steve Langasek
b558c86764 Merge remote-tracking branch 'codyshepherd/buildd/hide-grub-menu-ff' into ubuntu/focal 2021-05-20 17:06:44 -07:00
Thomas Bechtold
99add26dc3
add configure_oci function and use it in ubuntu-oci
With that, the Dockerfile modifications[0] currently done externally
are done now here. That means that the created rootfs tarball can be
directly used within a Dockerfile to create a container from scratch:

FROM scratch
ADD livecd.ubuntu-oci.rootfs.tar.gz /
CMD ["/bin/bash"]

[0]
https://github.com/tianon/docker-brew-ubuntu-core/blob/master/update.sh

(cherry picked from commit a81972a58b004897bf3e5c14ff371bc2f6b5e4b8)
2021-04-30 14:02:59 +02:00
Thomas Bechtold
9e15d88f4c
Add new ubuntu-oci project
This is a copy of the ubuntu-base project.
Currently ubuntu-base is used as a base for the docker/OCI container
images. The rootfs tarball that is created with ubuntu-base is
published under [0]. That tarball is used in the FROM statement of the
Dockerfile as base and then a couple of modifications are done inside
of the Dockerfile[1].
The ubuntu-oci project will include the changes that are currently
done in the Dockerfile. With that:

1) a Dockerfile using that tarball will be just a 2 line thing:

   FROM scratch
   ADD ubuntu-hirsute-core-cloudimg-amd64-root.tar.gz /
   CMD ["/bin/bash"]

2) Ubuntu has the full control about the build process of the
docker/OCI container. No external sources (like [1]) need to be
modified anymore.
3) Ubuntu can publish containers without depending on the official
dockerhub containers[2]. Currently the containers for the AWS ECR
registry[3] use as a base[4] the official dockerhub containers. That's
no longer needed because a container just needs a Dockerfile described
in 1)

When the ubuntu-oci project has the modifications from [1] included,
we'll also update [1] to use the ubuntu-oci rootfs tarball as a base
and drop the modifications done at [1].

Note: Creating a new ubuntu-oci project instead of using ubuntu-base
will make sure that we don't break users who are currently using
ubuntu-base rootfs tarballs for doing their own thing.

[0] https://partner-images.canonical.com/core/
[1]
https://github.com/tianon/docker-brew-ubuntu-core/blob/master/update.sh
[2] https://hub.docker.com/_/ubuntu
[3] https://gallery.ecr.aws/ubuntu/ubuntu
[4]
https://launchpad.net/~ubuntu-docker-images/ubuntu-docker-images/+oci/ubuntu/+recipe/ubuntu-20.04

(cherry picked from commit ac4a95b9314cf1f8ce01f42016c271c0a6078372)
2021-04-30 14:02:59 +02:00
Robert C Jennings
1a43fa5937
Merge remote-tracking branch 'gjolly/consistent_fstab-focal' into ubuntu/focal 2021-04-10 05:19:52 -05:00
David Krauser
597d678e17
Fix broken minimal cloud image boot on amd64 (LP: #1920043)
I recently pulled initramfs logic out of the base build hook, and
dropped that into the `replace_kernel` function. Any cloud image that
does not leverage the generic virtual kernel was expected to call
`replace_kernel` to pull in a custom kernel. That function will
disable initramfs boot for images that use a custom kernel.

Minimal cloud images on amd64 use the linux-kvm kernel, but the build
hook does not utilize the `replace_kernel` function. Instead, the
kernel flavor is set in `auto/config`. I pulled that logic out of
`auto/config` and am now calling `replace_kernel` in the build hook.

I also moved a call to generate the package list so that it will pick
up the change to the linux-kvm kernel.
2021-03-22 10:26:06 -05:00
Gauthier Jolly
330720f686
ubuntu-cpc: secure esp mountpoint (LP: #1881006)
Change mount option for ubuntu-cpc images from "defaults" to
"umask=0077". ESP partitions might contain sensitive data and
non-root users shouldn't have read access on it.
2021-03-18 10:10:43 +00:00
Cody Shepherd
69bb7fc4a1
Install lxd-agent-loader in bootable buildd image to improve user
experience with lxd vms
2021-03-01 09:04:26 -08:00