Results 1 to 5 of 5
Hai,
I have 0 KB as swap space and I want to configure swap space to 2 GB. How should I go with configuring swap space.
Thanks
Sunil...
- 12-30-2004 #1Just Joined!
- Join Date
- Dec 2004
- Posts
- 30
How to configure Swap space
Hai,
I have 0 KB as swap space and I want to configure swap space to 2 GB. How should I go with configuring swap space.
Thanks
Sunil
- 12-30-2004 #2Linux Newbie
- Join Date
- Apr 2004
- Posts
- 158
Hi,
You need to create a swap partition of 2GB. (with fdisk for example)
then you need to create the swap filesystem (mkswap /dev/hdaX)
and finally add a new entry to the /etc/fstab file.
I don't know how much of this you are comfortable with so let me know if you run into any truble and I'll help you from there...
Cheers
Jonas--
in Linux Computing we Trust
- 12-30-2004 #3Also use the 'swapon' command to set it active without rebooting.
Originally Posted by cjl7
Oh...and why would you want 2G of swap space...?Code:swapon /dev/hdXY
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 12-30-2004 #4Just Joined!
- Join Date
- Dec 2004
- Posts
- 30
Can you please tell me the exact command syntax of fdisk, as I have four partitions and I dont want mess the hda1 which has windows on it. Here is partition table of my systemYou need to create a swap partition of 2GB. (with fdisk for example)
Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1941 15591051 7 HPFS/NTFS
/dev/hda2 1942 7295 43006005 f W95 Ext'd (LBA)
/dev/hda5 1942 4081 17189518+ c W95 FAT32 (LBA)
/dev/hda6 4082 5683 12868033+ c W95 FAT32 (LBA)
/dev/hda7 5684 7295 12948358+ 83 Linux
I want to create swap partition from /dev/hda6. How should I go from here with fdisk command.
How much do you I think I should provide for swap space?(1GB or 2GB)
Thanks
Sunil
- 12-30-2004 #5Linux Newbie
- Join Date
- Apr 2004
- Posts
- 158
Hi,
In order to configure /dev/hda6 as swap do the following;
1. run "fdisk /dev/hda"
type "t" ( as in "toggle"), you will be asked to enter the partition number, type "6" and hit ENTER
Then you will get a question about hex code, type "82" (linux swap) (type "l" (ell) to view all types available)
type "w" to write the new partition table and quit.
2. create the swap space with mkswap /dev/hda6
3. edit the /etc/fstab file, add the following
4. activate the swap space by typing "swapon -a"/dev/hda2 none swap sw 0 0
//jonas--
in Linux Computing we Trust


Reply With Quote
