[SOLVED] How to get a bigger installation partition on OpenWrt

I’m trying to install OpenWrt on an hp-PRODESK-600/8GB ram/240GB SSD with only one Ethernet port. Installation is performed using
/releases / 23.05.2 / targets / x86 / 64 / generic-ext4-combined-efi.img.gz

When proceeding to write the image file to the SSD I find that most of the drive capacity is unusable. The original image is creating 3 partitions numbered 1 , 2 and 128 .
the original "burn" is booting fine on the PRODESK mini PC but when I try to change the partition number 2 to a bigger size, I no longer can boot the PC. Here are the steps performed on a Linux computer ( not the PRODESK):

1- fdisk /dev/sdb
2- delete partition 2
3- new partition with same starting point and bigger ending point.
4- signature remains the same
5- e2fsck -f /dev/sdb2
6- resize2fs -f /dev/sdb2

Done !
At this point the SSD is disconnected from the computer and inserted into PRODESK then power ON. OpenWrt will boot and show some vital signs but will freeze 1.44 seconds later. The initialisation will not complete. One minute later there will be two more lines on the screen an then nothing.

Something is wrong in my attempt the gain disk space.

The Question: What would be the correct procedure to change the partitioning of the original image such that I gain more space on the OpenWrt drive ?

Any help appreciated. Cheers.

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

1 Like

You are a King.
thanks

You’re welcome.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

I was able to execute the Automated option.
There is probably a subsequent step to do, for after reboot nothing has changed.
In order to implement the change I resorted to run the example snippet:

opkg update
opkg install parted losetup resize2fs

Followed by
sh /etc/uci-defaults/70-rootpt-resize
Then the PRODESK PC rebooted and the SSD light flashed for a while and I got full size deployed.
Thanks again for your great help!
Expending File System

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