I'm looking for help to resize the partition of my OpenWRT installation on a Raspberry Pi that I'm using for a project with a Helium miner. I'm not a complete beginner with Linux, but it can be quite complex, and I'm having a hard time making it work for my needs. I found that the operating system I want to use has an overlay filesystem that makes it tricky to resize the partition. I want to take advantage of the full 16GB available on my SD card rather than being limited to the original 4GB that came with the image. I tried some online scripts, but they either broke my system or didn't work at all. Any advice on how to accomplish this would be greatly appreciated!
2 Answers
To resize your partitions, the command you're after is "resize partitions." I recommend using fdisk, but you need to check if it's installed on your Raspberry Pi first. Use `sudo fdisk -l` to identify your SD card and its partitions. Generally, you have a boot partition and the main partition. Launch fdisk with `sudo fdisk /dev/mmcblk1`, then you can resize your main partition (likely partition 2). After making changes, press 'w' to write them. Just be sure to double-check before you proceed, as using fdisk incorrectly can wipe your data!
Have you checked out the OpenWRT documentation? There’s a method where you create a third partition that would take up the extra space on your SD card. It might not be the perfect solution, but it could work as a temporary fix. Also, it might be worth looking at dmesg to see if there are any errors related to your SD card. Have you tried using a different SD card altogether?

I tried fdisk and resized the partition successfully, but then when I ran make2fs, it didn't do anything, and I was stuck at 4GB. The overlay filesystem seems to be the problem here.