Read on full site | Join TechSpot! (it's free) | Bookmark / Share this
Linux Swap partition
MattG
09-08-2003, 05:57 PM
Hey guys, i realized today after class that during my install i NEVER formatted my Swap parition.
My teacher said that this means im running with out one now, even though i have the partition made.
Is there a way with out having to reinstall to format this swap to make it functional?
Thanks.
Phantasm66
09-08-2003, 06:24 PM
you created a swap partition but never formatted it?
try issuing this command:
free
you should see memory useage stats... if you don't see any mention of Swap: then you have no swap file running.
[root@fishbone root]# free
total used free shared buffers cached
Mem: 127440 120876 6564 0 54492 10912
-/+ buffers/cache: 55472 71968
Swap: 1052248 43084 1009164
If this is so, post back and we will tell you how format it.
Phantasm66
09-08-2003, 06:25 PM
oh, is the partition mentioned in /etc/fstab??
ie:
[root@fishbone root]# more /etc/fstab
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/html /html ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda2 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
MattG
09-08-2003, 07:16 PM
total used free shared buffers cached
Mem: 515612 201592 314020 0 16652 100200
-/+ buffers/cache: 84740 430872
Swap: 0 0 0
it mentions it...but its all 0's
MattG
09-08-2003, 07:19 PM
infy@inferno-linux:~$ more /etc/fstab
/dev/hdb1 / reiserfs defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
Phantasm66
09-08-2003, 07:25 PM
Here is the Red Hat Guide on How to Install a Swap partition properly, by creating it, etc:
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/s1-swap-adding.html
That tells you everything I think you will need to know.
Phantasm66
09-08-2003, 07:26 PM
...and yes, it looks like you have not got an initialised swap partition.
This probably doesn't matter too much if you have like 1 GB or so of RAM, but I would add one just anyway. Linux kernel is very good about not using swap file or partition unless it has to, unlike Windows which can be garbage in that regard.
MattG
09-08-2003, 08:56 PM
infy@inferno-linux:~$ free
total used free shared buffers cached
Mem: 515612 168112 347500 0 14712 80716
-/+ buffers/cache: 72684 442928
Swap: 2097136 0 2097136
Ive got swap now.
Thanks again.
Phantasm66
09-09-2003, 12:04 AM
SCORE!
Post a reply, see related topics & more
Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.
Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.