summaryrefslogtreecommitdiffstats
path: root/disk-utils/mkswap.8.adoc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
commit8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch)
tree1fdda006866bca20d41cb206767ea5241e36852f /disk-utils/mkswap.8.adoc
parentAdding debian version 2.39.3-11. (diff)
downloadutil-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz
util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'disk-utils/mkswap.8.adoc')
-rw-r--r--disk-utils/mkswap.8.adoc15
1 files changed, 13 insertions, 2 deletions
diff --git a/disk-utils/mkswap.8.adoc b/disk-utils/mkswap.8.adoc
index 904467d..1721243 100644
--- a/disk-utils/mkswap.8.adoc
+++ b/disk-utils/mkswap.8.adoc
@@ -16,7 +16,9 @@ mkswap - set up a Linux swap area
== SYNOPSIS
-*mkswap* [options] _device_ [_size_]
+*mkswap* [options] _device_ [_blocks_]
+
+*mkswap* [options] --size _size_ --file _file_
== DESCRIPTION
@@ -24,7 +26,7 @@ mkswap - set up a Linux swap area
The _device_ argument will usually be a disk partition (something like _/dev/sdb7_) but can also be a file. The Linux kernel does not look at partition IDs, but many installation scripts will assume that partitions of hex type 82 (LINUX_SWAP) are meant to be swap partitions. (*Warning: Solaris also uses this type. Be careful not to kill your Solaris partitions.*)
-The _size_ parameter is superfluous but retained for backwards compatibility. (It specifies the desired size of the swap area in 1024-byte blocks. *mkswap* will use the entire partition or file if it is omitted. Specifying it is unwise - a typo may destroy your disk.)
+The _blocks_ parameter is superfluous but retained for backwards compatibility. (It specifies the desired size of the swap area in 1024-byte blocks. *mkswap* will use the entire partition or file if it is omitted. Specifying it is unwise - a typo may destroy your disk.)
After creating the swap area, you need the *swapon*(8) command to start using it. Usually swap areas are listed in _/etc/fstab_ so that they can be taken into use at boot time by a *swapon -a* command in some boot script.
@@ -41,6 +43,9 @@ However, *mkswap* refuses to erase the first block on a device with a disk label
*-c*, *--check*::
Check the device (if it is a block device) for bad blocks before creating the swap area. If any bad blocks are found, the count is printed.
+*-F*, *--file*::
+Create a swap file with the appropriate file permissions and populated blocks on disk.
+
*-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.
+
@@ -73,6 +78,12 @@ generate a new time-based UUID
*-e*, *--endianness* _ENDIANNESS_::
Specify the _ENDIANNESS_ to use, valid arguments are *native*, *little* or *big*. The default is *native*.
+*-o*, *--offset* _offset_::
+Specify the _offset_ to write the swap area to.
+
+*-s*, *--size* _size_::
+Specify the size of the created swap file in bytes and may be followed by a multiplicative suffix: KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB"). If the file exists and is larger than _size_, it will be truncated to this size. This option only makes sense when used with *--file*.
+
*-v*, *--swapversion 1*::
Specify the swap-space version. (This option is currently pointless, as the old *-v 0* option has become obsolete and now only *-v 1* is supported. The kernel has not supported v0 swap-space format since 2.5.22 (June 2002). The new version v1 is supported since 2.1.117 (August 1998).)