Hello,
I am using openwrt 24.10 RC4 on raspberry pi 4 with 32GB SDCARD
There are unpartitioned empty space in the SDCARD.
Is there a way to expand filesystem or create new partition without restarting openwrt?
Thanks.
Hello,
I am using openwrt 24.10 RC4 on raspberry pi 4 with 32GB SDCARD
There are unpartitioned empty space in the SDCARD.
Is there a way to expand filesystem or create new partition without restarting openwrt?
Thanks.
new partition wouldn't require a restart.
https://openwrt.org/docs/guide-user/additional-software/extroot_configuration
Even if you create a new partition, It would disappear on update. That MBR gets overwritten. So if you want to go this route, you need to backup your MBR before and after, then restore 3rd partition table entry.
Not something I'd recommend unless you know exactly what you are doing.
If I needed it for some reason, I'd start my 3rd partition on 1gb mark @offset: 2097152
so there is no confusion later and leaves room for expansion of OpenWRT.
Probably not what you were looking for.
in theory if you recreate the same partition, with the same start and end point, the data inside it should remain intact ....
again, in theory, Accenture CxO PowerPoint technical level.
*** DISCLAIMER: UNTESTED ***
It does afaik, you might get a signature warning. Its been a while since I was desperate for space. But you could run a script that restores that 3rd entry if its missing on boot although it might need another reboot to get picked up.
backup mbr:
dd if=/dev/mmcblk0 bs=512 count=1 of=/etc/config/.mbr
restore mbr:
dd if=/etc/config/.mbr bs=512 count=1 of=/dev/mmcblk0
save-entry:
dd if=/dev/mmcblk0 bs=1 skip=$((0x1DE)) count=16 of=/etc/config/.partition3
restore-entry:
dd if=/etc/config/.partition3 bs=1 seek=$((0x1DE)) count=16 of=/dev/mmcblk0
All posix, no extra tools needed.
Recommended: no
, doable: yes
.
On a fresh install, can i expand root file system on sdcard outside raspberry pi? Using some windows computer and some 3rd party software?
It would have been a nice feature, if openwrt on first boot auto expand to fill up space (similar to how raspberry pi os does)
Nice one
Will it keep the data in expanded partition after each firmware upgrade by using this script?
JFTR: That very much depends. On several targets, sysupgrade only resets the MBR if the default partitions differ, otherwise it will preserve the partition table including any additional partitions. This is why I generally recommend not to resize the rootfs unless there's a really good reason for it -- and "because I can and i have the space" is not a good reason.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.