LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   changing the size of an existing swap partition (https://www.linuxquestions.org/questions/linux-newbie-8/changing-the-size-of-an-existing-swap-partition-333833/)

toolmania1 06-15-2005 08:48 AM

changing the size of an existing swap partition
 
I have installed Linux and Windows Xp on the same hard drive. on two separate partitions. I would like to change the size of the swap partition since I accepted the default which is very small. How do I change the size of swap after I have already installed Linux (Red Hat 9.0)

jonaskoelker 06-15-2005 09:45 AM

firstly: if you go to (user CP -> Edit profile -> Distro) and enter the distro you use, you don't have to type it in every post you make.

For changing the size of the swap partition--the easiest solution I can think of is booting from a Live CD and running parted (or another partition editor of your choice) from there.

It may also be possible to unmount the swap partition, repartition your disk, and remount it.

But do you really need the swap space? Given that you can run windows nt 5 (sorry, xp), I would think that swap usage would be very low for non-gaming uses--and even games like freeciv are surprisingly light.

hth --Jonas

cderbyd 06-15-2005 03:55 PM

HI,

There is no way to grow the swap partition, you should resize the partitions in some way.
Maybe you could create a big archivoe with "dd" command, and use mkswap y swapon command
over that big archive.

Good luck,

jonaskoelker 06-15-2005 04:24 PM

Quote:

There is no way to grow the swap partition, you should resize the partitions in some way.
Err... isn't growing a form of resizing?

What exactly do you mean? That he can't grow it without repartitioning? That he can't grow it while it's in use? ...

--Jonas

cderbyd 06-16-2005 06:49 PM

Hi,

I mean: you MUST do a repartitioning of your disk to increase the size of your
swap partition.

You CAN grow the size of swap use of the system, but is not the same thing.

To do this, you NEED to create a big file o wathever the size you want the swap
space want to grow, and then perform the "mkswap" and "swapon" .

Good luck

jonaskoelker 06-16-2005 07:20 PM

Quote:

I mean: <snip>
much clearer (to the point of being worse than legalese :p)

Quote:

mkswap y swapon
Your native language is (closely related to) spanish, si? :)

--Jonas


All times are GMT -5. The time now is 12:20 AM.