MakeSwap

Miscellaneous tools
Post Reply
Message
Author
User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

MakeSwap

#1 Post by nic007 »

Last edited by nic007 on Tue 31 Mar 2020, 12:01, edited 5 times in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#2 Post 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!

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#3 Post 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

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post 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
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#5 Post 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

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#6 Post by nic007 »

MakeSwap-Advanced script added to OP. Script now checks your system for available partitions and you choose where to create the swapfile.
Last edited by nic007 on Fri 06 Apr 2018, 01:18, edited 1 time in total.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#7 Post 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.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#8 Post by nic007 »

Pet added to OP.

Post Reply