How to create SWAP on USB key?

Using applications, configuring, problems
Post Reply
Message
Author
klasu777
Posts: 17
Joined: Thu 09 Apr 2009, 04:12

How to create SWAP on USB key?

#1 Post by klasu777 »

Hi Folks,

I'm trying to make Puppy use some swap. But it seems i'm not doing it properly and would appreciate your help.

My Puppy version is 2.14. It appears that the complete OS is running in RAM (Size 124MB); it can also create the pup_save.2fs file (Size 500 MB) saved on a USB key.

Now, whenever i create some swap, everything is create in RAM instead of being created on the USB key. To create the swap here is what i do:

$ dd if=/dev/zero of=/myswap bs=1024 count=1024
$ mkswap /myswap 1024
$ swapon -a

So, what am i missing?

Thanks,

Klaus.

Bruce B

Re: How to create SWAP on USB key?

#2 Post by Bruce B »

klasu777 wrote:Hi Folks,

I'm trying to make Puppy use some swap. But it seems i'm not doing it properly and would appreciate your help.

My Puppy version is 2.14. It appears that the complete OS is running in RAM (Size 124MB); it can also create the pup_save.2fs file (Size 500 MB) saved on a USB key.

Now, whenever i create some swap, everything is create in RAM instead of being created on the USB key. To create the swap here is what i do:

$ dd if=/dev/zero of=/myswap bs=1024 count=1024
$ mkswap /myswap 1024
$ swapon -a

So, what am i missing?

Thanks,

Klaus.
If $ is root, the only thing not done properly is the swapon command which needs to specify the full name of the swapfile.

# swapon /foo/bar/swapfile.swp

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

Don't, please don't do swap on USB key

#3 Post by potchan »

Hi,

It is not recommended to make swap on flash media, because if swap writes itself a lot (in some opposite ratio to RAM amount) it can be ruined fast and it's not healthy for media U count-on for OS and DATA. If you make swap on /root you probably avoid some writings, but enlarging ISO/boot time. If you need swap - do it please as a partition or a swapfile onHD. See also:

http://www.murga-linux.com/puppy/viewtopic.php?t=37660

See also a link to another topic and search there for "Max and Moritz HORROR fly show" for a fresh thought. :evil:

http://www.murga-linux.com/puppy/viewtopic.php?p=277888

Cheers ! :wink:
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

Post Reply