1,885
edits
Changes
→Adding Swap Space
* Add the swap file to the system configuration: <code>echo "/swap0 swap swap" >>/etc/fstab</code>
* Activate the swap space: <code>swapon -a</code>
== Moving to a Larger SD Card ==
You can copy the contents of the SD card to a larger card using the <code>dd</code> command, either on the Raspberry Pi (using an external USB SD card reader/writer) or on another computer. To do this on the Pi itself (assuming that the USB card reader is the only USB-attached storage device and therefore identified as <code>/dev/sda</code>):
# Copy the data: <code>dd if=/dev/mmcblk0 of=/dev/sda</code>
# Force the data to be written to the SD card (flush the buffers): <code>sync</code>
# Remove and reinsert the SD card.
# Since the SD card was copied while the system was in use, the filesystems will be marked as "dirty". Check and clean the filesystems: <code>fsck -f /dev/sda1; fsck -f /dev/sda2</code>
To make the card resize the second partition at first boot:
# Mount the second partition: <code>mkdir /mnt/sd-partition-2; mount /dev/sda2 /mnt/sd-p2</code>
# Create the empty file <code>/.autoresize</code>: <code>touch /mnt/sd-p2/.autoresize</code>
# Unmount the partition: <code>umount /mnt/sd-p2</code>
= Raspberry Pi-Specific Configuration =