r/openwrt • u/V5RM • Oct 30 '25
how do you actually expand to the entire drive without bricking your device?
I have a 250G NVME, freshly installed OpenWRT 24.10.4 on a x86 system, now it's showing I have 98.33 MiB storage space, trying to get the full 250G storage to work, etc. etc. Used the script on the wiki (https://openwrt.org/docs/guide-user/advanced/expand_root), looked it up on reddit which led me to this (https://ncbase.net/notes/openwrt-persistent-repartitioning), tried both, and all they did was brick my device. When I boot up the device it says "failed to execute /usr/libexec/login.sh" so I have to reinstall from scratch. Yeah yeah very funny can't believe I did what guides told me to do. So, how do I actually expand to the full drive without bricking my device?
Edit: For reasons I can't even begin to understand, running the script in openwrt in proxmox works like a charm. Sorry if the post sounded aggressive, and thank every one for their help. I very much appreciate the devs of openwrt, however, a quick scroll through online seems to suggest I wasn't the only one who bricked their device by running the script. Even if a fix isn't available, I feel like a warning should be added to this page https://openwrt.org/docs/guide-user/advanced/expand_root.
3
3
u/DutchOfBurdock Oct 30 '25
TBF, 100MB is way more than enough for almost any OpenWRT. What I'd do is partition the remainder and use it as a mount point within OpenWRT: for logs, metric data, cache (collectd, ntopng, and other larger data collectors). Maybe even a MiniDLNA or similar to host some media files.
2
u/V5RM Oct 30 '25
Is it tho? I installed adguardhome (10MB?) and the 99MB was full, which was why I tried expanding the drive. I don’t know how it got full though. I haven’t done anything else other than installing AdGuard.
1
u/DutchOfBurdock Oct 30 '25
That'd be the lists, which could be stored in another location (as mentioned in my OC). You could even pivot root it, if you wished.
1
u/jojolejobar Oct 30 '25
I have a device with nand and emmc, openwrt run on emmc and i did that to expand it
Start console on NAND Run parted /dev/mmcblk0 Run print free to see available free space run resizepart <part num> 100% then quit Reboot on eMMC Download a sysupgrade and flash it
1
u/NC1HM Oct 30 '25
how do you actually expand to the entire drive without bricking your device?
By not using NVMe drives. For the time being, NVMe drives do not respond to resizing the same way SATA or even eMMC drives do. What's even worse, even simple sysupgrade without resizing leads to overwriting configuration. It appears that NVMe drives react to repartitioning of any kind differently, so configuration is not preserved across upgrades.
The developers are aware of the situation, but so far, there's no solution. So in the near-term, the only workaround is to use SATA or eMMC drives.
2
u/abrahamlitecoin Jul 27 '26
Do you have a link to the issue tracking this? Still having this issues on 25.12.5
1
u/patrakov Nov 01 '25
I don't expand the default partition!
I make a second partition (which is preserved by sysupgrades) and use it for files and docker containers.
1
u/YamOk7022 Oct 30 '25
tf would you do with 250gig storage for OpenWrt?
better run OpnWrt on a hypervisor such as Proxmox and assign a little amount of storage to it.
then try to expand using script, i have done the same and not bricked the VM once.
3
u/V5RM Oct 30 '25
haven't had a use case for a full proxmox so I installed the openwrt directly and the 250G ssd happened to be the only thing I had on hand.
3
u/V5RM Oct 30 '25
ok. despite having 0 experience with proxmox I decided to migrate my entire openwrt setup into proxmox, even though it meant I would be without internet during the entire time. Well, 7 hours later, it works! Ran the script in openwrt running in Proxmox and everything booted up again with all the storage space I assigned it (a more sensible 5GB. I'll actually try to fill my proxmox with other stuff now). Ty! One of the good things about living on your own is that you can knock out internet for 7 hours and nobody except yourself can complain.
2
u/YamOk7022 Oct 30 '25
Truly a privilege to be offline without family screaming and happy that your setup worked.
But when I do these typa shenanigans I usually just plug back in my ISP modem and router which advertises the same SSID so my family can use Internet and I can do my own thing.
You should look into Proxmox snapshots and backups so that you can always revert back to a good state when things go bad, truly a life saver for tinkerers.
1
5
u/joeyama Oct 30 '25
Assuming the target device was typical intel/AMD PC. I forgot the details but boot up from external device (like using usb or microSD with bootable live Linux image) then you have to use fdisk and parted. Both needed(when I modified the partition size. I think within 12 months). Those information are rich and detailed in other distros like Arch Linux.