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