16 Commits

Author SHA1 Message Date
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
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
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
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
Pat Viafore
0775862a25
Add mechanism to detect initrdless boot fallback
With this change, when we attempt to boot with an initramfs and fail,
initrdless_boot_fallback_triggered is set to non-zero in the grubenv.
This value can be checked after boot by looking in /boot/grub/grubenv
or by using the grub-editenv list command.

Addresses LP: #1870189
2021-02-18 15:47:20 -06:00
David Krauser
6a37833973
Boot with an initramfs by default in cloud images
Generic cloud images with the linux-generic kernel are not able to
boot without an initramfs. Previously, these images attempted to boot
without an initramfs, would fail, and then retry with an initramfs.
This slows the boot and is confusing behavior.
2021-02-18 15:40:42 -06:00
Dimitri John Ledkov
5c802316f2
esp: perform fsck.
LP: #1912835
(cherry picked from commit 53b28d5f58284657ee8efd08a633d557af1fcd97)
2021-02-09 00:50:46 +00:00
Dimitri John Ledkov
2646b9c459
esp: install grub in ubuntu bootloader id path, instead of removable.
Do not use removable uefi bootloader path in the cloud-images by
default, as that prevents upgrades of the bootloader.

LP: #1912830
(cherry picked from commit 7c760864fdcb278ca37396f06f5e3f297428d63d)
2021-02-09 00:50:38 +00:00
Dimitri John Ledkov
7680ece7b0
riscv64: backport HiFive unleashed & cloud-image building support
All commits are cherrypicks from hirsute, and includes:

make-lxd-metadata: add riscv64 lxd architecture tag
control: install qemu-utils & snapd on riscv64.
disk-image.binary: actually skip building MBR image on EFI platforms.
disk-image.binary: skip building MBR image on riscv64.
disk-image.binary: however still build MBR image on amd64.
disk-image-uefi.binary: build riscv64 image without a bootloader.
disk-image-uefi: riscv64 add u-boot spl
disk-image-uefi: riscv64 add ubuntu:ubuntu login, without expiry.
riscv64: build preinstalled riscv64 image with uboot SPL and CIDATA.
riscv64: fixup subarch build, unbound variable
qcow2-image: unbreak builds without subarch.
disk-image-uefi: fix riscv64 subarch user-data.

LP: #1903034
2021-01-15 17:06:44 +00:00
Joshua Powers
ef950f5214
amd64: always install grub-pc with shim-signed
shim-signed depends on grub-efi-amd64-signed, which in turn has
alternative depends on either `grub-efi-amd64 | grub-pc`. However to
support booting with either via shim&signed-grub and BIOS, the choice
must be made to install grub-pc, not grub-efi-amd64.

This makes images consistent with Ubuntu Deskop, Live Server, buildd
bootable images; all of which already do install grub-pc and
shim-signed.

Additionally, this will ensure that autoremove is run after installing
anything in the CPC build hooks. This is done to avoid shipping images
that include packages that are autoremovable. This will clean-up as
packages are installed and detect any breakage at build time.

LP: #1901906
2020-11-13 09:07:12 -08:00
David Krauser
0e3b1e206b
Add support for HyperV Gallery images 2019-06-11 23:26:07 -04:00
Robert C Jennings
0bfc5c4290
ubuntu-cpc: Fixup comment references to file names post-parallelization 2019-05-02 15:50:21 -05:00
Robert C Jennings
a45342f269
ubuntu-cpc: avoid duplicate snaps listed in qcow manifest
commit a993592 introduced an additional call to create_manifest
(and snap-seed-parse) to write binary/boot/filesystem.packages. This
caused duplicate snap lines in the qcow manifest. This is because the
live-build/auto/binary code assumes that after 'lb binary' is run the
filesystem.packages will only have debs and it calls snap-seed-parse to
add them to the file. The commit changed filesystem.packages in the
ubuntu-cpc uefi binary hook to include debs and snaps.

This patch keeps the intent of the prior patch, updating the
filesystem.packages file for the content of the uefi disk image, but
only writes a listing of debian packages to match the expected content
of filesystem.packages.  The snaps will still be added in generic code
in live-build/auto/build.
2019-03-29 15:39:47 -05:00
Tobias Koch
cbd4eb5717 Use series files with dependency handling to generate hook symlinks dynamically
This patch currently only applies to the "ubuntu-cpc" project.
          
More and more logic has been going into the hook scripts to decide under which conditions they should run or not. As we are moving to parallelized builds of image sets, this will get even more complicated. Base hooks will have to know which image sets they belong to and modification of the dependency chain between scripts will become more complicated and prone to errors, as the number of image sets grows.
            
This patch introduces explicit ordering and dependency handling for scripts through the use of `series` files and an explicit syntax for dependency specification.
2018-12-10 09:18:02 +01:00