1730 Commits

Author SHA1 Message Date
Łukasz 'sil2100' Zemczak
729e12c846 Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into pi-desktop-swapfile 2020-10-15 11:23:38 +02:00
Michael Hudson-Doyle
b677bdbcc6 Remove 68-del-part-nodes.rules from installer squashfs to work around it breaking curtin. (LP: #1893818) 2020-10-15 08:33:23 +13:00
Łukasz 'sil2100' Zemczak
1a8d6d203e Add creation of a 1GB swapfile for desktop pi images. 2020-10-14 15:09:34 +02:00
Łukasz 'sil2100' Zemczak
eda716902e For desktop-preinstalled we don't need cloud-image. 2020-10-07 17:04:08 +02:00
Łukasz 'sil2100' Zemczak
42b28cf70a Fix braces broken again. 2020-10-07 13:04:49 +02:00
Łukasz 'sil2100' Zemczak
7d524ffb98 Remove unneeded sedding. 2020-10-07 10:52:47 +02:00
Łukasz 'sil2100' Zemczak
99556c77ea Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into raspi-desktop-1 2020-10-07 10:49:32 +02:00
Łukasz 'sil2100' Zemczak
fdd8b1cba0 Use the right task name - ubuntu-desktop-raspi. 2020-10-07 10:49:03 +02:00
Łukasz 'sil2100' Zemczak
38157b3748 First batch of changes for raspi desktop. 2020-10-01 11:23:28 +02:00
John Chittum
1abc43a2d0
Remove virtualbox-guest-utils (LP: #1895862)
virtualbox-guest-utils kernel modules is included in linux-modules
starting in kernel 5.4.0-33 in focal-updates. The vagrant hook also
explicit installed virtualbox-guest-utils. An error occurred with the
version installed from the archives, however, with the inclusion in
linux-modules, there's no need to explicitly install
virtualbox-guest-utils. Removes the code for the explicit install.
2020-09-29 11:41:05 -05:00
Pat Viafore
78ced6b26e
Rename function to be shorter 2020-09-21 12:10:08 -05:00
Pat Viafore
32d5afc40a
Expose a variable for sources.list backup
MOUNTPOINT_BACKUP_SOURCE_LIST is exposed when you call
setup_mountpoint.  Consumers can use this variable if they need to
explicitly change something in sources.list wihout relying on the name
livecd-rootfs chooses.
2020-09-21 12:07:48 -05:00
Robert C Jennings
5190aff932
Ensure a binary hook has not changed the temporary sources.list 2020-09-21 12:07:47 -05:00
Robert C Jennings
5362e3a7e7
Use build env archive mirror in binary hooks 2020-09-21 12:07:47 -05:00
Robert C Jennings
2be2a168ee
ubuntu-cpc: Fix spelling in vagrant file 2020-09-16 08:48:28 -05:00
John Chittum
fb33fe9026
Minor fixes to Vagrantfile comments 2020-08-27 15:46:36 -05:00
John Chittum
cfd43992a8
Reorder comments to ensure clarity
Long history comment moved to the end with short clarifying comments
before the relevant code. Update changelog with proper attribution
2020-08-27 15:11:15 -05:00
John Chittum
c92e885303
ubuntu-cpc: Vagrant Serial to Null (LP: #1874453)
Original fix proposed by Stanislav German-Evtushenko (giner)

CPC Ubuntu cloud images default to enabling a serial console connection
via the kernel commandline option `console=ttyS0`. Many clouds support
the serial connection, and utilize it for debugging purposes. Virtualbox
supports the serial connection as well. In Bionic and earlier images,
Vagrant boxes created a serial log file in the directory of the
Vagrantfile by default. However this is not standard behaviour for
Vagrant images, and so it was removed in Eoan onwards.

Starting in Eoan, there were reports of image booting slowdown (1874453
is a single example). After testing, it was determined that the serial
connection starting, without a device attached, was the cause of the
slow down. However, we did not want to revert to the old functionality
of creating a file. Much thanks to <giner> for providing the Ruby syntax
for sending to File::NULL.

This option will not create a local file, however, the default
Vagrantfile configuration is overwritable via a users Vagrantfile. The
original syntax for creating a file local to the users Vagrantfile has
been included as an example.
2020-08-27 14:37:40 -05:00
Stanislav German-Evtushenko
b0144d3018
vagrant: Use dummy file for the console output
Links:
- https://bugs.launchpad.net/cloud-images/+bug/1874453
2020-08-27 14:36:22 -05:00
Steve Langasek
37f5f8881f Revert "Revert "Remove fstab from squashfs images""
This reverts commit d9de2701897608710ed97e206ee29f28af8cc82a.
2020-08-27 12:17:22 -07:00
Robert C Jennings
2844aa530d
Revert ubuntu-cpc: Disable boot splash
These introduced a regression for ppc64el and needs more time to bake.
This reverts commits 1deb0c68e8be6b06190402e32292c3c55134eee2 &
6dbb30f53bd3f2086021abdecaee04645c9ccda0.

 * "ubuntu-cpc: Fix ppc64el grub console update"
 * "ubuntu-cpc: Disable boot splash in all cloud images (LP: #1725358)"
2020-08-12 16:49:41 -05:00
Robert C Jennings
1deb0c68e8
ubuntu-cpc: Fix ppc64el grub console update
The commit 6dbb30f5 (2.682) which disabled boot splash for all cloud
images introduced an error in the ppc64el hook.  This patch corrects the
name of the variable that contains grub console overrides.  The error
seen during testing was
 'disk-image-ppc64el.binary: line 44: CONSOLES: unbound variable'
and this was due to a typo.
2020-08-12 13:48:03 -05:00
Steve Langasek
d9de270189 Revert "Remove fstab from squashfs images"
This reverts commit f96e874ed12e7e080111d27aa14c4f97aa6bec87.
2020-08-12 11:35:06 -07:00
Robert C Jennings
6dbb30f53b
ubuntu-cpc: Disable boot splash in all cloud images (LP: #1725358)
When trying to debug an issue on ARM64 it was reported that it was
quite difficult to debug because of control codes on the console from
the splash.

For cloud image there is a chroot customization the drops 'quiet splash'
but this is only applied to amd64.  It hasn't made it into other
architectures because they don't have grub by default in the chroot.
However, when we get into binary hook for the uefi disk image and it's
derivatives grub is installed and this includes architectures that were
skipped in the chroot hook.

This patch changes the cpc-fixes chroot hook to add a cloud-images
grub config with basic overrides, including dropping the boot splash,
for all architectures.  For images that never get grub installed this
addition is harmless and small while ensuring that the grub experience
is consistent for images that have grub.  The configuration of console
devices as hard-coded remains arch specific.
2020-08-12 04:50:36 -05:00
Steve Langasek
9348a2e9cb Merge remote-tracking branch 'callmepk/ubuntu/master' into ubuntu/master 2020-08-10 14:52:07 -07:00
Steve Langasek
e1c745e193 Merge remote-tracking branch 'codyshepherd/bootable-buildd/dist-upgrade/groovy' into ubuntu/master 2020-08-04 12:29:52 -07:00
Robert C Jennings
e3dce0ab17
Handle seeded lxd snap with channel name for ubuntu-cpc:minimized
The seed now specifies the lxd snap in focal as
'lxd=4.0/stable/ubuntu-20.04' which doesn't match the expectations of
the code with looks for lxd as the only snap in the seed for minimized
images.  This patch updates the pattern to accept 'lxd' or 'lxd=*'.
2020-07-29 14:56:26 -05:00
Dimitri John Ledkov
4d4f113f42
functions: provide nss_systemd-less nsswitch.conf in chroots. 2020-07-24 21:03:55 +01:00
Dimitri John Ledkov
109e6c6613
auto/build: use setup|teardown_mountpoint to reduce duplication 2020-07-24 20:59:57 +01:00
David Krauser
83499f1a95 Add mechanism to detect initrdless boot fallback
In v2.672 the default boot behavior of cloud images changed:

- Prior to v2.672, cloud images with the linux-generic kernel attempt
  to boot without an initramfs, would fail, and then retry with an
  initramfs.

- After v2.672, cloud images with the linux-generic kernel boot with
  an initramfs on the first try.

While the behavior is different between the two, they both result in
an instance that has booted with an initramfs. To ensure the changes
in v2.672 do not regress, we need an automated way to check if we are
attempting to boot without an initramfs and failing.

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.
2020-07-22 16:41:10 -04:00
Jinming Wu, Patrick
afda365565
Additional fixes for Hyper-V builds
use of linux-azure, which is the optimized kernel for Hyper-V by
Microsoft
2020-07-22 17:27:03 +08:00
Robert C Jennings
84397b5098
Avoid rbind /sys for chroot snap pre-seeding (cgroups fail to unmount)
Builds in LP with the Xenial kernel were happy with the recursive mount of
/sys inside the chroot while performing snap-preseeding but autopkgtests
with the groovy kernel failed.  With the groovy kernel the build was
unable to unmount sys/kernel/slab/*/cgroup/* (Operation not permitted).

This patch mounts /sys and /sys/kernel/security in the chroot in the
same way we've added for binary hooks.  This provides the paths under
/sys needed for snap-preseed while avoiding issues unmounting other
paths.
2020-07-18 16:52:18 -05:00
Dimitri John Ledkov
b14f79ce2e
apparmor: compile all profiles 2020-07-18 00:45:26 +01:00
Dimitri John Ledkov
31861fd40d
seccomp: mount more up-to-date seccomp features 2020-07-18 00:24:16 +01:00
Dimitri John Ledkov
bc4d32a422
seccomp: add more up-to-date seccomp actions 2020-07-18 00:20:42 +01:00
Dimitri John Ledkov
a14a31b751
apparmor: mount more up-to-date apparmor features in the chroot. 2020-07-18 00:20:41 +01:00
Dimitri John Ledkov
37be000f39
apparmor: Add generic v5.4 kernel apparmor features 2020-07-17 23:42:53 +01:00
Dimitri John Ledkov
6e6ab16bf2
live-server: remove duplicate snaps, due to overlayfs vs snap-preseed. 2020-07-17 21:17:34 +01:00
Robert C Jennings
1ca11c9795
Apply snap-preseed optimizations after seeding snaps
The snap-preseed command can do a number of things during the build
that are currently performed at first boot (apparmor profiles, systemd
unit generation, etc).  This patch adds a call to reset the seeding and
apply these optimizations when adding a seeded snap.  As a prerequisite
to calling snap-preseed we need to make /dev/mem available as well as
mounts from the host to perform this work, so those are also added here.
2020-07-17 21:17:33 +01:00
David Krauser
4c504f6781 Fix broken minimal cloud image boot on amd64
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.
2020-07-16 17:25:46 -04:00
Joshua Powers
d542e8e4a0
functions: fix unbound variable 2020-07-13 13:05:43 -07:00
Cody Shepherd
7ad64297f7
Remove explicit install of grub-efi-* package as it is not necessary,
and potentially overexplicit
2020-07-13 09:10:50 -07:00
Robert C Jennings
a6a7be7c18
Release package livecd-rootfs version 2.672
* Boot with an initramfs by default in cloud images, except when using a non-generic kernel.
   MP: https://code.launchpad.net/~davidkrauser/livecd-rootfs/+git/livecd-rootfs/+merge/386913
2020-07-10 07:48:22 -05:00
Dimitri John Ledkov
2976a99f29 Fix-up seeding snaps with tracks. 2020-07-10 01:56:10 +01:00
Cody Shepherd
5136ee4104
Perform a dist-upgrade prior to installing packages for bootable-buildd
image in order to pull in package updates
2020-07-09 13:00:04 -07:00
Dimitri John Ledkov
bdec14015c Merge branch 'snap-preseed-channel-specification' of git+ssh://git.launchpad.net/~xnox/livecd-rootfs into ubuntu/master 2020-07-09 18:34:31 +01:00
Dimitri John Ledkov
7bae9201d2 snap_preseed: support channel specification with snap name
snap_name[/classic]=track/risk/branch is now the supported snap name
specification, which allows to specify the full default track and
optional classic confinemnt.

Supporting such specification in the seedtext allows one to specify a
better default channel. For example, this will allow lxd to switch
from latest/stable/ubuntu-20.04 to 4.0/stable/ubuntu-20.04 as 4.0 is
the LTS track matching 20.04 support timeframe.

LP: #1882374
2020-07-09 18:32:10 +01:00
David Krauser
e8e3e6760f Drop hack in kvm image that forces initramfs-less boot
Since the kvm image now boots without an initramfs by default, we
don't need to force it in the build hook.
2020-07-08 17:29:15 -04:00
David Krauser
8a2cdec470 Boot without an initramfs by default if running a custom kernel
Initramfs-less boot, which is a boot optimization, should only be
applied where we know it could work for users and provide an improved
boot boot experience; images with custom kernels are candidates for
that.
2020-07-08 17:26:50 -04:00
David Krauser
1ca1330eae 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.
2020-07-08 17:13:49 -04:00