Sample Header Ad - 728x90

Debian 12 Cloud Image Deployment Issue - Growpart can not find grep and other basic utilities

0 votes
1 answer
584 views
I created [a tutorial](https://blog.programster.org/create-debian-12-kvm-guest-from-cloud-image) 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/](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](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065875) logs post, so hopefully it will eventually get fixed, but I'm hoping there is a workaround someone knows about?
Asked by Programster (2289 rep)
Jun 1, 2024, 07:50 AM
Last activity: Jun 1, 2024, 09:56 AM