View previous topic :: View next topic |
Author |
Message |
stty0 n00b
Joined: 26 Feb 2004 Posts: 15
|
Posted: Thu Jan 13, 2005 12:01 am Post subject: Need to resize SWAP partition on a NetraX1 |
|
|
What is the best way to change the size of the swap partition on a Netra X1 (no video/KB/Mouse?)
I need to change swap from 512MB to 1GB prior to an Oracle install.
The first thing that comes to mind is: boot from the LiveCD and run fdisk to remove the swap partition, and then re-create it with a bigger size(?) What would that do to my existing partitions?
I have:
/dev/hda1 as boot 512MB <-- yes, I know that is large.
/dev/hda2 as swap 512MB
/dev/hda4 as / 18GB
Any advice for a linux neophyte like myself? |
|
Back to top |
|
|
syg00 l33t
Joined: 23 Aug 2004 Posts: 907 Location: Brisbane, AUS
|
Posted: Thu Jan 13, 2005 12:12 am Post subject: |
|
|
I like the "keep it simple" philosophy.
Surely Linux can handle multiple swap's ???.
Just define another, add it with "swapon", then update fstab to match.
If you want "neat", afterwards "swapoff" the (current) small one, and just run with the larger one. |
|
Back to top |
|
|
stty0 n00b
Joined: 26 Feb 2004 Posts: 15
|
Posted: Thu Jan 13, 2005 8:12 pm Post subject: solved |
|
|
Well, after looking at some alternatives, like qparted and such (which seem a bit unreliable), It came down to 2 alternatives:
1) add a 2nd HD and use a partition on it for swap. not practical since I dont have a spare lying around.
2) create a swapfile. This is what I did:
Code: |
dd if=/dev/zero of=/swpfile bs=1024k count=512
|
That creates a 512MB swapfile located at /swpfile
Then, to activate it:
Code: |
mkswap /swpfile
swapon /swpfile
|
Note that swap is additive, so the original 512MB swap partition + 512MB swapfile = 1GB of total swap. You can use top to see the total swap space u have.
Cheers. |
|
Back to top |
|
|
|