Distrobuilder newest ubuntu template fails to build

Ubuntu 20.04.6 LTS
Distrobuilder 3.0

Building Ubuntu Noble fails due to those added systemd / chattr commands in newest jenkins template Jenkins Ubuntu image

  • [ ! -d /run/systemd ]
  • rm -Rf /run/systemd/system
  • chattr +i /run/systemd
    chattr: Operation not supported while reading flags on /run/systemd
    Error: Failed to run post-unpack: exit status 1

Do you run distrobuilder in a container? I think it’s not able to run in a container due to chattr and other commands. I think you were supposed to get errors before reaching the chattr commands.

See Index of /images/ubuntu/focal/amd64/default/20240905_07:42/ and the build.log file. That’s the output of running distrobuilder to build the Ubuntu images. You can see the chattr command working fine.

You should run distrobuilder on the host or in a VM.

It runs directly on Host, not inside Container.
Though, a tempfs folder is given to distobuilder as cache folder in order to reduce SSD writes.
distrobuilder --cache-dir="tempfs-folder"
I will try --cache-dir as physical harddisk and see if it works, though I rather kept the tempfs cache due to continuous image creation wearing off SSDs.

Same result without tempfs --cachde-dir.
Still get

  • [ ! -d /run/systemd ]
  • rm -Rf /run/systemd/system
  • chattr +i /run/systemd
    chattr: Operation not supported while reading flags on /run/systemd
    Error: Failed to run post-unpack: exit status 1

Though it runs on Host and chattr command available.

I managed to use distrobuilder with --cache-dir on a tmpfs partition (an Incus VM with Ubuntu 24.04, I compiled the utility from source).

There is a tiny chance that Ubuntu 20.04 LTS has some peculiarities wrt to chattr.

I suggest to launch a VM and use distrobuilder from inside there.

1 Like

Thanks for trying all those options.
As you mentioned, issue is probably Ubuntu 20.04.