1

Topic: [SOLVED]change size of swap partition

Hello,

I m a new user of linux.
I have used GParted to change my swap partition , after finished the change the swap shown in- active as no swap. Is it need to re-active it or something to do.

Thank you for helping

chicory

2

Re: [SOLVED]change size of swap partition

chicory wrote:

Hello,

I m a new user of linux.
I have used GParted to change my swap partition , after finished the change the swap shown in- active as no swap. Is it need to re-active it or something to do.

Thank you for helping

chicory


Hi,

I have made the swap active again as right - click the swap partition and chose "Swapon" . Then I got back the swap as shown in the System Monitor.
My linux is Ubuntu 8.10 version.

Thank you

3

Re: [SOLVED]change size of swap partition

chicory wrote:
chicory wrote:

Hello,

I m a new user of linux.
I have used GParted to change my swap partition , after finished the change the swap shown in- active as no swap. Is it need to re-active it or something to do.

Thank you for helping

chicory


Hi,

I have made the swap active again as right - click the swap partition and chose "Swapon" . Then I got back the swap as shown in the System Monitor.
My linux is Ubuntu 8.10 version.

Thank you


I have got the problem as it will not active swap partition as i need swapon it each time after my restart linux.

4

Re: [SOLVED]change size of swap partition

That's most likely because the swap file is mounted using its UUID, and resizing it apparently changes that.  You'll have to edit '/etc/fstab' and change the line that has something like

UUID=68e5bca9-51a9-49cf-ada0-2412803e8659 none            swap    sw              0       0

on it.

You can find the UUID by looking at the swap partition's information in GParted.

5

Re: [SOLVED]change size of swap partition

Dear JanC

Thank you for the replying

the GParted's information do not provide the UUID # of partition.

SOmeone replied me on another linux forum which solved my problem, below I just copied the replied to my question




You probably lost your quiet Usplash also.

Go to terminal and run:
Code:
sudo blkid -c /dev/null
That will display something like this:
Quote:
/dev/sda1: UUID="5A3CAE183CADEEE7" TYPE="ntfs"
/dev/sda5: UUID="3f6a93da-cbc0-4203-92ce-42ff70394f0a" TYPE="ext3"
/dev/sda6: TYPE="swap" UUID="5b397135-2a82-4933-aefd-00d7ff23b413"
/dev/sda7: UUID="cb8d8925-8059-46bc-8312-9ce5f42afa91" SEC_TYPE="ext2" TYPE="ext3"
Note: The UUID #'s are in parenthesis. DO NOT include the parenthesis when you replace the UUID's in the following files! BTW the "-c /dev/null" is necessary because if you run blkid without options it reads from its cache file. If you've run it before and any partition has changed you'll get erroneous results.

Now run:
Code:
cat /etc/fstab
You'll undoubtedly see that the UUID's for SWAP are different. Here I like to create a simple backup of the original /etc/fstab using copy-n-paste and either Abiword or Open Office so if I hose things I can put things back in their original state! Do NOT be concerned at this point if the partition #'s are different! DO NOT change a partition #! Change nothing but UUID's!

To edit that file run:
Code:
gksudo gedit /etc/fstab
It's much, much easier to cut- copy-n-paste! Just be careful! And when you're done editing remember to click on Save, then go to File > Quit!

Now on to /etc/initramfs! Run:
Code:
cat  /etc/initramfs-tools/conf.d/resume
That UUID should (but won't) match the UUID for SWAP in blkid so to edit:
Code:
gksudo gedit /etc/initramfs-tools/conf.d/resume
Again be sure to save > file > quit after editing! Now one last important thing:

In terminal:
Code:
sudo update-initramfs -u
Be patient! It takes a minute or two to run! Wait until the command prompt (like lance@lance-desktop) shows up again!

Clear as mud?

BTW my problem solved but I can not edit the title of this message post .

Thank you again

6

Re: [SOLVED]change size of swap partition

I'm working with the alpha version of the next Ubuntu, and the next Ubuntu release will have at least GParted 0.4.3, while Ubuntu 8.10 has GParted 0.3.8.  Maybe that's why I see the UUID in GParted and you don't...  smile

7

Re: [SOLVED]change size of swap partition

chicory wrote:

BTW my problem solved but I can not edit the title of this message post

You can edit the title by editing the first post.
I do it for you. smile

*** It is highly recommended to backup any important files before doing resize/move operations. ***