Expand SD card file structure problems

Alan Rose
Dec 14, 13:17 CST

I’m running the latest PiAware 3.1 image on a Pi3 with a 32Gb micro SD card. I’ve just burned the image and all is running well, but from past experience I know that as soon as I do a Debian upgrade from the Command menu I’ll begin getting "Partion 92% or 93% full error messages.

I have no trouble expanding the SD card’s file structure from a fresh install of Jessie using raspi-config, menu selection 1, but I know that, on the other hand, if I first burn the card with the PiAware 3.1 image that, with PiAware running, Raspi-Config/Expand will not work.

I can SSH into the Pi3 without a problem. Can you please suggest either a way of installing PiAware into a fresh install of Jessie (after the file structure has been expanded), or a way of SSH-ing into the Pi, shutting down PiAware, then expanding the file structure, and finally starting PiAware again?

I’ve looked through the forums, but nothing seems exactly to address these issues. I hope someone can give me some advice on this. Thanks, Alan

I tried typing a detailed reply with console output, but then the stupid forum software would give me an error saying I don’t have permission to post. I hope these limited instructions give you a place to start.

SSH in. Use fdisk to edit the partition table of /dev/mmcblk0. Print the existing partitions. Delete the Linux partition and make a new partition, primary, #2, that starts at exactly the same sector as the old partition. Accept the default for the end sector. Write the new partition table. It will give you an error about re-reading failed. That’s okay. Run partprobe, as it suggests. Then use resize2fs /dev/mmcblk0p2 to resize the filesystem.

I just did this on my own Pi, with the software running the whole time. No need to shut down.

I don’t see any problems expanding a piaware 3.1.0 image, what is the problem you had?

This is what I tested:

  • Write a 3.1.0 image to a sdcard
  • Boot the Pi with the sdcard
  • ssh in
  • “sudo raspi-config”, select option 1, reboot
  • ssh in after it’s rebooted
  • “df -h /” shows the expanded root fs

/var/log/syslog says:



Jan  6 14:15:59 piaware resize2fs_once[343]: Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
Jan  6 14:15:59 piaware resize2fs_once[343]: old_desc_blocks = 1, new_desc_blocks = 2
Jan  6 14:15:59 piaware resize2fs_once[343]: The filesystem on /dev/mmcblk0p2 is now 7757952 (4k) blocks long.