Hi. I'm trying to use parted 3.0 (and recently 2.3) as part of a scripted Linux installation. And I have encountered no end of obstacles. It won't work no matter what I try.
Where's the 'force' option, to make parted take the specified action no matter how much it wants to prevent me from doing what I want to do? 'mklabel gpt' either insists on asking me if I'm sure or won't take the action. Is parted zero-based, one-based, or an indeterminate mixture of the two? If I use units of Bytes and say to start the partition at byte 1048576, parted insists that it cannot start there, that it must start 512 bytes earlier. And where do partitions really start and end? If I use units of MiB, then I can start a partition at 1MiB and end it at 200MiB. But parted insists that the partition is 199MiB. So it seems the specified end is really the block *after* the last block of the parttion. But only for MiB. I've gone to the trouble of computing partition sizes to exact byte boundaries. And even *that* doesn't work. It is infuriating to have parted tell me that it cannot start a partition at byte 1048576, even though that byte is the first byte of the second 1MiB 'section'--it is well-aligned, and that the nearest it can find is byte 1048064, which is *clearly* not aligned to anything but 512-byte sectors. The documentation is horribly incomplete. How many years has parted existed? And trial&error is *still* the only way to find out what works and what doesn't? Parted is now at version 3.0; now is a fine time to fix the long-standing problems. Please go through the code with a nanometer-spaced comb and fix it. - Please choose one absolute byte where partitions can begin. Make it consistent throughout the entire program. Publish this number. - Please choose and publish an alignment scheme. I don't care if you choose 512-byte sectors, 4KiB sectors, 1MiB sectors, or even 1GiB sectors for partition alignment. Pick one and be consistent throughout the program. - Please make 'start' must be the first block or byte of the partition; fix the computations to perform error checking correctly regardless of the selected units. - Please make 'end' must be the last block or byte of a partition. Again, fix the computations to perform error checking correctly. - Please clearly state the last usable block or byte of the drive, or how to compute it; please don't force any more people to restort to trial and error to find out where they can end their disk usage. - Please clearly state *where* on the disk GPT stuff is stored. I have zeroed the first 100MB and last 100MB of a drive, only to have sfdisk whine about finding a GPT table. - Please correct the help. When an error is encountered, please tell the user what is wrong. The current, in essence, "Huh?" is about as useful as teats on a bull. - Please replace the '-s' option with a '--force' option per command that forces parted to take the action if it is otherwise correct. - Please send output to stdout and stderr regardless of what mode it's in. Parted is worthless to users when it operates in complete silence. - Please fix the file reading routine. When parted reads from a file and encounters a command error, it reads to EOF, usually finding nothing but errors and continues to bang against EOF until it is forcibly killed. - Please add an option that allows the user to completely and thoroughly disable parted's boundary fuzzification. And clearly document that feature. That is one reason I want to dump sfdisk. It is very counter- productive and infuriating to take the trouble to compute correct partition sizes and boundaries, only to have a brain-dead partitioner silently and blindly change those sizes and boundaries on the user (as does sfdisk), or seemingly randomly (as does parted). I wanted to dump fdisk/sfdisk because they insist on using CHS, which hasn't existed for about 10 years. But there is no apparent rhyme or reason to parted's errors and mistakes and there is no way to divine how to correct the errors. Please make parted handle the basics well before adding more features. 3.0 is sort-of a fresh start; take advantage of it to fix all these long-standing quirks, tics and idiosyncracies. My aim is to convey my extreme frustration with parted, not to direct vitriol at anyone. I'm updating an entire firewall distribution by myself. I hate when people find bugs despite my best efforts. But there will always be bugs, and I'm really glad people find them, because those people help me make the firewall better. Thank you, Neal P. Murphy _______________________________________________ bug-parted mailing list bug-parted@gnu.org https://lists.gnu.org/mailman/listinfo/bug-parted