Expanding root soft-bricks Raspberry Pi 5

I am familiar with Linux, I followed your process fine.

Ultimately, I need a scripted, online, solution but that wasn't clear in the op.

With the explanations over in this thread: [HOWTO] Resizing root partition on x86 (March 2023 edition) - #4 by NC1
I was able to use your process online as well, and it works fine. I might try to script it.

I'm still working out why the script from the wiki doesn't work. I was able to plug in a monitor to see the boot, and it hangs at "waiting for root partition at /dev/mmcblk0..." on the first reboot after running the script provided in the wiki.

Scripting has been done already (big thanks to @vgaetera):

https://openwrt.org/docs/guide-user/advanced/expand_root

Briefly, you do something like this:

opkg update && opkg install parted losetup resize2fs
cd /root 
wget -U "" -O expand-root.sh "https://openwrt.org/_export/code/docs/guide-user/advanced/expand_root?codeblock=0"
. ./expand-root.sh
sh /etc/uci-defaults/70-rootpt-resize

The device reboots twice, and your resizing is done...

yea...see...thats is exactly what i am saying. You can see that i have tried that script in the OP.

that script results in failure to boot on the raspi 5 on the first reboot. I have tried it several times. no luci, no ssh. it is hung up at boot with a message like "waiting for root at /dev/mmcblk1" or something. Because there is no ssh, the only remedy I have is reflashing but that takes us back to 100MB root.

That is the problem.

i fix this by follow this method on ext4
https://openwrt.org/docs/guide-user/installation/installation_methods/sd_card

but before reboot step i change UUID so can system boot again, because openwrt boot using UUID of disk, and after resizepart this uuid change to new value, so if you reboot the system it will try booting use the old value.

you need to install blkid to get uuid

root@OpenWrt:~# blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL_FATBOOT="boot" LABEL="boot" UUID="666B-19F3" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="594455cd-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="ff313567-e9f1-5a5d-9895-3ba130b4a864" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="594455cd-02"

new UUID of partition is 594455cd

after get new uuid change content of following file with 594455cd

/boot/partuuid.txt

also change PARTUUID= in following file

/boot/cmdline.txt
console=tty1 console=serial0,115200 root=PARTUUID=594455cd-02 rootfstype=squashfs,ext4 rootwait

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.