Operation Manual

To resize the root file system using the raspi-config tool, follow these instructions:
1. If this is the first time you have loaded Debian on the Raspberry Pi, raspi-config will load automatically. If it does not,
type sudo raspi-config at the console or terminal to load the tool manually.
2. In the raspi-config menu (see Figure 5-3), press the down arrow on the keyboard to highlight the expand_rootfs
option and then press Enter.
Figure 5-3: The raspi-config tools menu screen
3. The resizing operation takes just a few seconds, and is followed by a message telling you that the process will complete
when the Pi is next restarted. Press Enter to dismiss this message.
4. Press the Tab key twice to highlight Exit, and then press Enter to quit raspi-config.
5. Type sudo reboot to restart the Pi. The reboot process will take longer than usual, because the file system will need to
be resized. This process happens only once per resizethe next time the Pi is rebooted, it will take no longer than usual.
When the Pi has fully rebooted, the root file system will now be as large as the SD card allows. To verify this, type df -h at the
terminal to list the free space on all connected storage devices.
Manual Resizing
The most reliable way to resize Linux partitions on a desktop or laptop computer is to use a tool called Parted Magic, a free
bootable CD that is designed specifically for adjusting file systems. The disc works on both PCs and Macs, and operates entirely
from memory. As a result, it wont try to replace your existing operating system. It’s also compatible with any distribution for the
Raspberry Pi, unlike the Debian-specific raspi-config tool.
If you’re a Linux user, you can install gpartedthe graphical partitioning tool used in Parted Magicinstead of having to boot from the CD. For
Debian-based distributions, you just type sudo apt-get install gparted followed by sudo gparted to load the program.
Download the Parted Magic ISO image file from http://partedmagic.com and write it to a CD or DVD using the CD
writing program provided on your PC. With the disc still in the drive, reboot your computer and it will load into the Parted Magic
menu system. From here, choose Standard Settings to load the software itself.
Parted Magic is a customised Linux operating system that includes tools specifically designed for managing storage devices.
Connect the Raspberry Pis SD card to your computer and load Partition Editor from the desktop by double-clicking the icon
(see Figure 5-4).
Figure 5-4: The Parted Magic desktop