mkswap

From RaySoft

mkswap sets up a Linux swap area on a device or in a file.[1]

Documentation

Syntax

mkswap [PARAMETER ...] [DEVICE]

Parameters

-c
Check the device (if it is a block device) for bad blocks before creating the swap area. If any are found, the count is printed.
-f
Force - go ahead even if the command is stupid. This allows the creation of a swap area larger than the file or partition it resides on.
-L LABEL
Specify a LABEL, to allow swapon by label.
-p SIZE
Specify the page SIZE to use.
-v0, -v1
Specify the swap space version. This option is deprecated and -v1 is supported only.
The kernel has not supported v0 swap space format since 2.5.22. The new version v1 is supported since 2.1.117.

Examples

Create a SWAP partition on /dev/hda3
mkswap -c '/dev/hda3'

References

  1. man 8 'mkswap'