0

I created a tutorial quite a while ago for easily deploying Debian 12 from the provided qcow2 images that are provided here: https://cloud.debian.org/images/cloud/bookworm/latest/. Unfortunately, I could only get it to work with the generic one, rather than the genericcloud. I thought this would "resolve itself" with an update after some time, but it appears this is not the case, as it is still happening today.

The issue one gets when running the cloud-init setup against the genericcloud image is shown in the following output during deployment:

Begin: Running /scripts/local-bottom ... GROWROOT: /sbin/growpart: 824: /sbin/growpart: grep: not found
GPT PMBR size mismatch (4194303 != 25165823) will be corrected by write.
The backup GPT table is not on the end of the device.
/sbin/growpart: 853: /sbin/growpart: sed: not found
WARN: unknown label
/sbin/growpart: 354: /sbin/growpart: sed: not found
FAILED: sed failed on dump output 
/sbin/growpart: 83: /sbin/growpart: rm: not found
done.

A screenshot of the errror in the output is provided below just in case that helps:

enter image description here

My cloud-init file (redacted) that I created the cloud init ISO from is shown below:

#cloud-config
hostname: template-debian-12-cloud
manage_etc_hosts: false
ssh_pwauth: false
disable_root: true
users:
- name: programster
  hashed_passwd: $6$rounds=4096$dfdfdfdsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXBB14i0
  sudo: ALL=(ALL) NOPASSWD:ALL
  shell: /bin/bash
  lock-passwd: false
  ssh_authorized_keys:
  - ssh-rsa AAAAB3NzaCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=
    2024-programster

Does anyone know a way to work around this issue? Perhaps I need to add/remove something from my cloud init config, or I need to not expand the qcow2 image before performing the deployment? I generally find that I need to perform this expansion in case one wishes to add additional packages to the cloud-init installation, such as Docker, as it is sometimes the case that the provided filesystem is so small, that the setup will fail as there isn't enough room without the expansion.

Failed Attempt To Workaround

I did try adding the following to the bottom of my cloud-init.cfg before re-creating the ISO, but that didn't fix the issue:

growpart:
  mode: off
  devices: ['/']
  ignore_growroot_disabled: false

Potentially Related Debian Bug Report

It looks like this bug was reported in this bug report logs post, so hopefully it will eventually get fixed, but I'm hoping there is a workaround someone knows about?

1 Answer 1

1

The package containing the failing script seems to be cloud-initramfs-growroot, and it actually has a more specific bug report for this issue, with a patch attached.

I am seeing the same issue on my systems after debian12 upgrade and found that either declaring the dependency with copy_exec or installing busybox fixes this issue.

We had to add following lines to get it working again:

# in /usr/share/initramfs-tools/hooks/growroot:
copy_exec /usr/bin/grep /bin
copy_exec /usr/bin/sed /bin
copy_exec /usr/bin/rm /bin
copy_exec /usr/bin/awk /bin

... and then, obviously, rebuild the initramfs file with update-initramfs -u.

If you read the bug report, it seems that a Debian maintainer apparently mistyped something and caused a fix to another bug be marked as a fix to this bug, which seems to have delayed things until the mixup was undone.

According to this bugtracker of cloud-initramfs-tools, the fix is already merged to unstable and hopefully working its way towards stable from there... I guess it might help if someone tested the new version in unstable and would confirm it works?

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.