<div dir="ltr">Hi John,<br><br>Thanks for the info. Are there noticeable performance gains/losses when using an external SD swap partition?<br>Won't adding a line to /etc/fstab make the swap partition be used on startup automatically?<br>
<br>Cheers,<br>Andrés<br><br><div class="gmail_quote">On Sun, Aug 10, 2008 at 4:21 AM, John Gilmore <span dir="ltr"><<a href="mailto:gnu@toad.com">gnu@toad.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> > Have you tried with a swap partition? Swap is robust now on a<br>
> > SD card, immune to suspend/resume and power cycle.<br>
><br>
> External swap area sounds cool.  How does one set it up?  I'll give it a<br>
> whirl.<br>
<br>
Use a recent joyride.  Get a throwaway 1GB SD card.  Available for<br>
$3-$20 depending where you go.  I say throwaway because swapping to it<br>
will tend to burn it up faster than its "usual" lifetime for photos<br>
and such.  You will still be able to use half a gig on the card for<br>
file storage; the other half will be for swap space.  Plug it into the<br>
SD card slot on the XO.  You'll have to keep it plugged in the whole<br>
time while you're swapping to it; you can't remove it the way you<br>
remove a USB stick or a non-swap SD card.  If/when it starts to fail<br>
after a few years, you can copy any still-interesting user files off<br>
it, throw it away, and put in a new $1 1GB SD card (or something<br>
larger).<br>
<br>
Go to a terminal (either the activity, or Ctrl-Alt-F1).  Become root.<br>
Type "mount", make sure the SD card is mounted at /dev/mmcblk0p1,<br>
in a "vfat" filesystem.<br>
<br>
Go into the Journal, find the SD card hiding behind the Frame at the<br>
bottom, hover over it, pick Unmount.  Go back to the terminal.<br>
<br>
Type "mount", make sure /dev/mmcblk0p1 is not mounted any more.  Type<br>
"yum install parted" since the partition editor is not in the distro<br>
any more.  Run "/sbin/parted /dev/mmcblk0".  Type "print" to see the<br>
current configuration.  On mine it looked like this:<br>
<br>
Number  Start  End    Size    Type     File system  Flags<br>
 1      127kB  1018MB 1018MB  primary  fat16<br>
<br>
Type "resize 1 0 512" to shrink this filesystem down to 512MB.  If it<br>
asks you whether to use FAT32, just say no.  Then type "mkpartfs<br>
primary linux-swap 512 1018".  That'll make a second partition for<br>
swapping to, and format it as a Linux swap partition.  Type "print"<br>
and it should look roughly like this:<br>
<br>
Number  Start  End     Size   Type     File system  Flags<br>
 1      32.3kB 512MB   512MB  primary  fat16<br>
 2      512MB  1018MB  506MB  primary  linux-swap<br>
<br>
Type "quit".  Now you're back to the shell.  Type "/sbin/swapon<br>
/dev/mmcblk0p2".  You're done.<br>
<br>
The Hal daemon is smart enough to mount filesystems when it sees an SD<br>
card appear, but it's not smart enough to start using freshly<br>
available swap space.  For the moment, you'll have to do "/sbin/swapon<br>
/dev/mmcblk0p2" each time after you reboot the XO.  Similarly, it<br>
won't do the "/sbin/swapoff" if you want to eject it.  I'm sure<br>
somebody will eventually come up with a Hal script or something to<br>
automate that part.<br>
<br>
You can see how much swap space you have / are using by running "top"<br>
in a terminal window; it's about the fourth line down.<br>
<br>
        John<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.laptop.org">Devel@lists.laptop.org</a><br>
<a href="http://lists.laptop.org/listinfo/devel" target="_blank">http://lists.laptop.org/listinfo/devel</a><br>
</blockquote></div><br></div>