OpenWrt arm qemu increase disk space

hello, using openwrt with qemu on a raspberrypi4 works really fine, but now I got too less disk space. I didn't find any how to's to increase the space. any ideas?

thx in advance!

so long

1 Like

Recreate a bigger openwrt disk image based on the official original disk image - #2 by vgaetera

4 Likes

thx, you are my hero!

I did following steps, maybe it's not correct but it worked for me:

/var/lib/libvirt/images/qemu-img resize -f raw openwrt-*.img 300M

#log in via ssh to openwrt
# Install packages
opkg update
opkg install parted losetup resize2fs
 
# Identify disk name and partition number
echo -e "ok\nfix" | parted -l ---pretend-input-tty
 
# Expand root partition
parted -s /dev/vda resizepart 1 100%
 
# Apply changes
reboot

# Map loop device to root partition
losetup /dev/loop1 /dev/vda
 
# Expand root filesystem
resize2fs -f /dev/loop1
 
# Apply changes
reboot
1 Like

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