Description of problem: sgdisk Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: a new partition with the requested label Additional info: There needs to be a metavalue (e.g. "." [dot]") to indicate the last selected partition (especially for a previously given "0:" argument Shell Script below demonstrates the failure and a clunky workaround except partition type is never changed #!/bin/bash TDN=/dev/sdc #Target Device Name CHANGEME! TVN=rpial #Target Volume Name TOLD=/tmp/$TVN-old #save current partition layout TNEW=/tmp/$TVN-new #save revised layout PAL="$TDN unit s print" #parted arg list #sgdisk $TDN --zap-all #DESTROY existing partitions! parted -s --machine $PAL >$TOLD #save current partition sgdisk --new=0:0:+160M $TDN --change-name=0:$TVN --typecode=0:0700 #The above line should create, label and type the new partition but does not #======================== result shown by cgdisk ======================= #Part. # Size Partition Type Partition Name #---------------------------------------------------------------- # 2 160.0 MiB Linux filesystem parted -s --machine $PAL >$TNEW TDP=`diff -e $TOLD $TNEW | cut -s -d ":" -f 1` sgdisk --change-name=$TDP:$TVN --typecode=$TDP:0700 -p $TDN partprobe #reread partition table parted -s $TDN print #partion type is never updated
Thanks for your report.
This is a wish-list item, not a bug per se. Nonetheless, I've added the ability to accept a "0" value to the -A, -c, -t, and -u options to sgdisk when a -n option existed earlier on the same command line. This is in git right now, and I expect to make a 0.8.10 release later today that will incorporate this improvement.
sgdisk --change-name=$TDP:$TVN --typecode=$TDP:0700 -p $TDN partprobe #reread partition table parted -s $TDN print change/show the 0700 type update now as well?
parted doesn't show most partitition type codes directly. SOME type codes it displays as "flags," but that's true for only a few type codes. The stock parted 3.1 doesn't show flags for what GPT fdisk identifies as type 0700 or type 8300, so the change from one of those to the other doesn't show up in parted. There is a patch to parted that's been languishing for years that will show that up as a flag -- what gdisk calls a type-0700 partition with have a "msftdata" flag set. (See http://lists.gnu.org/archive/html/bug-parted/2011-06/msg00026.html for the parted developers' discussion of this issue.) This patch is present in some distributions' parted releases, but IIRC Fedora hasn't yet picked it up. It should also make it into the next full release of parted. It's been 2 years (to the day! -- I just looked it up) since a regular parted release, so one is definitely overdue. If you want changes in parted, you should file a bug against it.
gdisk-0.8.10-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/FEDORA-2014-3330/gdisk-0.8.10-1.fc20
Package gdisk-0.8.10-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing gdisk-0.8.10-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-3330/gdisk-0.8.10-1.fc20 then log in and leave karma (feedback).
gdisk-0.8.10-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
gdisk-0.8.10-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
just curious, was the qa unit test revised to test this enhancement to prevent regression? I dont me to be insulting, I am ignorant of the fedora qa loop and seek enlightenment.
fedora don't add tests, if upstream provides test which are possible to run in the build enviroment (koji) packager normally try to run those tests. did that help you?