[NTLUG:Discuss] SWAP

Robert Citek rwcitek at alum.calberkeley.org
Fri Aug 19 10:34:26 CDT 2005


On Aug 19, 2005, at 5:28 AM, Leroy Tennison wrote:
> Just created a dual distro setup (FC3 and SuSE9.2) on a hard disk  
> manually and forgot to create a swap partition.  If i go back and  
> do so, will it be used?  How does Linux detect and use the swap  
> partition?

FYI, swap can also be a file or even several files:

  dd if=/dev/zero of=swap1 bs=1M count=100   # create the file
  mkswap swap1                               # initialize it as swap
  cp swap1 swap2                             # copy the swap file
  cp swap1 swap3                             # copy the swap file
  cp swap1 swap4                             # copy the swap file
  swapon swap*                               # use them
  swapon -s                                  # verify they are being  
used
  swapoff swap*                              # stop using them

If you want linux to automatically use these files at bootup, add  
them to your /etc/fstab:

/swap1 swap swap defaults 0 0
/swap2 swap swap defaults 0 0
/swap3 swap swap defaults 0 0
/swap4 swap swap defaults 0 0

Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software.  Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent




More information about the Discuss mailing list