Expand the SD Card

How can I expand the size of the used space on an SD card in Volume for Odroid C1+?

I would like to add some software but the space is limited.

Hi,
as you probably mean the root partition, you need to do that offline.
I use gparted on my linux machine.
Good thing in Volumio 2: it does that automatically on first boot.

try this as a script (call it “resize.sh”), run it as root, you might want to backup first :wink:

/#!/bin/bash

fdisk_first() {
		p2_start=`fdisk -l /dev/mmcblk0 | grep mmcblk0p2 | awk '{print $2}'`
		echo "Found the start point of mmcblk0p2: $p2_start"
		fdisk /dev/mmcblk0 << __EOF__ >> /dev/null
d
2
n
p
2
$p2_start

p
w
__EOF__

		sync
		touch /root/.resize
		echo "Ok, Partition resized, please reboot now"
		echo "Once the reboot is completed please run this script again"
}

resize_fs() {
	echo "Activating the new size"
	resize2fs /dev/mmcblk0p2 >> /dev/null
	echo "Done!"
	echo "Enjoy your new space!"
	rm -rf /root/.resize
}


if [ -f /root/.resize ]; then
	resize_fs
else
	fdisk_first
fi

Thanks Gé!

Initially the script didn’t work, probably because I had been trying a few things before. But when I tried it on a fresh Volume install it worked!

I see that you are running Volume 2 on the Odroid C1+. I would like to try this but don’t know how. I could only find a Beta image for the RPi and in the Build section I did not find an option for the C1+.

Any suggestions would be much appreciated.

Thanks, Guus

Hi Guus,

it’s on my TODO list for the weekend. The C1+ has the same level of development as the PI.
I need to check with Michelangelo if he can generate the image and upload it to the repo for me.
There are a few more members that asked for it.