


MKSWAP(8)	   Linux Programmer's Manual		MKSWAP(8)


NNAAMMEE
       mkfs - set up a Linux swap device

SSYYNNOOPPSSIISS
       mmkksswwaapp [[ --cc ]] device size-in-blocks

DDEESSCCRRIIPPTTIIOONN
       mmkksswwaapp  sets  up	a Linux swap area on a device (usually a
       disk partition).

       The _d_e_v_i_c_e is usually of the following form:

	      /dev/hda[1-8]
	      /dev/hdb[1-8]
	      /dev/sda[1-8]
	      /dev/sdb[1-8]

       The _s_i_z_e_-_i_n_-_b_l_o_c_k_s parameter is the desired  size  of  the
       file  system,  in  blocks.  This information can be deter-
       mined  from  the	ffddiisskk(8)  program.   Only  block  counts
       strictly	greater  than 9 and strictly less than 65537 are
       allowed.	However, the current kernel only used the  first
       16MB  of a swap area (this will change at some time in the
       future).

       mmkksswwaapp can also set up swap files, although the	file  has
       to  be  created	first.	A sequence of commands similar to
       the following is reasonable for this purpose:

	      # dd if=/dev/zero of=swapfile bs=1024 count=8192
	      # mkswap swapfile 8192
	      # sync
	      # swapon swapfile

       Note that the regular file has to be created  before  run-
       ning  mmkksswwaapp  on the file, and that the file must not con-
       tain any holes (so, using ccpp(1) to create the file is  not
       acceptable).


OOPPTTIIOONNSS
       --cc     Check the device for bad blocks before creating the
	      file system.   If	any  are  found,  the	count  is
	      printed.	This option is meant to be used for swap
	      partitions oonnllyy, and should nnoott be used for regular
	      files!  To make sure that regular files do not con-
	      tain bad blocks, the partition  that  contains  the
	      regular file should have been created with mmkkffss --cc.

SSEEEE AALLSSOO
       ffsscckk(8), mmkkffss(8), ffddiisskk(8)

AAUUTTHHOORR
       Linus Torvalds (torvalds@cs.helsinki.fi)



Linux 0.99		13 March 1993				1


