Hey everyone! I'm trying to get my hands on OpenWRT since I got a Raspberry Pi set up as a Helium miner, but I'm facing some struggles with resizing the partition. I'm familiar with Linux but not an expert, and honestly, I'm finding it a bit overwhelming. I've tried upgrading the existing, outdated Debian version on the Pi, but it looks like I'm stuck because I can't find any working upgrade servers. After some research, I decided to go with ChirpStack OS, which is OpenWRT-based, since it has all the web interfaces I need. However, I've run into a wall—the system has a protected overlay filesystem that I can't seem to resize. I attempted a couple of automated scripts for resizing, but unfortunately, one bricked my OS and the other didn't work at all. When I try using resize2fs, it throws an error about bad headers. What I really need is to utilize the full 16GB on my SD card instead of just the 4GB from the initial image. Linux has been like a part-time job for me, and I'm at my wit's end! If anyone has tips or reliable methods to get OpenWRT to see the whole card, I'd really appreciate it!
2 Answers
Have you checked the OpenWRT documentation? Specifically, the extroot configuration might help you as a workaround. You can create a third partition to use the remaining space on your SD card, but it might take some extra effort to set up. Often, looking at the dmesg logs can provide insights into what might be going wrong with the SD card, too. And if you have access to a different SD card, maybe test it out to rule out any card issues!
It sounds like you need to resize your partitions, and I recommend using `fdisk` if your Raspberry Pi has it. Just be super careful with it—any wrong commands can wipe your data! Start by running `sudo fdisk -l` to see your partitions. You likely have a boot partition and a main one. Open `fdisk` with `sudo fdisk /dev/mmcblk1` (just confirm your device name first). Use the resize option (e), select your main partition, and adjust the size. Remember to write the changes with 'w' after you're done. Just make sure to check the help menu by pressing 'm' if you need guidance while you're in there!

I actually tried this method too, but had a tricky situation where `make2fs` didn’t work afterward, and I ended up stuck with just 4GB usable. I suspect it’s related to the Overlay FS you're working with.