Page 1 of 1

MakeSwap

Posted: Sun 23 Jul 2017, 14:25
by nic007

Posted: Tue 03 Apr 2018, 06:16
by greengeek
Hi nic - the location "/mnt/home" has no meaning for me as I run only live in memory without savefile (currently using a swap partition on HDD). Is it a possibility to modify this swapfile creator so that it allows the utility to look at available drives and let the user think about which media device they would like to use as the host for their swapfile?

In my case I would like to use the inbuilt HDD (as the fastest device) rather than the USB stick (my boot device - which is slow at writing).

cheers!

Posted: Tue 03 Apr 2018, 08:07
by nic007
hi, greengeek. Yes, a novel idea but I'm not sure I can do it with my limited coding skills and if I can, will take time to figure out. Perhaps someone can chip in and help out, there is probably an easy solution? Anyways - Here is an example of the code to manually create a swap file, just change the path of the swapfile and count (size in MB) according to your needs.

Code: Select all

dd if=/dev/zero of=/mnt/home/puppy.swp bs=1MB count=250 && mkswap /mnt/home/puppy.swp && swapon /mnt/home/puppy.swp

Posted: Wed 04 Apr 2018, 17:31
by bigpup
Thanks for the program!!

Just a tweaking suggestion.

The icon choice is not too good.

Code: Select all

Icon=/usr/local/lib/X11/mini-icons/mini-eyes
Some Puppies may not have it.
Better to use an icon from /usr/local/lib/X11/pixmaps

Those icons are in every Puppy.

Do not worry about what size icon.
It will get sized to fit, when it shows up in the menu.

Example:
No menu icon when installed in Xenialpup64 7.5

Posted: Wed 04 Apr 2018, 22:21
by mikeslr
Needs a companion "Unmake-Swap". :lol:

No, seriously. Think I checked (or forgot to uncheck) make-swap when creating a SaveFile. Not wanting to start from scratch, I chose a 64 Mb swap which is useless. I know someone gave me the code to unmake it. But now I have to go looking for it. :(

mikesLr

Posted: Thu 05 Apr 2018, 21:06
by nic007
MakeSwap-Advanced script added to OP. Script now checks your system for available partitions and you choose where to create the swapfile.

Posted: Thu 05 Apr 2018, 21:10
by nic007
mikeslr wrote:Needs a companion "Unmake-Swap". :lol:

No, seriously. Think I checked (or forgot to uncheck) make-swap when creating a SaveFile. Not wanting to start from scratch, I chose a 64 Mb swap which is useless. I know someone gave me the code to unmake it. But now I have to go looking for it. :(

mikesLr
If you have an existing, active swapfile which you want to get rid of just run the command swapoff -a and delete it.

Posted: Fri 06 Apr 2018, 12:37
by nic007
Pet added to OP.