Using toolbox
for SUSE Linux Micro debugging
- WHAT?
toolbox
is a script that enables you to use and install debugging and administration tools without rebooting the system.- WHY?
The article focuses on starting a
toolbox
container and its usage.- EFFORT
It takes approximately 5 minutes to read the article.
- GOAL
You will have a running
toolbox
container to install debugging tools as needed.- REQUIREMENTS
Podman installed on your system.
1 About toolbox
#
SUSE Linux Micro uses the transactional-update
command to apply
changes to the system, but the changes are applied only after reboot. That
solution has several benefits, but it also has some disadvantages. If you
need to debug your system and install a new tool, the tool will be available
only after reboot. Therefore, you cannot debug the currently running
system. For this reason, a utility called toolbox
has been
developed.
toolbox
is a small script that pulls a container image and
runs a privileged container based on that image. toolbox
is stateful so if you
exit the container and start it later, the environment is exactly the same.
The root file system of the container is mounted on /media/root
.
2 Starting and removing toolbox
#
To start the toolbox
container as a regular user with root
rights, run the following command:
>
toolbox --root
As root
, you can omit the --root
option:
#
toolbox
If the script completes successfully, you can see the
toolbox
container prompt.
To remove the container, run the following command:
>
sudo
podman rm toolbox-USER
For example, for the root
user:
#
podman rm toolbox-root
toolbox
image
You can also use Podman or Cockpit to pull the toolbox
image and start a container based on that image.
3 Using toolbox
#
In the toolbox container, you
can install any tool you want with zypper
and then use the
tool without rebooting your system.
To leave the container, just type exit
. Remember that the container
stays in the same state as you exit it. If you want a clean environment, you need to
remove the toolbox
container first. For the removal procedure, see Section 2, “Starting and removing toolbox
”.
4 Legal Notice #
Copyright© 2006–2024 SUSE LLC and contributors. All rights reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”.
For SUSE trademarks, see https://www.suse.com/company/legal/. All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its affiliates. Asterisks (*) denote third-party trademarks.
All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors, nor the translators shall be held liable for possible errors or the consequences thereof.