Skip to content

Raspberry Pi

Raspberry Pi

Guide

Resize boot partition

The default boot partition size is sometimes not enough. In order to resize it, we need to extract the SD/microSD card and plug it in on another device. Then with gparted:

  1. Move the ext4 main data partition to the right, shrinking it if necessary.
  2. Mount the boot fat32 partition and copy its contents to your disk. E.g. cp -r /media/sdc1/ /tmp/sdc1.
  3. Resize the boot partition and format it, because the gparted file system resize will fail due to the bug 649324.
  4. Copy the contents back again to the newly formatted partition. E.g. cp -r /tmp/sdc1/* /media/sdc1.
  5. Unmount the boot partition.

Everything should be ready now.

Disable swap

To make your SD card live longer, you can reduce the number of reads and writes by completely disabling swap.

sudo dphys-swapfile swapoff
sudo dphys-swapfile uninstall
sudo update-rc.d dphys-swapfile remove