Change partition sizes after Sysupgrade on x86

Great! Here's what you need to do.

First, let's take a look at the output of fdisk you posted. Device /dev/sda2 starts at sector 33792. This is an important number we will have to use.

Next, let's get all the utilities we need (you already have fdisk, so I am not including it in the list):

opkg update && opkg install losetup resize2fs

Now, run an interactive fdisk session. It will look something like the listing below. This will do three things, (1) delete the current partition 2 (aka /dev/sda2), (2) create a new partition 2 that will start where the old partition started and end at the boundary of available space, and (3) write the new partition information on disk. Since there won't be a write in-between (1) and (2), the net result of all this will be an extended partition 2 with a different partition ID. But, since we have BIOS and not UEFI, we needn't worry about the changed partition ID.

The manual inputs are shown [[in double square brackets]]; the [[]] sequence indicates pressing Enter with no visible input. Obviously, when you enter your data, you don't need any square brackets; I'm just using them as markers. It's a bit confusing, but I can't come up with a better formatting scheme right now. So here goes:

root@OpenWrt:~# [[fdisk /dev/sda]] 

Welcome to fdisk (util-linux 2.37.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.


Command (m for help): [[d]]
Partition number (1,2, default 2): [[2]]

Partition 2 has been deleted.

Command (m for help): [[n]]
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): [[p]]
Partition number (2-4, default 2): [[2]]
First sector (XXXX-XXXX, default XXXX): [[33792]]
Last sector, +/-sectors or +/-size{K,M,G,T,P} 
    (XXXX-XXXX, default XXXX): [[]]

Created a new partition 2 of type 'Linux' and of size XX.X GiB.
Partition #2 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: [[n]]

Command (m for help): [[w]]

The partition table has been altered.
Syncing disks.

root@OpenWrt:~# 

Now our root partition has been resized. You can run fdisk -l again to verify that the size of /dev/sda2 has changed.

The next (and final) step is to resize the filesystem that lives on that partition. Be sure to execute these commands one by one (meaning, don't paste all of them into the command line at once; allow one command to finish before entering the next one):

BOOT="$(sed -n -e "/\s\/boot\s.*$/{s///p;q}" /etc/mtab)"
DISK="${BOOT%%[0-9]*}"
PART="$((${BOOT##*[^0-9]}+1))"
ROOT="${DISK}${PART}"
LOOP="$(losetup -f)"
losetup ${LOOP} ${ROOT}
fsck.ext4 -y ${LOOP}
resize2fs ${LOOP}
reboot

After the device reboots, you should be able to use the entire sda drive.

Technically, you shouldn't do any of it on a live drive, as there's a possibility of corruption in both stages, but in practice it tends to work in overwhelming majority of cases, especially on a device that's essentially idle. If you're reluctant to do it this way, boot your device from a USB drive, umount your target drive and do the exact same thing, but while running from the USB drive. The only difference would be in the very end; you would do halt rather than reboot, take out the USB drive, and restart the device manually by pressing the power button...