IMPORTANT: Before performing any maintenance work on your XO, you should put the system into a state conducive to maintenance.
If you plan to store the swap on a flashcard, there are some good reasons for NOT doing that.
Choose a partition to house the swap.
As user root, edit /etc/fstab
| Code Listing: Editing /etc/fstab |
| nano -w /etc/fstab |
Un-comment (remove the # at the beginning of the line) the line
#/dev/YOURSWAP none swap sw 0 0
Replace YOURSWAP with the partition-name you have chosen to hold the swap, save the file and exit.
| Code Listing: Changing kernel settings |
| cd /usr/src/linux make menuconfig |
Change the configuration so swap support becomes enabled.
General setup -> Support for paging of anonymous memory (swap).
Exit, saving your new configuration, and rebuild the kernel.
| Code Listing: Rebuilding the kernel |
| make && make modules_install |
Copy the updated kernel to the /boot folder.
| Code Listing: Updating the kernel |
| cp arch/x86/boot/bzImage /boot/kernel-2.6.26-gentoo-r1 |
| Code Listing: Restart |
| shutdown -r now |
To know more about this project, write to me at info@gentooxo.org.