I was encounter with this problem after I fix disk order with fdisk.
**before fix:** Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0xee678789
设备 启动 Start 末尾 扇区 Size Id 类型 /dev/sda1 * 2048 62916607 62914560 30G 83 Linux /dev/sda3 62916608 976773119 913856512 435.8G f W95 扩展 (LBA) /dev/sda5 79720448 976773119 897052672 427.8G 83 Linux /dev/sda6 62918656 79720447 16801792 8G 82 Linux 交换 / Solaris
Partition table entries are not in disk order.
**after fix:** Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0xee678789
设备 启动 Start 末尾 扇区 Size Id 类型 /dev/sda1 * 2048 62916607 62914560 30G 83 Linux /dev/sda3 62916608 976773119 913856512 435.8G f W95 扩展 (LBA) /dev/sda5 62918656 79720447 16801792 8G 82 Linux 交换 / Solaris /dev/sda6 79720448 976773119 897052672 427.8G 83 Linux
**backtrace of gparted** ====================== libparted : 3.2 ====================== Backtrace has 15 calls on stack: 15: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x44) [0x7fa92ca88ea4] 14: /lib/x86_64-linux-gnu/libparted.so.2(+0x1e45f) [0x7fa92ca9c45f] 13: /lib/x86_64-linux-gnu/libparted.so.2(+0xf8ba) [0x7fa92ca8d8ba] 12: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_add_partition+0x25f) [0x7fa92ca8e1af] 11: /lib/x86_64-linux-gnu/libparted.so.2(+0x1dd4f) [0x7fa92ca9bd4f] 10: /lib/x86_64-linux-gnu/libparted.so.2(+0x1dde0) [0x7fa92ca9bde0] 9: /lib/x86_64-linux-gnu/libparted.so.2(+0x1dd89) [0x7fa92ca9bd89] 8: /lib/x86_64-linux-gnu/libparted.so.2(+0x1ed75) [0x7fa92ca9cd75] 7: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_new+0x48) [0x7fa92ca8ddd8] 6: /usr/sbin/gpartedbin() [0x466c0e] 5: /usr/sbin/gpartedbin() [0x47555e] 4: /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1(+0x4e67d) [0x7fa92df9967d] 3: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x70bc5) [0x7fa92cf51bc5] 2: /lib/x86_64-linux-gnu/libpthread.so.0(+0x76fa) [0x7fa92bdc26fa] 1: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fa92baf8b5d] Assertion (metadata_length > 0) at ../../../libparted/labels/dos.c:2313 in function add_logical_part_metadata() failed. Aborted (core dumped)
I was encounter with this problem after I fix disk order with fdisk.
**before fix:**
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xee678789
设备 启动 Start 末尾 扇区 Size Id 类型
/dev/sda1 * 2048 62916607 62914560 30G 83 Linux
/dev/sda3 62916608 976773119 913856512 435.8G f W95 扩展 (LBA)
/dev/sda5 79720448 976773119 897052672 427.8G 83 Linux
/dev/sda6 62918656 79720447 16801792 8G 82 Linux 交换 / Solaris
Partition table entries are not in disk order.
**after fix:**
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xee678789
设备 启动 Start 末尾 扇区 Size Id 类型
/dev/sda1 * 2048 62916607 62914560 30G 83 Linux
/dev/sda3 62916608 976773119 913856512 435.8G f W95 扩展 (LBA)
/dev/sda5 62918656 79720447 16801792 8G 82 Linux 交换 / Solaris
/dev/sda6 79720448 976773119 897052672 427.8G 83 Linux
**backtrace of gparted** ======= ======= = ======= ======= = 64-linux- gnu/libparted. so.2(ped_ assert+ 0x44) [0x7fa92ca88ea4] 64-linux- gnu/libparted. so.2(+0x1e45f) [0x7fa92ca9c45f] 64-linux- gnu/libparted. so.2(+0xf8ba) [0x7fa92ca8d8ba] 64-linux- gnu/libparted. so.2(ped_ disk_add_ partition+ 0x25f) [0x7fa92ca8e1af] 64-linux- gnu/libparted. so.2(+0x1dd4f) [0x7fa92ca9bd4f] 64-linux- gnu/libparted. so.2(+0x1dde0) [0x7fa92ca9bde0] 64-linux- gnu/libparted. so.2(+0x1dd89) [0x7fa92ca9bd89] 64-linux- gnu/libparted. so.2(+0x1ed75) [0x7fa92ca9cd75] 64-linux- gnu/libparted. so.2(ped_ disk_new+ 0x48) [0x7fa92ca8ddd8] gpartedbin( ) [0x466c0e] gpartedbin( ) [0x47555e] x86_64- linux-gnu/ libglibmm- 2.4.so. 1(+0x4e67d) [0x7fa92df9967d] 64-linux- gnu/libglib- 2.0.so. 0(+0x70bc5) [0x7fa92cf51bc5] 64-linux- gnu/libpthread. so.0(+0x76fa) [0x7fa92bdc26fa] 64-linux- gnu/libc. so.6(clone+ 0x6d) [0x7fa92baf8b5d] ./libparted/ labels/ dos.c:2313 in function add_logical_ part_metadata( ) failed.
=======
libparted : 3.2
=======
Backtrace has 15 calls on stack:
15: /lib/x86_
14: /lib/x86_
13: /lib/x86_
12: /lib/x86_
11: /lib/x86_
10: /lib/x86_
9: /lib/x86_
8: /lib/x86_
7: /lib/x86_
6: /usr/sbin/
5: /usr/sbin/
4: /usr/lib/
3: /lib/x86_
2: /lib/x86_
1: /lib/x86_
Assertion (metadata_length > 0) at ../../.
Aborted (core dumped)