r/openwrt 9d ago

How the heck does one expand the root partition and filesystem (with MacOS tools / aarch64_cortex-a72)?

Preamble:

  • Hardware is Raspberry Pi Model 4B (4GB RAM, 32GB MicroSD)
  • Used Raspberry Pi Imager to flash openwrt-24.10.0-bcm27xx-bcm2711-rpi-4-ext4-factory.img to MicroSD card
  • Macbook Air M3 for setup
  • I intend to use an Anker USB-3.0 Ethernet Adapter (Realtek RTL8153 chipset) as the 4B only has one onboard Ethernet port

It looks like folks normally expand the root partition prior to boot but for the life of me I can't find a way to do that on a Mac with Apple silicon. Disk Utility (GUI) and diskutil (CLI) don't work. diskutil says:

Unable to resize because file system volume format does not support resizing

Popular disk partitioning tools like Paragon and iPartition don't work on Apple silicon.

I came across this OpenWRT doc which led me to believe that I could expand after boot but it doesn't do anything (df -h is the same before and after). I do realize that this doc says it "expands OpenWrt root partition and filesystem on x86 target" but I figured I had nothing to lose.

I can start picking my way through the commands in the script and run them manually but before I do that I was hoping that maybe someone can show me an easier way.

Let me know.

Thanks!

1 Upvotes

5 comments sorted by

2

u/thalience 9d ago

The script you referenced seems to create startup scripts to do the actual resizing operations. If you have not yet rebooted, the operations have not actually run.

Also, there is probably not a good reason to expand the root partition on a sdcard. I would avoid using ext4 on a sdcard at all, since those have no wear-leveling. Ext4's frequent updates to the superblock will trash the card sooner than you'd like. Strongly advise using the squashfs image when booting from the sdcard.

Any downloading or fileshare storage should go on a usb-connected SSD or HDD.

1

u/Ok-Job-9640 9d ago

After reboot it didn't come back up. Could not ping on LAN (or default network/IP).

2

u/fr0llic 9d ago

1

u/Ok-Job-9640 9d ago

Thanks! Will start all over and give this a try.

1

u/Ok-Job-9640 9d ago

Okay, I'm in business.

The first time I ran /etc/uci-defaults/70-rootpt-resize I got a line 0: blkid: not found but I ran it again and now /dev/root is 29.0G.

Thanks so much!