Page 1 of 1

Is it possible to make a swap partition with UpupBB?

Posted: Mon 20 Apr 2020, 22:25
by alpharalpha
I've been trying to make a swap partition but when setting swap UpupBB the destination pull down is inactive so can only make a swap file. Frustrating; I've made a separate 2gb partition to be used as swap but don't know how to make it be that. Am wondering if only swap file option is available with UpupBB and regardless does it make any difference for increasing ram? Thanks.

Posted: Tue 21 Apr 2020, 00:57
by bigpup
A swap file or a swap partition should work.

To make a swap partition.

Run Gparted program.
Select the drive as the drive to work on.
Gparted will open showing a list of partitions on the drive.
If there is any UN-allocated space it will show that too.
If you already made a 2GB partition on the drive and it is not used for anything else.
It is not mounted.
Right click on the 2GB partition.
Select format to.
Select Linux-swap.
Back on main window for Gparted.
You will have a message about pending operation.
At top of Gparted window is a check icon.
Left click it and the operation, to change format to Linux-swap, will be performed.
Just select apply, when you get the warning about what you are doing. (Standard warning for anything you do with Gparted).
When formatting is completed.
The listed 2GB partition file system should be Linux-swap.
Reboot UpupBB, so the swap is found and being loaded and used.

To see if the swap is active.
Run this command in a terminal.

Code: Select all

free

Posted: Tue 21 Apr 2020, 01:03
by musher0
Hi alpharalpha.

Assuming that you have formatted your swap partition correctly with GParted or a
similar partitioning tool, here is how to set it on:

-- open a console

-- type
probepart
---- from the listing, make a note of the partition that says "swap" as its format
(the partition format is indicated in the middle of the line)

-- still in console, type
swapon /dev/sdLN
(above, L stands for the letter of the disk; N stands for the number of the swap partition.)
Example: swapon /dev/sdg2
This sets your swap partition on.

-- to check, type
free -h
---- you should see the name of the swap drive and the amount of swap space
available on the second line, in "human readable" form (that's what the -h setting does).

If you need more info on the swapon or the free commands,
please type in console:
man swapon
man free

OR

swapon --help | more
free --help | more

IHTH

Posted: Wed 22 Apr 2020, 14:46
by alpharalpha
That worked :D Now that I have this swap partition what about the already made swap file, keep it or get rid of it; if rid, how? Thanks.

Posted: Wed 22 Apr 2020, 15:08
by musher0
Hi alpharalpha.

Glad that worked! In answer to your question:

It's your choice, really; if you have enough room on your disk, you can
have both a swap partition and a swap file.
In modern linuxes, the access time is the same, so it does not matter.

If you choose to activate your swap file, the commands are:

Code: Select all

makeswap /path/to/swapfile
swapon /path/to/swapfile
IHTH

Posted: Wed 22 Apr 2020, 16:15
by bigpup
what about the already made swap file, to get rid of it;
In Rox file manager.
Navigate to the swap file location.
Can use Pfind program, to search for it, if you do not know where it is.
Right click on the swap file.
Select delete.

Posted: Fri 24 Apr 2020, 14:12
by alpharalpha
Ok, so I can just delete that file and it'll use the swap partition automatically?

Posted: Fri 24 Apr 2020, 19:31
by bigpup
Yes.

Good idea to do a reboot, so the change is now the used setup.