1 (edited by dukenukke 2017-09-12 09:44:37)

Topic: tune2fs -O option. Resizing the rootfs partition.

Hardware: OlinuxinoMaxi (iMX233)
Software: custom build with BusyBox v1.24.2
I'm trying to resize rootfs at first start to use whole space on the SD card. Currently my image has 500Mb in size, SD card has 8Gb.
This can be done by fdisk and resize2fs utilities as described here:
h t t p ://elinux.org/RPi_Resize_Flash_Partitions
But when I'm trying to run resize2fs, I get following error:

resize2fs: Operation not permitted While trying to add group #5

I'm trying to apply the following approach (thread 68604 of this forum):

tune2fs -O ^has_journal /dev/mmcblk0p3

then recreate partition by fdisk and then:

tune2fs -O dir_index,has_journal,uninit_bg /dev/mmcblk0p3

but executing of tune2fs rises the following error message:

root@OpenWrt:~# tune2fs -O ^has_journal /dev/mmcblk0p3
tune2fs: unrecognized option: O
BusyBox v1.24.2 () multi-call binary.

Does it possible to compile Busybox with tune2fs having -O option? Or is there any other way to resize rootfs partition in OpenWRT?

Re: tune2fs -O option. Resizing the rootfs partition.

You can't do this operation on a live root filesystem anyway. I regularly do this when installing a new image, but always boot some other distro off a USB memory stick and then run the tune2fs and resizefs commands