Distrobox can't delete root container

Created:
Author: Christoph Stoettner
Read in about 2 min · 341 words

Tekton Screwdrivers, Sockets, and Combination Wrenches

Photo by Tekton | Unsplash

Since end of last year, I use Fedora Silverblue or, better Universal Blue on my notebooks for daily work and my personal projects.

I will write about Univeral Blue soon, but today just a short solution in Distrobox .

So what’s distrobox?

Use any Linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Distrobox uses podman, docker or lilipod to create containers using the Linux distribution of your choice. The created container will be tightly integrated with the host, allowing sharing of the HOME directory of the user, external storage, external USB devices and graphical apps (X11/Wayland), and audio.

One of my terminals is based on Kali Linux and some tools in Kali need root access to the host. So it needs to use the --root flag for creating and updating the box.

Yesterday I tried to run the container as non-root, but it did not work. So I wanted to recreate the container.

/usr/etc/distrobox/distrobox.ini

[kali]
additional_packages="burpsuite zaproxy bloodhound neo4j"
image=ghcr.io/stoeps13/kali-toolbox:latest
icon=/home/stoeps/Pictures/Kali-dragon-icon.svg.png
init=false
nvidia=false
pull=true
root=true
replace=true

Create a distrobox:

distrobox-assemble create --file /usr/etc/distrobox/distrobox.ini --name kali

I got the error:

skipping unexporting.../usr/bin/distrobox-rm: line 385: sudo podman: command not found

The only hit in an internet search was this Reddit post . I added my solution there too.

I couldn’t find a Kali box with distrobox list.

distrobox list
ID           | NAME                 | STATUS             | IMAGE
435ae448145d | ubuntu               | Created            | ghcr.io/stoeps13/ubuntu-toolbox:latest
fa04720cd598 | fedora               | Up 4 hours         | ghcr.io/stoeps13/fedora-toolbox:latest
55fb083af50a | davinci              | Created            | ghcr.io/zelikos/davincibox:latest

Then I discovered that root containers have to be listed with:

distrobox list --root
[sudo] password for stoeps:
ID           | NAME                 | STATUS             | IMAGE
2ba524be58dd | kali                 | Up 4 hours         | ghcr.io/stoeps13/kali-toolbox:latest

Fix creation of the box

I could delete the found container with

distrobox-stop --root kali
distrobox-rm --root kali

And after removing the running container the command to assemble the updated box worked without issues.

Entering distroboxes that run with root rights:

distrobox enter --root kali
Comments
Error
There was an error sending your comment, please try again.
Thank you!
Your comment has been submitted and will be published once it has been approved.
Success!
Your comment has been posted successfully.

Comments

Loading comments...

Leave a Comment

Your email address will not be published. Required fields are marked with *

Suggested Reading
Card image cap

In late 2023, I started exploring immutable operating systems, specifically Fedora Silverblue and Bluefin . If you’re curious about why I made this switch and want more technical details, check out my Froscon Talk on ‘Next-Gen Desktops’ or watch the video presentation below.

Created:
Last Update:
Read in about 5 min
Aaron Burden: Fountain pen and a notebook

Time is running very fast and I completely forgot to update the blog for a long time.

What happened since DNUG Day 2020 ?

Created:
Last Update:
Read in about 2 min
Aaron Burden: Fountain pen and a notebook

This week I attended the DNUG Connections Day 2020 in Munich . First of all I need to thank the organization team which did a really good job (Thanks Andreas , Martti and Lara ). During the short breaks we had great conversations with parts of the HCL Developer team and other attendees.

Update

I completely forgot to mention Jörg Rafflenbeul ! He was responsible for beer steins, a great glass of quits jar, photos, videos and a ton more. Sorry Joerg and thank you!

Created:
Last Update:
Read in about 3 min