1674 Commits

Author SHA1 Message Date
Brian Murray
187f777718 Use default compat for qcow2 images.
This will cause images to be created with more moderm features which
will make our images faster and provide better sparse handling.
2022-07-22 09:57:42 -07:00
Łukasz 'sil2100' Zemczak
c5571b17a2 Merge branch 'int/alex/riscv_no_beaglev_container' of https://git.launchpad.net/~alexghiti/livecd-rootfs into ubuntu/master 2022-07-14 14:33:25 +02:00
Thomas Bechtold
aa1be5eaaa Revert "fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)"
This change triggered a bug in cloud-init (see LP:1968873). cloud-init
does not recongnize sshd options set in /etc/ssh/sshd_config.d/ and
cloud-init modifies directly /etc/ssh/sshd_config which gets then
overwritten by settings from /etc/ssh/sshd_config.d/ .

This reverts commit b54d24ff3310f7ace00ab08e0dacfdc89e026f1c.
2022-07-11 14:08:48 +02:00
Alexandre Ghiti
00f35ae9bf riscv: Use FK_FORCE_CONTAINER to force flash-kernel to run in a container
As explained in LP: #1980929, we need this in order to build RISC-V
images.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-11 12:47:16 +02:00
Alexandre Ghiti
7a1b5f67dd disk-image-uefi.binary: Fix wrong parenthesis
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-08 15:00:05 +02:00
Alexandre Ghiti
42b68d5d0f riscv: Bump image size to 4.5G
3.5G is not enough for riscv64 preinstalled as the creation of the initrd fails
with the following error:

Creating config file /etc/default/grub with new version
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-1011-generic
zstd: error 25 : Write error : No space left on device (cannot write compressed block)
E: mkinitramfs failure zstd -q -1 -T0 25
update-initramfs: failed for /boot/initrd.img-5.15.0-1011-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-05 11:40:24 +02:00
Alexandre Ghiti
74e9088bbc riscv: Use UEFI bootflow for the Nezha Board
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-05 11:40:24 +02:00
Alexandre Ghiti
6224b11fc0 riscv: Add support for StarFive VisionFive
The image created uses a UEFI bootflow, so we install grub for this board
only. We also need flash-kernel to install the dtb where grub can find
it.

This image is specifically architectured so that it can be installed on
a "factory" board, meaning using the u-boot firmware which was
originally implemented for Fedora, so we need the p3 partition that
embeds a uEnv.txt file to tell u-boot what/where to load next stage.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-05 11:40:24 +02:00
Alexandre Ghiti
be54b8b7a1 riscv: Fix nezha hardcoded password attempt
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-05 11:40:24 +02:00
Alexandre Ghiti
f751ff7218 RISC-V: enable building for Nezha board
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-07-05 11:40:24 +02:00
Heinrich Schuchardt
46711a9af6 riscv: define partitioning scheme for Nezha board
Define the image layout for the Nezha board.

The U-Boot SPL based boot0 may be installed starting in sector 16 or 256.
As sector 16 is incompatible with GPT partitioning use sector 256.

The primary U-Boot image is expected to start at sector 32800 and its
backup in sector 24576.

Cf. https://linux-sunxi.org/index.php?title=Allwinner_Nezha&oldid=24469

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-07-05 11:40:24 +02:00
Michael Hudson-Doyle
364e561308 Use the new iso-url= parameter in the bootloader configs in the netboot tarballs. 2022-06-30 14:36:47 +12:00
Utkarsh Gupta
cb099966b2 Merge remote-tracking branch 'simpoir/lp1970795-jammy-ova-cdrom' into ubuntu/master
* simpoir/lp1970795-jammy-ova-cdrom:
  fix: VMware cdrom OVF import requires to be on IDE
2022-06-29 13:30:26 +05:30
Thomas Bechtold
b54d24ff33 fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)
Modifying directly /etc/ssh/sshd_config creates "problems" when
upgrading eg. from Focal to Jammy because the upgrade will ask the
user what to do with the modified config. To avoid that, put the
custom configuration into /etc/ssh/sshd_config.d/ so the upgrade of
openssh-server can just replace /etc/ssh/sshd_config without asking
the user.
2022-06-28 14:21:56 +02:00
Simon Poirier
3da8e81bf2 fix: VMware cdrom OVF import requires to be on IDE
This reverts part of a change causing regression with vmware import due to the
cdrom getting moved to SCSI while shifting controller IDs. (LP: #1970795)
2022-06-11 13:17:48 -04:00
Utkarsh Gupta
a81bea1f0c Merge remote-tracking branch 'jchittum/jammy-vagrant-more-secure-private-key' into ubuntu/master
* jchittum/jammy-vagrant-more-secure-private-key:
  changelog update
  fix: move Vagrant 22.04+ to ephemeral ed25519 key
2022-05-28 01:08:27 +05:30
Michael Hudson-Doyle
fb589ecf00 Produce a tarball of artifacts for netbooting during live-server build. 2022-05-26 14:33:59 +12:00
Michael Hudson-Doyle
31937f1a4d auto/config: Emit error message to stderr in _sanitize_passes. 2022-05-25 21:26:00 +12:00
Michael Hudson-Doyle
ed38882219 auto/config: preserve germinate-output directory when removing config
Germinate doesn't take very long at all to run but downloading the
indices it operates on can take a while and nothing else in auto/config
does so not doing it every time you run "lb config" can be a real time
saver.

The code that invokes germinate already checked if the output was
already there but it was unconditionally deleted by the time control got
to that point.
2022-05-24 12:49:38 +12:00
John Chittum
5c8aa8447e
fix: move Vagrant 22.04+ to ephemeral ed25519 key
LP: 1969664 tracks an issue related to the deprecation of rsa+ssh on
Jammy+ openssh server, coupled with upstream vagrant bugs, that cause
Jammy vagrant images fail to bootstrap due to ssh negotiation issues.
Moving to a different key algo from the upstream insecure key matches
Jammy's expectations, and works with older vagrant versions.

vagrant >= 2.2.16 hosts are unaffected by the issue, as an upstream
change was made. This change keep compatibility with newer vagrant
versions as well.
2022-04-21 09:13:37 -05:00
Michał Sawicz
997fd08e62 Add arm64 buildd bootable image 2022-04-11 23:02:23 +05:30
Dimitri John Ledkov
97a4f58403
Merge branch 'hwe-22.04' of git+ssh://git.launchpad.net/~xnox/livecd-rootfs into ubuntu/master 2022-04-06 14:55:24 +01:00
Jean-Baptiste Lallement
dc1f2618b9 Create missing groups in chroot
netdev and admin where missing from the image after the build has been
separated from CPC

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2022-03-31 10:32:49 +02:00
Dimitri John Ledkov
e5443e3588
auto/config: upgrade from hwe-20.04 to hwe-22.04 variant. 2022-03-28 11:54:14 +01:00
Dimitri John Ledkov
461731d538
Merge branch 'rip-0c3.net' into ubuntu/master 2022-03-28 11:51:17 +01:00
Jean-Baptiste Lallement
28c360c0ab remove attributes not supported by WSL's tar
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2022-03-24 14:12:40 +01:00
Jean-Baptiste Lallement
c4cb3570a5 Readd ubuntu-cpc/wsl.binary hook
Readding this file per reviewer's request until CPC splits the
pipelines. Removing this file would make CPC image builds fail.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2022-03-21 12:19:30 +01:00
Jean-Baptiste Lallement
80ccea8d63 Separate WSL from CPC
Create a separate WSL image than CPC so it can be managed independently.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2022-03-17 10:11:39 +01:00
Thomas Bechtold
34735684d5 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.
2022-03-09 07:04:06 +01:00
Ivan Kapelyukhin
b40ce74fd6
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.
2022-03-03 15:44:01 +01:00
Dimitri John Ledkov
27e7780d70
auto/config: drop support for 0c3.net
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2022-02-24 10:10:01 +00:00
Łukasz 'sil2100' Zemczak
ef7a95ab82 Merge branch 'pi-desktop-one-gadget' of git+ssh://git.launchpad.net/livecd-rootfs into ubuntu/master 2022-02-23 16:19:57 +01:00
Łukasz 'sil2100' Zemczak
e4c846199b Following Dave's changes to the classic pi gadget, switch to using the classic branch for desktop images as well. 2022-02-22 11:33:26 +01:00
Dave Jones
4a4e2924c8 Tidy up fstab mods on preinstalled desktop images
The UNCONFIGURED FSTAB warning was being left in the result, the discard
option wasn't included, and the fsck flag was 0 (all in marked contrast
to the preinstalled server images).
2022-02-15 16:26:29 +00:00
Dave Jones
990b7c8a38 Generate the default swapfile on first boot
Changes in either livecd-rootfs or ubuntu-image seem to periodically
break the transfer of the pre-allocated swapfile (copying it in such a
fashion that it winds up "with holes" and thus unable to be used as a
swapfile). Rather than fight this, just use a simple systemd service to
generate the swapfile if it doesn't exist (using fallocate to keep
things snappy).
2022-02-15 16:26:29 +00:00
Ivan Kapelyukhin
50e32d93c0
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-14 13:10:04 +01:00
John Chittum
ce5dd6f411 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 13:53:23 -08:00
Brian Murray
16c1851a90 Add the casper package instead of the lupin-casper package as the installer for Windows is a project that is no longer supported and lupin is being removed the archive in LP: 1960457. 2022-02-10 11:42:59 -08:00
Thomas Bechtold
14a628e3c8 Disable APT periodic update for OCI/docker images
When cron-like services are installed in the OCI/docker image, APT
should not do periodic updates by default. LP: #1810451
2022-02-04 11:44:05 +01:00
Michael Hudson-Doyle
b2094f0319 Disable compression and "hash table hardening" for journald in the live installer environment as these features make the journal unreadable using the systemd libraries from 20.04 that are included in the subiquity snap. 2022-02-02 13:51:20 +13:00
Steve Langasek
5474af17df Remove references to archive.canonical.com, which is no longer used and should not be included in the default sources.list. 2022-01-27 14:32:09 -08:00
William Wilson
2312c08d26 Revert change for local builds as it is breaking autopkgtests 2022-01-12 18:19:57 -06:00
Steve Langasek
245f7772bd 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 16:32:51 -08:00
Steve Langasek
bcfad43fd4 We don't pipe grep to awk in this house, young man 2022-01-11 16:29:32 -08:00
Steve Langasek
0b4811f7a9 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 16:26:57 -08:00
Łukasz 'sil2100' Zemczak
6df425bb34 Merge branch 'umount' of https://git.launchpad.net/~xypron/livecd-rootfs into ubuntu/master 2021-12-16 12:40:11 +01:00
Łukasz 'sil2100' Zemczak
32b54e6242 Merge branch 'partalign' of https://git.launchpad.net/~xypron/livecd-rootfs into ubuntu/master 2021-12-16 12:25:05 +01:00
Brian Murray
fe662c5c8a Merge remote-tracking branch 'jessica-youjeong/111721-ubuntu-master-ova' into ubuntu/master 2021-12-15 10:06:54 -08:00
Heinrich Schuchardt
b6701e556f riscv64: ensure reasonable partition alignment
Currently the RISC-V preinstalled server images come with partitions that
are only 1 KiB aligned. Ext4 may use 4 KiB block size. The existing
misalignment leads to decreased performance.

Decrease the size of the loader2 partition by 34 512-byte blocks. This
results in 1 MiB alignment of the EFI and root partitions.

The remaining loader2 partition size of close to 4 MiB is still large
enough for U-Boot or a future EDK II.

Fixes: a808b28d47ec ("riscv64: build preinstalled riscv64 image with uboot SPL and CIDATA.")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-01 18:22:02 +01:00
Heinrich Schuchardt
d65af891f3 functions: fix unmounting for local builds
livecd-rootfs creates non-private mounts. When building locally using
the auto/build script unmounting fails.

To unmount dev/pts it is insufficient to make the mount private. Its
parents must be private too. Change teardown_mountpoint() accordingly.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-01 18:11:57 +01:00