mindlord
Notices Two Things
Ok, so dig it. I have a bunch of of flash disks, ranging from 64MB up to 1GB that I don't have much use for anymore. What's a good way to abuse them? Turn them into additional memory for my Pandora.
"That's LUNACY!", you say? "You'll kill your drive! It's dangerous! Think of the children! Oh, the humanity!"
Well, there's plenty of people on the Interwebs who will argue that using flash as swap in tight memory configurations is a dandy way to run larger programs when a physical drive is not available. So you crazy people who want to compile huge applications directly on the Pandora, have a way of extending your RAM, even if just temporarily. You could always format the drive back when you're done abusing it. Contrary to popular belief this will not burn the flash drive out in a matter of weeks or months. It will shorten it's life considerably, sure. In one example a fella has been using the same 2GB flash drive in an old computer with 256MB of RAM for FIVE YEARS! I wouldn't suggest doing this to your nice expensive 32GB SD card, but for cheap flash drives you don't need anymore... I say "Do it! Burn those suckers up".
The process is very simple.
1. Plug in your flash drive
2. Open a Termial
3. Type "sudo mkswap /dev/disk/by-id/" but don't hit return - hit Tab twice instead
4. You'll get a list of disk devices active in your system.
something like this:
We are obviosly looking for a USB device here, the mmc card is your SD card and we don't want to make it swap, although you could if you wanted to. Type the first few letters of the drive you want to make swap and hit Tab to autocomplete it. Don't worry if the drive has a "-part1" because you're about to wipe it out completely. Make a note of the drive id, you're going to need it again later.
5. Press enter and the Pandora will convert that USB disk into swap, but it's not active yet.
6. Once you've converted a disk to swap you don't have to repeat the previous steps - create two shell scripts:
usbswapon.sh
usbswapoff.sh
You can check to see if you're swap is active with this command:
The ID is unique, so even if you plug several USB drives into a hub, the Pandora will know which one it's supposed to use as swap.
*** Beware, so not unplug the USB stick while the swap is turned on unless you want your Pandora to crash immediately. Always "usbswapoff.sh" first.
Edit: Fixed "mkwap" typo.
"That's LUNACY!", you say? "You'll kill your drive! It's dangerous! Think of the children! Oh, the humanity!"
Well, there's plenty of people on the Interwebs who will argue that using flash as swap in tight memory configurations is a dandy way to run larger programs when a physical drive is not available. So you crazy people who want to compile huge applications directly on the Pandora, have a way of extending your RAM, even if just temporarily. You could always format the drive back when you're done abusing it. Contrary to popular belief this will not burn the flash drive out in a matter of weeks or months. It will shorten it's life considerably, sure. In one example a fella has been using the same 2GB flash drive in an old computer with 256MB of RAM for FIVE YEARS! I wouldn't suggest doing this to your nice expensive 32GB SD card, but for cheap flash drives you don't need anymore... I say "Do it! Burn those suckers up".
The process is very simple.
1. Plug in your flash drive
2. Open a Termial
3. Type "sudo mkswap /dev/disk/by-id/" but don't hit return - hit Tab twice instead
4. You'll get a list of disk devices active in your system.
something like this:
Code:
mmc-SD-2G_0x204e732c
mmc-SD-2G_0x204e732c-part1
usb-Generic_STORAGE_DEVICE_000000009407-0:0
usb-Generic_STORAGE_DEVICE_000000009407-0:0-part1
We are obviosly looking for a USB device here, the mmc card is your SD card and we don't want to make it swap, although you could if you wanted to. Type the first few letters of the drive you want to make swap and hit Tab to autocomplete it. Don't worry if the drive has a "-part1" because you're about to wipe it out completely. Make a note of the drive id, you're going to need it again later.
5. Press enter and the Pandora will convert that USB disk into swap, but it's not active yet.
6. Once you've converted a disk to swap you don't have to repeat the previous steps - create two shell scripts:
usbswapon.sh
Code:
#!/bin/sh
gksudo swapon -p 32767 /dev/disk/by-id/[The id of the drive you plugged in]
Code:
#!/bin/sh
gksudo swapoff /dev/disk/by-id/[The id of the drive you plugged in]
You can check to see if you're swap is active with this command:
Code:
sudo swapon -s
The ID is unique, so even if you plug several USB drives into a hub, the Pandora will know which one it's supposed to use as swap.
*** Beware, so not unplug the USB stick while the swap is turned on unless you want your Pandora to crash immediately. Always "usbswapoff.sh" first.
Edit: Fixed "mkwap" typo.