// Module included in the following assemblies:
//
// * support/gathering-cluster-data.adoc

:_mod-docs-content-type: PROCEDURE
[id="starting-an-alternative-image-with-toolbox_{context}"]
= Starting an alternative image with `toolbox`

[role="_abstract"]
ifndef::openshift-origin[]
By default, running the `toolbox` command starts a container with the `registry.redhat.io/rhel9/support-tools:latest` image.

[NOTE]
====
You can start an alternative image by creating a `.toolboxrc` file and specifying the image to run. However, running an older version of the `support-tools` image, such as `registry.redhat.io/rhel8/support-tools:latest`,  is not supported on {product-title} {product-version}.
====
endif::openshift-origin[]

ifdef::openshift-origin[]
By default, running the `toolbox` command starts a container with the `quay.io/fedora/fedora` image. You can start an alternative image by creating a `.toolboxrc` file and specifying the image to run.
endif::openshift-origin[]

.Prerequisites

* You have accessed a node with the `oc debug node/<node_name>` command.
* You can access your system as a user with root privileges.

.Procedure

. Set `/host` as the root directory within the debug shell. The debug pod mounts the host's root file system in `/host` within the pod. By changing the root directory to `/host`, you can run binaries contained in the host's executable paths:
+
[source,terminal]
----
# chroot /host
----

. Optional: If you need to use an alternative image instead of the default image, create a `.toolboxrc` file in the home directory for the root user ID, and specify the image metadata:
+
[source,text]
----
REGISTRY=quay.io
IMAGE=fedora/fedora:latest
TOOLBOX_NAME=toolbox-fedora-latest
----
+
where:

`REGISTRY=quay.io`:: Optional: Specify an alternative container registry.
`IMAGE=fedora/fedora:latest`:: Specify an alternative image to start.
`TOOLBOX_NAME=toolbox-fedora-latest`:: Optional: Specify an alternative name for the toolbox container.

. Start a toolbox container by entering the following command:
+
[source,terminal]
----
# toolbox
----
+
[NOTE]
====
If an existing `toolbox` pod is already running, the `toolbox` command outputs `'toolbox-' already exists. Trying to start...`. To avoid issues with `sosreport` plugins, remove the running toolbox container with `podman rm toolbox-` and then spawn a new toolbox container. 
====
