---
name: "tk_scsiformat"
section: "8"
platform: "linux"
package: "scsitools"
version: "0.12-6"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tk_scsiformat"
---

# tk\_scsiformat(8)

low level format an scsi disk device with a nice user interface

## NAME

tk\_scsiformat - low level format an scsi disk device with a nice user interface

## SYNOPSIS

**tk\_scsiformat \[***device***\]**

## DESCRIPTION

Low level formats the SCSI device identified by the scsi disk or generic scsi device node *device*. You must be root to perform this operation. When you do not specify a *device*, **tk\_scsiformat** gives you a list to select a disk device from.

**tk\_scsiformat** is a Tcl/Tk user interface to [**scsiformat**(8)](/scsiformat/8.md).

You should read that manual page for the general operation of **scsiformat**. All common X11 and Tcl/Tk options apply.

By the nature of graphical user interfaces, there should not be much to explain here. All entry fields refer directly to [**scsiformat**(8)](/scsiformat/8.md) options.

In addition to those, you are able to save your selections to be used as defaults for this device next time in a file */usr/lib/scsi/scsiformat.defs.\** by pressing the **\<Save Defaults\>** button. This is intended and very handy for formatting of removable medias. Note, however, that **tk\_scsiformat** is not as clever as [**scsiformat**(8)](/scsiformat/8.md) (or even tries to be) to find if multiple ways to refer to the same scsi device (disk device, generic device).

Furthermore, you can select (or enter freely) a command to automatically make a file system on  the newly formatted disk.

While formatting a nice completion bar is drawn. Alas, I could not really implement querying progress from a target device yet.

The */usr/lib/scsi/tworands* binary is used to calculate two random integers which is not supported by plain Tcl/Tk.

## BUGS

When not specifying a device to format, **tk\_scsiformat** will prepare a list of disk devices to choose from. Alas, if a blocking format operation is running on one of them, **tk\_scsiformat** will block in a non interruptible disk wait sleep.

Old status files in  */tmp* will confuse **tk\_scsiformat.** However, they are removed after 48 hours.

Restrictions of the **SCSI\_IOCTL\_SEND\_COMMAND** [**ioctl**(2)](/ioctl/2.md) call for the [**sd**(4)](/sd/4.md) device make it impossible to issue a **FORMAT\_UNIT** command with more than 4096 bytes of arguments. This could be avoided by using the proper generic scsi device */dev/sg\** instead, at least where the kernel is compiled to support it. Most of the time this is not needed though and thus I'm myself to lazy to do it.

## FILES

*/usr/lib/scsi/tworands*\
 */usr/lib/scsi/scsiformat.defs.\**\
 */tmp/scsiformat.xx:xx:xx:xx:xxxxxxxx*\
 */dev/sd\**\
 */dev/sg\**

## SEE ALSO

[**scsiformat**(8)](/scsiformat/8.md), [**scsiinfo**(8)](/scsiinfo/8.md), [**scsi-config**(8)](/scsi-config/8.md), [**fdisk**(8)](/fdisk/8.md), [**sd**(4)](/sd/4.md).

## AUTHOR

Michael Weller \<eowmob@exp-math.uni-essen.de\>
