RetroPie will give you an LBS error trying to resize on boot with retropie 4.4 with berryboot. It will also not allow you to resize it from retropie raspi-config nor while you have retropie booted and using the command line.
If you are using berryboot with retropie you will need to reboot the pie and do this from berryboots terminal via the berry boot menu with ctrl + alt + F2. I was able to resize an image I took of a 16G SD card written to a 64G card and resize it to expand all available space to the SD.
Links~
https://raspberry-projects.com/pi/pi-operating-systems/raspbian/troubleshooting/expand-filesystem-issues
https://www.chrisnewland.com/resize-raspberry-pi-sd-card-partition-to-fill-32gb-card-from-a-running-raspberry-pi-245
I cannot take credit for this, but will link what helped me after I spent a few hours trying to figure it out. Back up your SD pay no attention to drive space numbers in the examples below.
Backup your SD card to an image file first!
Enter this to see the current partition usage:
df
E.g.
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 3698504 3351472 146524 96% /
/dev/root 3698504 3351472 146524 96% /
devtmpfs 494800 0 494800 0% /dev
tmpfs 99820 240 99580 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 199620 0 199620 0% /run/shm
/dev/mmcblk0p1 57288 19400 37888 34% /boot
The rootfs and /dev/root is the same thing, its just a debian thing the have them both appear as separate
Enter this:
sudo fdisk /dev/mmcblk0
Then press 'p' to see the current partitions on the disk. E.g.
Disk /dev/mmcblk0: 7860 MB, 7860125696 bytes
4 heads, 16 sectors/track, 239872 cylinders, total 15351808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa6202af7
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 15351807 7614464 83 Linux
Now delete the 2nd partition (it won't actually delete the data on it)
Press 'd' > Enter
Press '2' > Enter
Now re-create it:
Press 'n' > Enter
Press 'p' > Enter
Press '2' > Enter
Enter the First sector and the same value as the original /dev/mmcblk0p2 partition (122880 from the above example).
For the Last sector just press enter to use the maximum value.
Now press 'p' > Enter to see the new partition setup.
Finally press 'w' > Enter to write it
Now reboot:
sudo shutdown -r now
Once its back do the resize:
sudo resize2fs /dev/mmcblk0p2
This may take a little while to complete…
Now enter the command
df
and hey presto, you've expanded to use all the space :-)
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 7513804 3352360 3810208 47% /
/dev/root 7513804 3352360 3810208 47% /
devtmpfs 494800 0 494800 0% /dev
tmpfs 99820 240 99580 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 199620 0 199620 0% /run/shm
/dev/mmcblk0p1 57288 19400 37888 34% /boot