Documentation Center

  • Trial Software
  • Product Updates

Contents

Extend the Linux Partition on the SD Card

The firmware update for Raspberry Pi™ hardware burns a Raspbian Wheezy Linux® image on an SD card. This Linux image uses approximately 3.5 GB of the SD card. If you use an SD card whose size is greater than 3.5 GB, some unused space remains on the SD card. To use the full capacity of the SD card, you can use the "raspi-config" program available with Raspbian Wheezy.

  1. Enter the following commands in the MATLAB® Command Window:

    h = raspberrypi
    h.openShell('ssh')

    This command sequence launches a PuTTY SSH shell to your Raspberry Pi hardware.

  2. Log in to the Raspberry Pi hardware with your user name and password.

  3. Enter the following command in the SSH command shell:

    sudo raspi-config

  4. On the raspi-config menu, select the move ‘expand_rootfs' option, and press Enter.

  5. Press Enter when the menu displays: Root partition has been resized. The filesystem will be enlarged upon the next reboot. <OK>

  6. On the raspi-config menu, select the Finish option, and press Enter.

  7. Enter the following command in the SSH command shell:

    sudo shutdown -r now
  8. Press Enter when the menu displays: Would you like to reboot now? <Yes> <No>

  9. When the board finishes rebooting, raspi-config automatically resizes the Linux partition on the SD card to occupy the remaining space.

    The boot process takes longer than usual for larger SD cards.

Was this topic helpful?