Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 17 Aug 2018, 05:49
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
MakeSwap
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
nic007


Joined: 13 Nov 2011
Posts: 2558
Location: Cradle of Humankind

PostPosted: Sun 23 Jul 2017, 10:25    Post subject:  MakeSwap  

Pulled from general forum.
Last edited by nic007 on Fri 22 Jun 2018, 09:35; edited 4 times in total
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5122
Location: Republic of Novo Zelande

PostPosted: Tue 03 Apr 2018, 02:16    Post subject:  

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!
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2558
Location: Cradle of Humankind

PostPosted: Tue 03 Apr 2018, 04:07    Post subject:  

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:
dd if=/dev/zero of=/mnt/home/puppy.swp bs=1MB count=250 && mkswap /mnt/home/puppy.swp && swapon /mnt/home/puppy.swp
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10861
Location: Charleston S.C. USA

PostPosted: Wed 04 Apr 2018, 13:31    Post subject:  

Thanks for the program!!

Just a tweaking suggestion.

The icon choice is not too good.
Code:
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

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2521
Location: 500 seconds from Sol

PostPosted: Wed 04 Apr 2018, 18:21    Post subject:  

Needs a companion "Unmake-Swap". Laughing

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. Sad

mikesLr
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2558
Location: Cradle of Humankind

PostPosted: Thu 05 Apr 2018, 17:06    Post subject:  

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 Thu 05 Apr 2018, 21:18; edited 1 time in total
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2558
Location: Cradle of Humankind

PostPosted: Thu 05 Apr 2018, 17:10    Post subject:  

mikeslr wrote:
Needs a companion "Unmake-Swap". Laughing

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. Sad

mikesLr

If you have an existing, active swapfile which you want to get rid of just run the command swapoff -a and delete it.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2558
Location: Cradle of Humankind

PostPosted: Fri 06 Apr 2018, 08:37    Post subject:  

Pet added to OP.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0429s ][ Queries: 12 (0.0126s) ][ GZIP on ]