If you have a Raspberry Pi with an SD Card larger than 2GB, then you may want access to all of the space available.
By default only 2GB is accessible.
The following will show you how to get all of your space.
NOTE: This will only work on the Debian image.
Step 1: Backup
You can use something like Win32DiskImager (for windows).
Using Win32DiskImager, do the following to back up:
1. Run Win32DiskImager
2. Create a file
3. Click the "Read" button
Now just wait for it to finish, then boot your Raspberry Pi.
Note: This process should not affect your data - but it is good form to back up anyway.
Step 2: Locate Partitons
This will elevate you to root status, negating the need of sudoing a lot.
Make a note of the last line (shown in the image).
(It will most likely be "/dev/mmcblk0p1").
Step 3: Delete Partitons
fdisk -uc /dev/mmcblk0 <-- where mmcblk0 is what you had previously.
The prompt should change to "Command (m for help):"
Type the letter p and hit Return / Enter (this will list your partitions)
Make a note of the "Start" value for /dev/mmcblk0p2 (mine is 157696) shown in the second image.
Now type the letter d and hit Return / Enter.
The prompt will ask you for "Partition number (1-4):", type in 2 and hit Return / Enter.
Then type d again, hit Return / Enter, then enter 3 and hit Return / Enter.