I’ve been using Linux for a long time, and parted is my favorite tool when it comes to disk partitioning. No fancy GUI or menus, just like diskpart.exe.
Yesterday I flashed 25.12-rc3 to my rpi-3, then tried to grow the rootfs:
SquashFS image: I flashed and resized the mmcblk0p2 on another Linux system, before running first boot on the rpi-3. I also tried online resizing.
ext4 image: partition was resized on another Linux system, before running first boot on the rpi-3. I also tested with and without resize2fs.
The results were the same, as OpenWrt stuck at this screen:
Notice those four red pine cone pictures on your screen?
It appears you are using firmware that is not from the official OpenWrt project.
When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.
Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).
If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.
You can resize root in owut / /etc/config/attendedsysupgrade during (first) upgrade. That will not work with pineaplian or whatever you be running there.
not sure it’s the problem is with resizing of the partition. The boot to my untrained eyes looks hungup on something else other than a partition issue.
Everything starts with a fresh dd of the official images to my 32GB SDcard, then plugged into the Raspberry Pi 3 Model B+.
I have retried again and again more than a dozen of times over a few hours. It stuck after being manipulated with parted and boot/reboot. At the end, I gave up and use cfdisk. It works now, but I am still curious about the reason why.
I use GPARTED on my linux notebook to expand my EXT4 root partition. Simple 1-click “expand partition” to use all available space then click “Apply”. Never had an issue. Not sure why it doesn’t work in your case.
I do not see it anywhere in my screenshot. But you are right – it could not boot because of the PARTUUID has changed.
After you suggested, I tested it again. For some stupid reason, manipulating partition using parted (either mkpart or resizepart) changes the 4-bytes MBR signature. As the PARTUUIDs for MBR partitions are synthesized from MBR signature, they are changed as well. That’s probably why OpenWrt refused to boot.
I have to manually dump the signature using dd before resizing the partition, perform then restore the signature back to the SDcard. After that it works beautifully.
What are the developers of GNU parted thinking? Thanks for all the helps from you guys, I finally understand why.
P.S: most so-called “IT professionals” I know keep staying away from Linux because they cannot handle low level stuff like this.