Gparted without GUI / X

gpartedparted

Is there a CLI gparted version without GUI / X?

parted shows warnings like the following when resizing / moving partitions:

WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.

or

Error: file system has incompatible feature enabled. Compatible features are has_journal, dir_index, filetype, sparse_super and large_file Use tune2fs or debugfs to remove features.

gparted can move / resize them. I thought they were using the same libraries. Is there any alternative to parted?

Best Answer

The filesystem resize ability was long crufty and unmaintained in parted, which is why it was removed in the 3.0 release several years ago. If you update to the latest parted 3.2, it has a resizepart command that only resizes the partition, and you have to use another filesystem specific utility to resize the filesystem within the partition. In the case of ext[234] that is resize2fs. When expanding the partition you resize the partition first, then the filesystem. When shrinking, you reverse the order, and make sure you leave a little extra room just in case; you can always re-expand the fs after resizing the partition.

Related Question