How to create a swap partition and/or swap file?

Booting, installing, newbie
Post Reply
Message
Author
JFB
Posts: 34
Joined: Tue 17 Oct 2017, 18:16

How to create a swap partition and/or swap file?

#1 Post by JFB »

When I installed Tahrpup 6.0.5 as Frugal, I deleted the old partition with GParted and created a single new bootable partition. A few days later I realized that I did not create a swap partition or swap file. How can I now do that? I'm not apposed to doing a complete re-install if need be... This is another topic that I really know nothing about...

Gordie
Posts: 153
Joined: Tue 23 Aug 2016, 15:26
Location: Nolalu, Ontario, Canada

#2 Post by Gordie »

The simplest solution is to just start over and install again. This time do it differently. It is good practice

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

#3 Post by nic007 »


watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#4 Post by watchdog »

From a live session in RAM you can resize the one bootable partition with gparted and create a swap partition. Before proceeding I suggest a backup of the savefile.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#5 Post by amigo »

I would much sooner create and use a swap file, rather than risking a partition re-size. Using a swap file also has the advantage that you can easily re-size it any time you like without problems.

JFB
Posts: 34
Joined: Tue 17 Oct 2017, 18:16

#6 Post by JFB »

Before I start messing around with this: I'm wondering what, if anything, it takes to make Puppy recognize and use the swap file. Also, what do most people do? Do they create another partition and place a swap file on that partition, or do they create a swap file on the main partition?

I'm running Tahrpup 6.0.5...

Edit: I'm at work at the moment (so I can't now), but I will be looking at MakeSwap.pet

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#7 Post by Sailor Enceladus »

If you boot a puppy from a USB stick or CD (or run live in RAM with pfix=ram as mentioned) you can shrink your tahrpup partition with GParted, then add a "linux-swap" partition for the new unallocated space after it, and puppy will load the "linux-swap partition" on next boot (or you can then hit "swap on" in GParted for puppy to use it too).

I am using a 2GB swap partition this way currently and it helps when browsing a lot of heavy sites as my laptop only has 1GB RAM.
http://murga-linux.com/puppy/viewtopic. ... 151#916151

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#8 Post by Flash »

If you have plenty of RAM you don't need virtual memory (swap) at all. I run Puppy from CD without a hard disk drive, so no swap and everything is in RAM. 4 GB of RAM is much more memory than my Puppy ever needs. The only time I ever needed more was when I tried to do something with the video from a DVD. That was many years ago and I've forgotten what I was trying to do.

Gordie
Posts: 153
Joined: Tue 23 Aug 2016, 15:26
Location: Nolalu, Ontario, Canada

#9 Post by Gordie »

With swapfiles I am not familiar but when you make a partition and delegate it to swap your puppy or any other Linux OS will automagically find it and use it

JFB
Posts: 34
Joined: Tue 17 Oct 2017, 18:16

#10 Post by JFB »

@nic007 (and/or anyone who has used "Make Swapfile"), I have the Make Swapfile utility installed. I have not used it yet. It tells me that a swapfile will be created in /mnt/home of my storage drive. Sounds quite simple. Is this adequate? Is this what I need? Or should I keep pursuing a swapfile partition? (I'm hoping Make Swapfile is what I need...) Thanks...

Edit: @Flash (official dog handler) I only have one GB of Ram on a 2008, 32 bit, Acer Aspire 1 Netbook... To tell you the truth, Tahrpup 6.0.5 is running great on it, but, somehow, I have the idea that I need a swapfile...

User avatar
Galbi
Posts: 1098
Joined: Wed 21 Sep 2011, 22:32
Location: Bs.As. - Argentina.

#11 Post by Galbi »

As Flash said, perhaps you don't need either, which is the amount of RAM of your machine?
Try with the swap file and if everything works fine, forget about it...
Remember: [b][i]"pecunia pecuniam parere non potest"[/i][/b]

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

#12 Post by nic007 »

JFB wrote:@nic007 (and/or anyone who has used "Make Swapfile"), I have the Make Swapfile utility installed. I have not used it yet. It tells , utility me that a swapfile will be created in /mnt/home of my storage drive. Sounds quite simple. Is this adequate? Is this what I need? Or should I keep pursuing a swapfile partition? (I'm hoping Make Swapfile is what I need...) Thanks...

Edit: @Flash (official dog handler) I only have one GB of Ram on a 2008, 32 bit, Acer Aspire 1 Netbook... To tell you the truth, Tahrpup 6.0.5 is running great on it, but, somehow, I have the idea that I need a swapfile...
If you are not running any extraordinary big applications, you may not need a swap partition or swap file. With 1GB RAM and using Tahr, this may be a touch and go situation whether you are going to need it or not. Personally, I would run without either if I don't encounter problems. However, if you do end up having to use swap (you will know this if you run out of memory and the system freeze), the utility you downloaded will set up a working swap file automatically (you can start with selecting a small one first). It's less intrusive to use a swap file instead of a swap partition (the latter needs a dedicated swap partition to be set up).

BTW - you can check your free memory at anytime by running the command "freemem" in terminal.

Post Reply