154 Commits

Author SHA1 Message Date
Łukasz 'sil2100' Zemczak
8a9ba050c3 Make canary images default for Ubuntu. 2023-08-18 12:16:28 +02:00
Philip Roche
294a65452d fix: Ensure required dependencies are installed before trying grub-install (LP: #2031640)
As a result of not installing recommended packages the packages required to run `grub-install`
are no longer installed by default.

To ensure we can successfully run `grub-install` we install both `grub-pc` and `grub2-common`
packages.
2023-08-17 11:49:11 +01:00
Philip Roche
711c5c291f fix: Remove dangling symlink /boot/initrd.img.old if exists (LP: #2031640)
As a result of not installing recommended packages we have dangling symlink `/boot/initrd.img.old`

As per the preceding `/boot/initrd.img` cleanup. Cleanup of `/boot/initrd.img.old`
only happens if it is a dangling symlink.

These `rm` commands also have `--verbose` flags now to make it easier when debugging logs
2023-08-17 11:48:22 +01:00
Heinrich Schuchardt
fd75a28558 risc-v: increase loader 2 partition for VF2
EDK II is available for the StarFive VisionFive 2 board. As it is larger
than U-Boot we need to increase the size of the loader 2 partition to
accommodate it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-01 16:06:00 +02:00
Michael Hudson-Doyle
d3dfb12f85 Actually fix live-build/ubuntu-cpc/hooks.d/base/disk-image.binary to not call force_boot_without_initramfs on s390x rather than disk-image-uefi.binary which obviously would never run on s390x. 2023-07-29 13:02:56 +12:00
Michael Hudson-Doyle
37341541b4 live-build/ubuntu-cpc/hooks.d/base/disk-image.binary: Do not call force_boot_without_initramfs on s390x. 2023-07-29 07:34:35 +12:00
Michael Hudson-Doyle
c42f2ef3b1 live-build/ubuntu-cpc/hooks.d/base/disk-image-*.binary: Fix invocations of force_boot_without_initramfs to pass "mountpoint" and not "${mountpoint}" (which actually worked on most arches for VERY BAD reasons but fails on s390x). 2023-07-29 07:33:22 +12:00
Utkarsh Gupta
06defc4348 Use ubuntu-cloud-minimal metapackage in minimized CPC images
Now that we have the cloud-minimal seed for minimized cloud
image builds, we should drop all the workarounds and hacks
we once needed when we were using the server seed. We can
directly use the new metapackage and get rid of the tasks and
other autoremoves, et al.
2023-07-19 16:36:35 +05:30
Dimitri John Ledkov
c18d3f75ad
Fixup up two more places with kvm removal.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2023-07-14 13:16:05 +01:00
Dimitri John Ledkov
731a0b49e3
Merge remote-tracking branch 'origin/xnox/deprecate-kvm' into ubuntu/master 2023-07-14 00:24:36 +01:00
Gauthier Jolly
2929ff092e Revert "ubuntu-cpc: Make the ESP 2GiB and mount it to /boot"
Revert this change for now as /boot then becomes a FAT partition which
breaks DPKG requirements[1]. This change is going to be re-evaluated and
maybe introduced in a different way.

This is not a clean revert because of 3282efb ("ubuntu-cpc: cleanup
disk-images-uefi.binary") which we want to keep.

[1] https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_What_are_the_filesystem_requirements_by_dpkg.3F

This reverts commit 6a66666e0a5ab1ad96cb0e388f278aafbd012ffe.
2023-07-06 11:12:01 +02:00
Gauthier Jolly
a3307ebdb7 Revert "ubuntu-cpc: disable kernel and initramfs symlinks in /boot"
This reverts commit b20e894a9878837ed84f9db71997f68476d632b5.
2023-07-06 11:04:20 +02:00
Dimitri John Ledkov
dc59fe83ca Deprecate linux-kvm usage
Remove kvm-image altogether.

Previously for minimal image replace_kernel function replaced virtual
images with kvm, and called force_boot_without_initramfs. Now simply
call force_boot_without_initramfs for minimal image without replacing
kernel flavour.

This also means minimal images can now be built for arm64 and armhf.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2023-07-04 12:58:03 +01:00
Gauthier Jolly
3282efb287 ubuntu-cpc: cleanup disk-images-uefi.binary
Remove all the logic that is not related to cloud-images. Non
cloud-images should use disk-image-uefi-non-cloud.binary
2023-06-28 12:03:42 +02:00
Łukasz 'sil2100' Zemczak
99189cc727 Merge branch 'cpc/riscv/install_grub' of git+ssh://git.launchpad.net/~gjolly/livecd-rootfs into ubuntu/master 2023-06-28 10:45:13 +02:00
Łukasz 'sil2100' Zemczak
95d6a004a6 Some minor tweaks to the changes done by xypron. 2023-06-28 10:42:27 +02:00
Heinrich Schuchardt
e14379f405 RISC-V: use GRUB on Unmatched board
Up to now we have used u-boot-menu for preinstalled images for the SiFive
HiFive Unmatched and Unleashed boards and GRUB for all other RISC-V images.
The choice was made because RISC-V GRUB was not available when the SiFive
boards where released.

Let the Unmatched and Unleashed board preinstalled images use GRUB.
Simplify the code.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-27 14:02:37 +02:00
Gauthier Jolly
bbedffe6ec ubuntu-cpc: fix images for hardware devices
Canonical Public Cloud's project seems a bad place to build images for
hardware devices however this is how things were done a we now need to
maintain this.
The recent change to mount the ESP on /boot breaks those images, instead
of adding more hacky things in the hook, create a dedicated target for
those images and use a different hook to build UEFI images.
2023-06-23 13:55:59 +02:00
Gauthier Jolly
946c5cf90c ubuntu-cpc: install grub-efi on riscv images
grub-efi-riscv64 is in the archive and edk2 support for riscv is being
merged upstream.
2023-06-23 13:28:50 +02:00
Gauthier Jolly
b20e894a98 ubuntu-cpc: disable kernel and initramfs symlinks in /boot
This is required by the new UEFI binary hook as we mount the ESP on
/boot and the ESP filesystem doesn't support symlinks.
We keep symlinks for s390x images which do not use UEFI anyway.
2023-06-15 12:50:56 +02:00
Gauthier Jolly
6a66666e0a ubuntu-cpc: Make the ESP 2GiB and mount it to /boot
This is driven by online encryption scenarios. In order to efficiently
encrypt the root filesystem without modifying the partition layout, the
kernel should sit in an un-encrypted /boot partition.  Instead of
creating a new partition that would change the default partition layout,
we mount the ESP on /boot. We also need to then bind mount /boot on
/boot/efi because that's where Grub expects the ESP to be located.
2023-06-13 10:48:35 +02:00
Steve Langasek
6fac77b481 Revert "Revert "Revert "Revert the recent kpartx->losetup changes, as we need to put some other changes on top. Let's try to re-introduce this for MM."""
This reverts commit 1931bbcb194febe241aa82f03a6730ba82a84409.
2023-05-26 09:41:41 -07:00
Łukasz 'sil2100' Zemczak
1931bbcb19 Revert "Revert "Revert the recent kpartx->losetup changes, as we need to put some other changes on top. Let's try to re-introduce this for MM.""
This reverts commit ada1f09b39332ec828369e0a30f2870df5c4dc3e.
2023-05-24 11:06:56 +02:00
Steve Langasek
ada1f09b39 Revert "Revert the recent kpartx->losetup changes, as we need to put some other changes on top. Let's try to re-introduce this for MM."
This reverts commit 7b07db91110a3dda2723bc853a43f81c4e2a2f75.
2023-05-02 15:27:41 +02:00
Łukasz 'sil2100' Zemczak
7b07db9111 Revert the recent kpartx->losetup changes, as we need to put some other changes on top. Let's try to re-introduce this for MM. 2023-04-18 10:10:28 +01:00
Steve Langasek
1e0daf6af9 Clean up some remaining references to /dev/mapper. 2023-04-17 18:50:08 -07:00
John Chittum
c0af2ca443
fix: riscv64 efi conditional
missing a && between icicle and visionfive, led to /boot/efi still being
in place, and grub-install running instead of exiting the func.
fixes LP:2015750
2023-04-10 07:33:08 -05:00
Łukasz 'sil2100' Zemczak
4e49b4df60 Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into canary-build 2023-04-05 20:50:27 +02:00
Łukasz 'sil2100' Zemczak
11a583d619 Initial implementation of canary image builds. 2023-04-05 20:49:16 +02:00
Heinrich Schuchardt
d42c7c5989 Add image for StarFive VisionFive 2
SUBARCH=visionfive2 is used to build images for the StarFive VisionFive 2
boards. For the device-tree we assume board revision 1.3B.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-04-05 15:08:04 +02:00
Michael Hudson-Doyle
1ecd1320d6 Merge remote-tracking branch 'xypron/required_partition' into ubuntu/master 2023-02-27 21:47:54 +13:00
Dimitri John Ledkov
ef072ea77a
Merge branch 'tune2fs' of git+ssh://git.launchpad.net/livecd-rootfs into ubuntu/master 2023-02-24 12:01:43 +00:00
Heinrich Schuchardt
eea1308301 RISC-V: avoid soft lockup Radeon GPUs with u-boot-menu
For the SiFive HiFive Unmatched board we create a pre-installed image using
u-boot-menu. Increase the watchdog threshold in this case too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-02-13 22:05:22 +00:00
Heinrich Schuchardt
0924d50aee RISC-V: avoid soft lockup Radeon GPUs with GRUB
With Radeon GPUs and kernel 5.19 a soft lockup was observed.
Increase the watchdog threshold.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-02-10 20:55:11 +00:00
Heinrich Schuchardt
ee843c14de RISC-V: rename cmdline.cfg to 10_cmdline.cfg
Using numbered configuration fragments makes the order of application
easier to track

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-02-10 20:55:11 +00:00
Dimitri John Ledkov
dc3f8a6ea0
ubuntu-cpc: set default ext4 mount option commit=30
This allows to consolidate linux-kvm and linux-generic kernel
flavours. This brings the perfomance benefit of linux-kvm flavour to
all cloud and pre-installed images. It does trade data-safety.

LP: #2006511

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2023-02-07 20:58:53 +00:00
Heinrich Schuchardt
536cd09b73 riscv64: set attribute required partition for firmware
According to the EBBR specification the GPT partitions for firmware should
have attribute bit 0 (Required Partition) set.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-16 21:52:36 +01:00
Heinrich Schuchardt
71308d500b riscv64: adjust U-Boot installation for Nezha D1 and LicheeRV
Since version 2022.10 U-Boot SPL and U-Boot are installed onto the same partition.
Package nezha-boot0 is not needed anymore.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-09 11:52:44 +01:00
Heinrich Schuchardt
c6ad92c0f4 riscv64: use efi=debug earlycon
RISC-V boards tend to boot slowly.
We should provide progress information when booting.

Use 'efi=debug earlycon' on the Linux command line via new file
/etc/default/grub.d/cmdline.cfg.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-14 14:04:42 +01:00
Brian Murray
151f73e8b0 Finish the rename of FK_FORCE_CONTAINER into FK_FORCE. (LP: #1989194) 2022-10-17 13:01:45 -07:00
Łukasz 'sil2100' Zemczak
e8938fc610 Add an additional subdir. 2022-10-14 10:49:25 +02:00
Heinrich Schuchardt
b39824539c riscv: reduce initrd size for Nezha and LicheeRV boards
The Nezha and the LicheeRV boards do not have enough memory for an initrd
with most modules. Therefore the number of included modules has to be
reduced.

Create file /etc/initramfs-tools/conf.d/modules_list.conf
to set MODULES=list.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-13 08:05:47 +02:00
Heinrich Schuchardt
1555f5f46b riscv: remove invalid redirections
Remove redirections of type

    command &1>2

Executing the command in the background and creating and empty file '2'
was never intended.

As the messages are information only redirecting to stderr would not make
sense either.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-13 08:05:47 +02:00
Alexandre Ghiti
a752a99ad8 riscv: LicheeRV must use u-boot-nezha package
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-09-20 13:49:40 +02:00
Alexandre Ghiti
f68433098d riscv: Add support to build Microchip Icicle Kit image
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-09-20 13:49:40 +02:00
Alexandre Ghiti
e8ea6335d5 riscv: Add support to build LicheeRV Dock images
The LicheeRV Dock board comes with only 512MB of DRAM so the only difference
with a Nezha image is the fact that we have to remove
cryptsetup-initramfs package which makes the initrd too big for the
board to boot.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-09-20 13:49:39 +02:00
Ivan Kapelyukhin
76d794664a
Bump UEFI disk image size for amd64 to 3.5 GB
Current Kinetic GCE image builds are failing with the following error:

update-initramfs: Generating /boot/initrd.img-5.19.0-1004-gcp
zstd: error 25 : Write error : No space left on device (cannot write compressed block)
E: mkinitramfs failure zstd -q -1 -T0 25

Seems like after `linux-gcp` update from 5.15 to 5.19 `linux-modules` package
has gotten ~40MB larger and with that GCE image builds are over the edge wrt
available disk space in chroot.

Bumped up disk image size for amd64 to 3.5GB to match the sizes used by armhf
and generic images.
2022-09-14 22:30:54 +02:00
William Wilson
ee40e951f2 releasing package livecd-rootfs version 2.778 2022-09-14 10:16:52 -05:00
Thomas Bechtold
480d5b26ea fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)
The cloud-init bug (see LP:1968873) got fixed now so using a sshd
config snippet should work now.

This partly reverts commit aa1be5eaaa1fdbb4c31104cc49e54b15f66c3343
but uses now 60-cloudimg-settings.conf instead of
10-cloudimg-settings.conf .
2022-09-09 12:08:45 +02:00
Steve Langasek
239453d644 Remove modemmanager and udisks2 from cloud images in addition to fwupd. The use of tasks at install means all packages are marked manually installed in the apt database, so removing fwupd does not remove its dependencies. LP: #1981109. 2022-08-04 11:24:53 -07:00