2835 Commits

Author SHA1 Message Date
Dimitri John Ledkov
c69c79ea75
releasing package livecd-rootfs version 2.678 2.678 2020-07-27 17:38:35 +01: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
Robert C Jennings
9c52eaef60
Merge feature/initrdless-detection into ubuntu/master [a=davidkrauser] [r=rcj]
MP: https://code.launchpad.net/~davidkrauser/livecd-rootfs/+git/livecd-rootfs/+merge/387862
2020-07-23 14:01:06 -05: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
Robert C Jennings
2edabc31c2
releasing package livecd-rootfs version 2.677
* Avoid rbind /sys for chroot snap pre-seeding (cgroups fail to unmount)
2.677
2020-07-18 18:12:24 -05: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
b22d7dc38c
releasing package livecd-rootfs version 2.676 2.676 2020-07-18 01:18:18 +01: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
3694cf3f75
releasing package livecd-rootfs version 2.675 2.675 2020-07-17 21:19:57 +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
Steve Langasek
2513613002 releasing package livecd-rootfs version 2.674 2.674 2020-07-16 15:40:22 -07: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
Michael Hudson-Doyle
83ce5e32a8 releasing package livecd-rootfs version 2.673 2.673 2020-07-14 14:58:45 +12:00
Michael Hudson-Doyle
f277d1f355 update changelog 2020-07-14 14:57:16 +12:00
Joshua Powers
d542e8e4a0
functions: fix unbound variable 2020-07-13 13:05:43 -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
2.672
2020-07-10 07:48:22 -05:00
Dimitri John Ledkov
2976a99f29 Fix-up seeding snaps with tracks. 2.671 2020-07-10 01:56:10 +01:00
Dimitri John Ledkov
c60421ae57 releasing package livecd-rootfs version 2.670 2.670 2020-07-09 18:35:03 +01: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
5a4541b01e Add changelog entry for initramfs changes 2020-07-08 17:29:15 -04: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
Dimitri John Ledkov
4f11f40c96 releasing package livecd-rootfs version 2.669 2.669 2020-06-25 18:02:57 +01:00
Dimitri John Ledkov
1ff35cf438 chroot: disable amd64 codepath on riscv64 2020-06-24 16:08:31 +01:00
Dimitri John Ledkov
04c2fda36c releasing package livecd-rootfs version 2.668 2.668 2020-06-23 15:05:15 +01:00
Dimitri John Ledkov
90602e00de Merge branch 'empty-fstab-in-lxd' of git+ssh://git.launchpad.net/~rbalint/livecd-rootfs into ubuntu/master 2020-06-23 15:04:46 +01:00
Steve Langasek
05d219a319 add changelog entry for hyperv changes 2020-06-22 08:46:23 -07:00
Steve Langasek
4a02400dec Merge remote-tracking branch 'callmepk/hyper-v-fix' into ubuntu/master 2020-06-22 08:45:21 -07:00
Balint Reczey
f96e874ed1 Remove fstab from squashfs images
The default fstab is not valid, since squashfs does not support labels.

LP: #1877078
2020-06-16 22:14:59 +02:00
Łukasz 'sil2100' Zemczak
40103430d8 Enable overrides of UC20 grade dangerous channels 2020-05-25 19:11:22 +02:00
Philip Roche
60665a434b Revert of initramfs package removal in KVM image (LP: #1875400)
It was reported and confirmed in LP bug #1875400
(https://bugs.launchpad.net/cloud-images/+bug/1875400) that on the public
KVM cloud image there exists a large list of packages marked for auto-removal.

This should never be the case on a released cloud image.

These packages are marked for auto-removal because in the KVM image binary hook
we removed both initramfs-tools and busybox-initramfs packages. Due to package
dependencies this also removed:

busybox-initramfs* cloud-initramfs-copymods* cloud-initramfs-dyn-netconf*
cryptsetup-initramfs* initramfs-tools* initramfs-tools-core* multipath-tools*
overlayroot* sg3-utils-udev* ubuntu-server*

But it did not remove all the packages that the above list depended on.
This resulted in all those packages being marked for auto-removal because they
were not manually installed nor did they have any manually installed packages
that depended on them.

The removal of initramfs-tools and busybox-initramfs was to avoid the
generation of initramfs in images that should boot initramfsless.

This requirement is obsolete now because the initramfsless boot handling
is now handled via setting GRUB_FORCE_PARTUUID in /etc/default/grub.d/40-force-partuuid.cfg.

In test images I have verified that GRUB_FORCE_PARTUUID is set and that
boot speeds have not regressed.

LP: #1875400
2.667
2020-05-18 17:08:30 +01:00
Dimitri John Ledkov
9640e60515 releasing package livecd-rootfs version 2.666 2.666 2020-05-12 12:29:58 +01:00
Dimitri John Ledkov
dbf5b84bc8 Merge branch 'xnox/lxd-add-riscv64' of git+ssh://git.launchpad.net/livecd-rootfs into ubuntu/master 2020-05-12 12:28:56 +01:00
Dimitri John Ledkov
1979e61c36 Merge branch 'kpartx-fun' of git+ssh://git.launchpad.net/~mwhudson/livecd-rootfs/+git/livecd-rootfs into ubuntu/master 2020-05-12 12:19:32 +01:00
Dimitri John Ledkov
29b99b70ec Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/~rbalint/livecd-rootfs into ubuntu/master 2020-05-12 11:51:46 +01:00
Dimitri John Ledkov
bb9a7dd43e make-lxd-metadata: add riscv64 lxd architecture tag 2020-05-11 14:20:34 +01:00
Jinming Wu, Patrick
81b1cbbfc2
Add extra policy for xrdp session 2020-05-11 19:45:04 +08:00
Jinming Wu, Patrick
8d26a3036c
force to use systemwide config 2020-05-11 19:43:27 +08:00
Jinming Wu, Patrick
c9a2d8abad
Hyper-V: remove legacy option 2020-05-11 19:39:38 +08:00
Dimitri John Ledkov
b9177cfd59 Fixup indentation
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
2020-05-07 15:09:57 +01:00
Jinming Wu, Patrick
bc24ef964e
hyper-v enhanced mode fix: port change 2020-05-05 18:03:10 +08:00
Dimitri John Ledkov
3575edfb4d releasing package livecd-rootfs version 2.665 2.665 2020-05-01 20:00:13 +01:00