Expand space on SD card/eMMC

Easy-to-use script

We have created an easy-to-use script to resize the flashed image on your device. Since the image is smaller than the storage device, it is not properly expanded when first flashed. You can run the following script to expand the filesystem.

This script should be in the home folder of the demo image. If it isn't there, or if you lost it and need it, it is linked below.

729B
Open

To run the script, run the following commands for the boot device you're currently using:

For eMMC:

$ sudo ./resizeDisk.sh eMMC

For SD card:

$ sudo ./resizeDisk.sh sd

Making the script executable

The script should be executable when it is included in the image. If it isn't, then you'll need to make it executable by running the following command:

$ chmod a+x ./resizeDisk.sh

Manually expanding space

If you don't want to use the script, you can run the commands below.

You may run into an issue where you run out of space on the eMMC or SD card when installing ROS. To expand the rootfs partition, follow these steps:

Once you're done with those steps, run this command:

and reboot. You should now be able to install ROS Melodic without size issues.

Commands for fdisk

If you prefer to just see the commands, these are the commands you need to run in fdisk in order to resize your disk.

Last updated

Was this helpful?