K, let's move back a bit. First, start with this (you'll need to use
sudo or
su for the examples that have
root@laptop):
Code:
[root@laptop:~]# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d4297
Device Boot Start End Blocks Id System
/dev/sda1 63 157292414 78646176 5 Extended
/dev/sda2 * 157292415 576717434 209712510 7 HPFS/NTFS/exFAT
/dev/sda3 576717435 976768064 200025315 7 HPFS/NTFS/exFAT
/dev/sda5 126 115346699 57673287 83 Linux
/dev/sda6 115346763 153099449 18876343+ 83 Linux
/dev/sda7 153099513 157292414 2096451 82 Linux swap / Solaris
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00062463
Device Boot Start End Blocks Id System
/dev/sdb1 63 734009849 367004893+ 5 Extended
/dev/sdb2 734009850 976768064 121379107+ 7 HPFS/NTFS/exFAT
/dev/sdb5 126 734009849 367004862 83 Linux
Here you can see a bunch of partitions. The one we want is the one that is Linux swap / Solaris, indicated in
red. Make a note of what device it is (
/dev/sda7 in this example), and run this:
Code:
[root@laptop:~]# swapon -v /dev/sda7
swapon on /dev/sda7
swapon: /dev/sda7: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/sda7: pagesize=4096, swapsize=2146762752, devsize=2146765824
Output should be similar (the
-v argument gives a more verbose output). It looks like it turned the swap on successfully, let's check to be sure (these don't need su/sudo permissions):
Code:
[user@laptop:~]$ swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 2096444 0 -1
[user@laptop:~]$ free -m
total used free shared buffers cached
Mem: 7981 1853 6128 0 98 596
-/+ buffers/cache: 1158 6823
Swap: 2047 0 2047
If something like this shows up, your swap was turned on successfully. Let's at least try to get this working first before we handle /etc/fstab.
EDIT:
*One other thing... if you don't actually have a swap partition, let me know. It would probably be easier to make a swap file in that scenario.