[raspberrypi
,
linux]
Raspbian - resize rootfs
As root.
fdisk /dev/mmcblk0
Delete the second partition /dev/mmcblk0p2
d 2
Create a new primary partition and use default sizes prompted. This will then create a partiton that fills the disk
n p 2 enter enter
Save and exit fdisk.
w
Now reboot. Once rebooted:
resize2fs /dev/mmcblk0p2