Resize sdcard in Raspberry Pi - OpenELEC in ssh

Resize sdcard in Raspberry Pi - OpenELEC in ssh

Postby curlee » Thu Mar 28, 2013 6:49 am

SSH in as root
By default you’re in /storage; switch to root partition:
Code: Select all
cd /

Keep XBMC from restarting:
Code: Select all
touch /var/lock/xbmc.disabled

Stop XBMC, so we can unmount /storage:
Code: Select all
killall -9 xbmc.bin
umount /storage

Verify mounts:
Code: Select all
mount
parted /dev/mmcblk0

In parted:
change to sectors display:
Code: Select all
unit s

show partitions, make note of starting sector of your partition:
Code: Select all
p

remove the partition:
Code: Select all
rm 2

re-create it, using same starting sector # and ending of -1 to use remaining space:
Code: Select all
mkpart primary 258048 -1

quit parted
Code: Select all
quit

Code: Select all
e2fsck -f /dev/mmcblk0p2
resize2fs /dev/mmcblk0p2
mount /dev/mmcblk0p2 /storage
df -h
rm /var/lock/xbmc.disabled

XBMC will start up again

-Amos Curlee
Thank you, dbec for the this information, taken from this post.
curlee
Site Admin
 
Posts: 49
Joined: Wed May 03, 2006 12:01 pm

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 1 guest

cron