You are previewing Raspberry Pi User Guide.

Raspberry Pi User Guide

Cover of Raspberry Pi User Guide by Gareth Halfacree... Published by John Wiley & Sons

Chapter 5: Partition Management

Having the Raspberry Pi’s operating system provided as an image of somebody else’s SD card is convenient, but a little inflexible. Most distribution images available for download assume a 2 GB or 4 GB SD card, meaning that people with 8 GB or larger cards find much of their space wasted.

Creating a New Partition

One way to make the most of a large SD on the Raspberry Pi is to create a new partition in the empty space at the end of the card. This partition can be used to store any large files that you want your Pi to be able to access without having to use an external storage device.

All the tasks required for this can be carried out directly on the Pi, without having to remove the SD card and connect it to a PC. All you need is an SD card flashed with one of the Raspberry Pi Linux images (as described in Chapter 1, “Meet the Raspberry Pi”) and some free space.


When using tools that can modify the partitions on a disk, it’s important not to delete any existing partitions. In particular, be careful not to delete the /boot or root file system partitions, or the Pi will be unable to load.

Follow these steps to create a new partition on an SD card:

1. Open a terminal window, and type sudo fdisk -l to list the storage devices connected to the Pi and their current partitions. The SD card will appear as /dev/mmcblk0 with a series of partitions numbered ...

The best content for your career. Discover unlimited learning on demand for around $1/day.