root@beaglebone:/home/debian# df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 100M 392K 99M 1% /run
/dev/disk/by-uuid/b7ff9570-02a9-4982-b353-1131012481cb 3.5G 3.5G 0 100% /
tmpfs 248M 0 248M 0% /dev/shm
tmpfs 248M 0 248M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user
tmpfs 5.0M 0 5.0M 0% /run/lock
root@beaglebone:/home/debian# fdisk /dev/mmcblk0
Command (m for help): p
Disk /dev/mmcblk0: 15.6 GB, 15648948224 bytes
4 heads, 16 sectors/track, 477568 cylinders, total 30564352 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: 0xdcc515d1
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 2048 3481599 1739776 6 FAT16
/dev/mmcblk0p2 3481600 30564351 13541376 83 Linux
Command (m for help): d
Partition number (1-4): 2
Command (m for help): p
Disk /dev/mmcblk0: 15.6 GB, 15648948224 bytes
4 heads, 16 sectors/track, 477568 cylinders, total 30564352 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: 0xdcc515d1
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 2048 3481599 1739776 6 FAT16
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Using default response p
Partition number (1-4, default 2): 2
First sector (3481600-30564351, default 3481600):
Using default value 3481600
Last sector, +sectors or +size{K,M,G} (3481600-30564351, default 30564351):
Using default value 30564351
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@beaglebone:/home/debian# reboot
root@beaglebone:/home/debian# resize2fs /dev/mmcblk0p2
resize2fs 1.42.5 (29-Jul-2012)
resize2fs: Bad magic number in super-block while trying to open /dev/mmcblk0p2
Couldn't find valid filesystem superblock.I had the same issue as you. So, what I did is to remove all partitions (/dev/mmcblk0p*) and create a new partition that uses all the available space. Write the changes and reboot BBB. Run resize2fs on the only partition. Do a "df -h" to confirm.
It shows :root@beaglebone:~# sudo /opt/scripts/tools/version.shgit:/opt/scripts/:[23650994e41b16bcf78253cde7d35a93664beeef]eeprom:[A335BNLT00C03615BBBK1DA3]model:[TI_AM335x_BeagleBone_Black]dogtag:[BeagleBoard.org Debian Image 2017-03-19]bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2017.03-dirty]bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.03-00002-gd12b1519b4]