GParted: core features lost due to parted's "improvements" in v3.0
git.gnome.org
git.gnome.org
In any case there are better ways to do this. I have an interest in this, having developed libguestfs[1] and virt-resize[2]. But I'd say that even if you don't use libguestfs, you must use the latest upstream kernel code and tools (as libguestfs does) because that's the code that will not corrupt your data.
While obviously gparted folk have got a bit of development work to do, which you can argue was made necessary by changes in libparted, really they should have taken a close look at all that crufty filesystem code in libparted, run a mile, and used the native tools a long time ago.
These are the facts available to me, I wasn't trying to bait anyone. I found it of common interest that in a year or so, when these parted/gparted versions arrive in the major distributions, you won't be able to do certain things with GParted you used to do, like resizing a FAT32 partition.
You could, if you were so inclined, fix the title now. "GParted 0.9.0 loses ability to resides FAT filesystems" might work.
About the scare quotes: I agree, I should've posted this in an unbiased way. I will change the title in a second to what you suggested.
These 'features' were removed because they were old, not well maintained, and don't fit into the core feature set of parted. You are better off relying on dedicated tools to do your filesystem specific operations.
I can already resize partitions manually with fdisk; What I liked was being able to resize the partitions, grow the FS to match, and write it all to disk easily.
Changes in behavior
Remove all FS-related (file system-related) sub-commands; these commands
are no longer recognized because they were all dependent on parted "knowing"
too much about file system: mkpartfs, mkfs, cp, move, check, resize.
This change removes not just the user interface bits, but also the
library functions and nearly all of the underlying FS-munging code.
The code embedded in Parted by which it knew about those file systems
was so old, unmaintainable and buggy that while seemingly drastic,
this change is like removing a gangrenous toe.(disclaimer: I wrote the HFS/HFS+ code.)
Removing code because it's "old" or unmaintainable but which relied on features require seems like a questionable decision to me.
Gparted isn't a game. It's a critical filesystem utility. Code that isn't maintainable is by definition vulnerable in terms of both security and functionality.
Functionality.. eh. Having used gparted extensively and not having a single problem among hundreds of filesystem resizes, I've got to thank the maintainers for finally forcing me to get off my ass and purchase a commercial solution that can be trusted to not have critical functionality yanked.
So thanks for that.
It's a concern because you may use parted/gparted on an untrusted virtual machine or a USB key. You don't want a malformed filesystem controlled by someone you don't mutually trust to subvert a tool running as root on your host.
libvirt[1] and libguestfs[2] specifically take steps to reduce the exposure. Parted did not, but it's now somewhat more secure for getting rid of features that are better done by another means.
A properly malicious filesystem will get you a compromised userspace program... big whoop, there are far far far more likely vectors for that, at least manipulating a strange and untrusted filesystem with gparted is something you have to try to do. The danger libguestfs is attempting to avoid does not apply here meaningfully.
That's exactly what libguestfs does.
> "Having used gparted extensively and not having a single problem among hundreds of filesystem resizes..."
Cool, just make sure you stick with your legacy hardware. Tell you what, go look at the gparted code, and tell me how it'll handle an HFS on my new 4k sector disks. If you can either reassure me or suggest a patch, I might change my mind.
Edit: I certainly don't mean this to insult any of the work of gparted's devs. I just picked HFS as an example. The fact that gparted works so well is a tribute to those developers (looking at you xilun0).
The FAT code works, why yank it? The NTFS code works, why yank it?
This is a serious question. What possible usage does one have for gparted/libparted over something like fdisk now? 99.99% of my use case (and other's use case, if looking over various forums means anything) was resizing of partitions to install some some *ix.
This decision boggles my mind.
My advice to you is to stick with the older versions of gparted.
I have had no involvement in Parted for years (i'm doing radically different things), but as the one who wrote the HFS shrinking code I think and can explain my opinion on the subject. In summary it's a good idea to remove FS code if it has unknown status because the environment changed, and nobody is there to check every details.
Data security is to be taken very seriously in that kind of tool, and getting confident enough that a good level was achieved was actually what took most of the time when i wrote the hfs shrinker (I even unplugged the computer tens of times while resizing, then checked that the whole content of all files on the whole fs did not changed, then checked that OS X still booted and worked properly, + checked some internal metadata field of the FS, and so over). A correct review + tests in the modern context would take a lot of time, and I don't know if somebody have it but I haven't had in the last few years, still don't have, plus I don't even have the needed hardware anymore, so nobody should count on me.
Also one would have to check that the HFS+/HFSX has not evolved and implement support for interesting additional features Apple could have introduced in recent years.
That makes me a little nostalgic, but I 100% agree that without a careful review it is better to remove it (people who know what they are doing can still use an older version of the software, it's free software after all) than leave that kind of code that is now having an unknown status since the context of the environment has changed.
Of course that opinion is only relevant for the HFS code. I know nearly nothing about the other parts.
Much respect to you for your gparted work.
Not anymore it isn't.
Edit: sorry, not vfs. I was thing vfat, but that's not really relevant either.
I expect FAT/VFS/HFS/etc have an equivalent of e2tools. I never really used those FSs anyway.
So if there are no errors?
I think the blame is more to be laid upon GParted than Parted; Parted seems to be going about their business normally, and GParted is apparently sticking to a philosophy of strict adherence to libparted without any additional dependencies?