Skip to content

Instantly share code, notes, and snippets.

@schnell18
Created April 2, 2014 14:24
Show Gist options
  • Save schnell18/9935202 to your computer and use it in GitHub Desktop.
Save schnell18/9935202 to your computer and use it in GitHub Desktop.
Expand the partition to use all SD card space
SSH in as root, by default you’re in /storage; switch to root partition:
$ cd /
Keep XBMC from restarting:
$ touch /var/lock/xbmc.disabled
Stop XBMC, so we can unmount /storage:
$ killall -9 xbmc.bin
$ umount /storage
Verify mounts:
$ mount
$ parted /dev/mmcblk0
In parted, change to sectors display:
$ unit s
Show partitions, make note of starting sector of your partition:
$ p
Remove the partition:
$ rm 2
Re-create it, using same starting sector number and ending in "-1" to use remaining space:
$ mkpart primary 258048 -1
$ quit parted
$ e2fsck -f /dev/mmcblk0p2
$ resize2fs /dev/mmcblk0p2
$ mount /dev/mmcblk0p2 /storage
$ df -h
$ rm /var/lock/xbmc.disabled
XBMC will start up again on its own.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment