How could I build a Ubuntu Jammy image?

54 views
Skip to first unread message

Raphael Traviss

unread,
Sep 25, 2024, 8:13:01 PM9/25/24
to kiwi
Setup: Apple Silicon macbook running VMWare Fusion, using a Ubuntu 22.04 VM to build a Ubuntu 22.04 image

Here are the steps I've done so far:
  • Download the Ubuntu 22.04 ARM64 image and get it running in VMWare
  • sudo ap install python3-pip and then sudo pip install kiwi
  • sudo kiwi system prepare pointing to my description and build dir

I get this error that talks about GPG keys and /var/lib/dpkg/status.kiwi, not sure how to proceed or what to do next:
kiwi-debugging.jpeg

Here are the repositories I'm using in my XML description--I basically looked at the GitHub description files:


```
  <repository type="apt-deb" alias="jammy" distribution="jammy" components="main multiverse restricted universe" repository_gpgcheck="false">
    <source path="http://ports.ubuntu.com/ubuntu-ports"/>
  </repository>

  <repository type="apt-deb" alias="jammy-updates" distribution="jammy-updates" components="main multiverse restricted universe" repository_gpgcheck="false">
    <source path="http://ports.ubuntu.com/ubuntu-ports"/>
  </repository>

  <repository type="apt-deb" alias="jammy-backports" distribution="jammy-backports" components="main multiverse restricted universe" repository_gpgcheck="false">
    <source path="http://ports.ubuntu.com/ubuntu-ports"/>
  </repository>

  <repository type="apt-deb" alias="jammy-security" distribution="jammy-security" components="main multiverse restricted universe" repository_gpgcheck="false">
    <source path="http://ports.ubuntu.com/ubuntu-ports"/>
  </repository>
```


I notice that I am missing the following repo:
```
<repository type="apt-deb" repository_gpgcheck="false" package_gpgcheck="false" imageinclude="true">
        <source path="obs://Virtualization:Appliances:Builder:Deprecated/xUbuntu_22.04"/>
    </repository>
```
But I'm not sure if that repo applies to my situation or not, if it's deprecated, or what an alternative might be.  I have seen https://groups.google.com/g/kiwi-images/c/9njFdQTqqtU but it talks about OBS projects, but I just want to build an image on my laptop.

Is it possible to build a Ubuntu Jammy image locally with KIWI 10.x ?


Regards,
Raphael









Marcus Schäfer

unread,
Sep 26, 2024, 8:35:23 AM9/26/24
to kiwi-...@googlegroups.com
Hi,

> Setup: Apple Silicon macbook running VMWare Fusion, using a Ubuntu
> 22.04 VM to build a Ubuntu 22.04 image

Ubuntu 22.04 (jammy) is outside of the support matrix for kiwi v10.x.x
In this version we moved away from debootstrap and run the bootstrap
based on apt. However that requires a newer version of apt than it
exists in jammy.

You should be able to build if you choose a kiwi version that is
still debootstrap based. This is 9.25.22

sudo pip install kiwi==9.25.22

This should avoid the "/var/lib/dpkg/status.kiwi.." issue you saw

Regards,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
signature.asc

Raphael Traviss

unread,
Sep 26, 2024, 10:45:57 AM9/26/24
to kiwi
Thanks, that error is solved, and now it's talking about a missing `debootstrap` script for all the repos:

debootstrap_missing.jpeg

is there a way to provide this script, so that it can proceed normally?


Regards,
Raphael

Neal Gompa

unread,
Sep 26, 2024, 10:50:32 AM9/26/24
to kiwi-...@googlegroups.com
On Thu, Sep 26, 2024 at 10:45 AM Raphael Traviss <skyleaf...@gmail.com> wrote:
Thanks, that error is solved, and now it's talking about a missing `debootstrap` script for all the repos:

debootstrap_missing.jpeg

is there a way to provide this script, so that it can proceed normally?

Please file a bug with Ubuntu on their debootstrap package. It's their bug to fix.



--
真実はいつも一つ!/ Always, there's only one truth!

Raphael Traviss

unread,
Sep 26, 2024, 11:00:47 AM9/26/24
to kiwi
The debootstrap package exists here: https://packages.ubuntu.com/jammy/debootstrap and I have installed this on the build host VM, and still no luck:

debootstrap_build_host.jpeg

What about that package needs to be fixed or adjusted, for KIWI to find it?


Regards,
Raphael

Raphael Traviss

unread,
Sep 26, 2024, 7:04:22 PM9/26/24
to kiwi
It turns out that KIWI uses the last named repository to determine the path for debootstrap, so you need to list this repo last:

```
<repository type="apt-deb" alias="jammy" distribution="jammy" components="main multiverse restricted universe" repository_gpgcheck="false">
    <source path="http://ports.ubuntu.com/ubuntu-ports"/>
  </repository>
```

Other notes:
  • Go through https://packages.ubuntu.com/jammy/ubuntu-minimal and make sure they are in your description's packages, or have a good reason to exclude them (e.g. Python)
  • Possibly an issue with rsync in KIWI 9.x that seemed to be clobbering /bin and /sbin in the root filesystem sync--I moved those temporarily


The prepare stage is successful after that.



Regards,
Raphael

Marcus Schäfer

unread,
Sep 27, 2024, 3:59:11 AM9/27/24
to kiwi-...@googlegroups.com
Hi,

> It turns out that KIWI uses the last named repository to determine the
> path for debootstrap, so you need to list this repo last:

Either that or you set the use_for_bootstrap attribute on the repo
that should be used:

use_for_bootstrap.attribute =
## Specify whether this repository should be the one used for
## bootstrapping or not. False by default. Only a single repository
## is allowed to be used for bootstrapping. If none is set the
## last one is picked.

debootstrap comes with some limitations. Everything to bootstrap
properly needs to come from one repo and the host has to provide
the debootstrap script for the desired target.

Regards,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer Brunnenweg 18
Tel: +49 7562 905437 D-88260 Argenbühl
Germany
-------------------------------------------------------
signature.asc
Reply all
Reply to author
Forward
0 new messages