This is an old revision of the document!
Table of Contents
dCore Swap Partition or Swap File
Swap Overview
A swap primer for dCore users with minimal Linux or no Tiny Core Linux experience.
Depending on intended use, a Linux swap partition or swap file is recommended for systems with < 1-2 GB RAM. Swap is especially useful on low RAM systems to import/update large extensions, run numerous/heavier applications, compile software or set up hibernation.
By default, dCore will seek and utilize any existing swap partition at boot. To confirm whether a swap partition is being utilized, run cat /etc/fstab
, free -m
and/or cat /proc/swaps
, examples:
tc@box:~$ cat /etc/fstab | grep swap /dev/sda5 none swap defaults 0 0 # Added by TC
tc@box:~$ free -m total used free shared buffers cached Mem: 500 484 15 73 37 267 -/+ buffers/cache: 179 320 Swap: 729 1 727
tc@box:~$ cat /proc/swaps Filename Type Size Used Priority /dev/sda5 partition 746984 0 -1
Swap Partition Install
Setting up a hard drive swap partition during a fresh installation using fdisk is outlined in the Partition Hard Drive and Create Hard Drive File Systems sections of dCore Install from ISO to Hard Drive Without Pre-Existing Boot Loader. Systems with a pre-partitioned drive may find it easiest to use a Linux LiveCD that contains GParted to re-partition a drive and create a swap partition. Alternatively set up a swap file, outlined below.
Swap File Install
If a swap partition was not set up prior to the installation of dCore, it may be easiest to simply set up a swap file. From a graphic environment open Control Panel (cpanel) → Swapfile Tool (swapfile) and enter the desired mounted partition to utilize along with the desired swap file size. Then add the swapfile bootcode to the systems existing boot loader to activate upon reboot, example swapfile=sda1
. To confirm the swap file is being used, upon reboot run cat /proc/swaps
.
Swap Boot Codes
The noswap boot code can be used to disable the use of a swap partition at boot. http://forum.tinycorelinux.net/index.php?topic=19421.0