How to add Swap to current session?

Using applications, configuring, problems
Message
Author
jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#21 Post by jafadmin »

greengeek wrote: <chuckle> Sounds like fun. Do you have an example of syntax to create the image file? And by image file do you mean an iso??
dd bs=1M if=/dev/<swap partition> of=/mnt/MyUSB/swapdump.dd

Then just use hexedit to browse swapdump.dd

(it's what all the cool kids do ..)
Last edited by jafadmin on Thu 21 Jun 2018, 13:37, edited 1 time in total.

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

#22 Post by greengeek »

... also just wanted to post an interesting link for me to investigate further later:

https://unix.stackexchange.com/question ... e-in-linux

It discusses other uses of swap space and I am looking for more details about how swap can be reallocated as temporary data storage areas (like puppy seems to do during boot and i guess prior to the "switch root" phase)

EDIT: Also -
https://askubuntu.com/questions/846163/ ... filesystem
It is quite common to write a single file (ala tar and dd) to unformatted storage, and even more common to have nested filesystems (virtual disks, .iso, squashfs). Games on floppy would sometimes write high scores to an absolute (fixed) location, and some applications are Cylinder, Head, Sector based. Swap partitions are still partitions, but no, there is no filesystem, or "mapping" other than offset and run ? – mckenzm Nov 7 '16 at 1:31
Last edited by greengeek on Tue 19 Jun 2018, 18:22, edited 1 time in total.

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

#23 Post by greengeek »

jafadmin wrote:(it's what all the cool kids do ..)
Explains why I had no idea how to do it. My coke bottle lenses are too thick to be cool.
:-)

Thanks for the syntax!
nic007 wrote:You can create the swapfile on an ntfs partition but personally I won't. Linux and ntfs filesystems don't go along very nicely in my experience (more likely to get corrupted).
Thanks. I'm not a fan of cross copulating with NTFS but good to know it can be done if needed.

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

#24 Post by greengeek »

jafadmin wrote:Then just use hexedit to browse swampdump.dd
Ahhh, I see what you mean,,,

Code: Select all

  @
   |
   -
 /    \
/ UU  \
 |   |
 / v \
 |   |
_|  _|

HerrBert
Posts: 152
Joined: Thu 03 Nov 2016, 15:11
Location: NRW, Germany

#25 Post by HerrBert »

greengeek wrote:Is there a method how you restricted the swap space only to Palemoon? Or was that the only programme thrashing the memory at the time?
it is not restricted to palemoon, but palemoon is the only app i use on this old netbook, that runs out of memory very quick and causes a freeze.

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

#26 Post by nic007 »

Hi, HerrBert - The following command will free all your systems caches. I used to run it in regular intervals. May be useful to you:

Code: Select all

sync;echo 3 > /proc/sys/vm/drop_caches

Post Reply