[HOWTO] Resizing root partition on x86 (March 2023 edition)

Could you elaborate more on the last section? What do those command do exactly, on what environment should I perform those commands? I'm using squashfs file system, where should I execute those commands? External boot environment or directly under the same openwrt OS? I performed this using finnix USB stick, not working for me, it's an old laptop with SATA 2.5 drive.

I managed to expand the sda2 partition, I can't thank you enough for such a thorough guide.
image