From 21ba34542ddc75681c181bc084cca445cb8b188f Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 6 Jan 2021 14:12:35 +0000 Subject: [PATCH] doc: Update documentation to note removal of pollinate package Also update to include a simple version number in the image name. See: #2113 Signed-off-by: Rob Bradford --- docs/custom-image.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/custom-image.md b/docs/custom-image.md index ac8c7e490..734d6f93a 100644 --- a/docs/custom-image.md +++ b/docs/custom-image.md @@ -81,16 +81,24 @@ apt update apt install fio iperf iperf3 socat ``` -### Remove snapd +### Remove counterproductive packages + +* snapd: This prevents snapd from trying to mount squashfs filesystem when the kernel might not support it. This might be the case when the image is used with direct kernel boot. This step is specific to Ubuntu distributions. +* pollinate: + +Remove this package which can fail and lead to the SSH daemon failing to start. +See #2113 for details. + ```bash -apt remove --purge snapd +apt remove --purge snapd pollinate ``` + ### Cleanup the image Leave no trace in the image before unmounting its content. @@ -108,15 +116,18 @@ umount /mnt Renaming is important to identify this is a modified image. ```bash -mv focal-server-cloudimg-amd64.raw focal-server-cloudimg-amd64-custom.raw +mv focal-server-cloudimg-amd64.raw focal-server-cloudimg-amd64-custom-$(date "+%Y%m%d")-0.raw ``` +The `-0` is the revision and is only necessary to change if multiple images are +updated on the same day. + ### Create QCOW2 from RAW Last step is to create the QCOW2 image back from the modified image. ```bash -qemu-img convert -p -f raw -O qcow2 focal-server-cloudimg-amd64-custom.raw focal-server-cloudimg-amd64-custom.qcow2 +qemu-img convert -p -f raw -O qcow2 focal-server-cloudimg-amd64-custom-$(date "+%Y%m%d")-0.raw focal-server-cloudimg-amd64-custom-$(date "+%Y%m%d")-0.qcow2 ``` ## Switch CI to use the new image @@ -134,3 +145,5 @@ Last step is about updating the integration tests to work with this new image. The key point is to identify where the Linux filesystem partition is located, as we might need to update the direct kernel boot command line, replacing `/dev/vda1` with the appropriate partition number. + +Update all references to the previous image name to the new one.