On Tue, Apr 19, 2016 at 1:42 AM, Phillip Susi <ps...@ubuntu.com> wrote: > On 04/15/2016 09:35 AM, Anatoly Pugachev wrote: >> You found a bug in GNU Parted! Here's what you have to do: .... >> >> Assertion (bios_geom->cylinders == (PedSector) (dev->length / >> cyl_size)) at ../../../libparted/labels/sun.c:190 in function >> sun_alloc() failed. > > I don't know how the sun disklabel works, so it might blow up in a > shower of sparks, but you might try commenting out that assert and see > if it works. See if you can manipulate the existing partition table > too, before creating a new one.
just tried to create a new partition and remove it after - works. tried to compile parted.git , but it failed: $ git clone git://git.savannah.gnu.org/parted.git $ ./bootstrap $ ./configure && make ... make[4]: Entering directory '/home/mator/parted.git/libparted/labels' CC aix.lo aix.c: In function 'aix_label_magic_get': aix.c:45:10: error: cast increases required alignment of target type [-Werror=cast-align] return *(unsigned int *)label; ^ aix.c: In function 'aix_label_magic_set': aix.c:51:3: error: cast increases required alignment of target type [-Werror=cast-align] *(unsigned int *)label = magic_val; ^ cc1: all warnings being treated as errors Makefile:1238: recipe for target 'aix.lo' failed make[4]: *** [aix.lo] Error 1 make[4]: Leaving directory '/home/mator/parted.git/libparted/labels' Makefile:1151: recipe for target 'all' failed make[3]: *** [all] Error 2 ... mator@deb4g:~/parted.git$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/5/lto-wrapper Target: sparc64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 5.3.1-13' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-sparc64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-sparc64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-sparc64 --with-arch-directory=sparc64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-targets=all --with-long-double-128 --enable-multilib --enable-checking=release --build=sparc64-linux-gnu --host=sparc64-linux-gnu --target=sparc64-linux-gnu Thread model: posix gcc version 5.3.1 20160323 (Debian 5.3.1-13) the only way to compile parted for me , is to pass --disable-gcc-warnings to configure. Creating a new partition and removing it with git compiled parted works. Commenting out PED_ASSERT at libparted/labels/sun.c , line 189 , and compiling again, allow to create sun/gpt/msdos labels. (after msdos label has been created) (parted) p Model: SEAGATE ST914602SSUN146G (scsi) Disk /dev/sda: 147GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags (parted) mklabel New disk label type? Sun Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? Yes Warning: The disk has 562233 cylinders, which is greater than the maximum of 65536. (parted) p Model: SEAGATE ST914602SSUN146G (scsi) Disk /dev/sda: 147GB Sector size (logical/physical): 512B/512B Partition Table: sun Disk Flags: Number Start End Size File system Flags (parted) Thanks for help.