Emonhub - expand file system

Hi there,

I've installed the image of emonhub + emoncms onto a raspberry pi.  I've not enabled emoncms.

I did the following:

sudo rpi-rw

sudo raspi-config -> expand file system

and got the following error:

/dev/root is not the last partition. Don't know how to expand.

Is there something else I need to have done, or should have?



pb66's picture

Re: Emonhub - expand file system

Unfortunately the raspi-config script has been written to cope with the most basic SD card configurations and anything beyond a basic 2 partition set up will cause the script to not work as it's not capable of determining what it is it should do.

In this instance it's the 3rd (data) partition that is causing the confusion. To expand the file system you will need to create a new (4th) partition beyond the planned reach of the expanded 2nd partition. Copy the 3rd partition to the 4th partition, delete the 3rd partition and then manually increase the size of the 2nd partition to fill the gap left by the deleted 3rd partition, up to the beginning of the newest partition (4th when created now the 3rd since the original 3rd was deleted) and then run "sudo resize2fs /dev/mmcblk0p2" to expand the file system into the full capacity of the larger 2nd partition.

See the RaspB+ and SD card Extend thread


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.