Parted can't handle lack of space between logical partitions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| parted (Debian) |
New
|
Unknown
|
||
| parted (Ubuntu) |
High
|
Unassigned |
Bug Description
message as follows
Libparted bug found!
Assertion (metadata_length > 0) at ../../.
Curtis Gedak (gedakc) wrote : | #1 |
Phillip Susi (psusi) wrote : | #2 |
Actually Curtis, there have been a few reports of this upstream recently. It seems that some partitioning tool out there likes to start logical volumes on the very first sector following the previous logical volume, rather than leaving one or two sectors to hold the EBR, and instead locate the EBR for that volume somewhere else. libparted can't deal with this.
antoni helms, if you could add the output of fdisk -l that would help confirm that is the case here. Also if you can tell us what sort of partitioning tools you have been using to get the disk into this state that might be helpful.
antoni helms (tonythetech) wrote : | #3 |
Thanks Philip attached is screenshot of output of fdisk -l
BTW I am running Ubuntu 15.10
Phillip Susi (psusi) wrote : | #4 |
Yep: sdb6 abd sdb7 have no space between then. How did you create these partitions?
antoni helms (tonythetech) wrote : | #5 |
I have uses Easus Partitionmanager in Windows
Launchpad Janitor (janitor) wrote : | #6 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in gparted (Ubuntu): | |
status: | New → Confirmed |
Ed Broadley (rebroad+ubuntu) wrote : | #7 |
Also, getting this error. fdisk output:-
Disk /dev/sdb: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00016dec
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 767444991 767442944 366G f W95 Ext'd (LBA)
/dev/sdb2 767447040 1032615935 265168896 126.5G 7 HPFS/NTFS/exFAT
/dev/sdb4 1032615936 1953458175 920842240 439.1G 83 Linux
/dev/sdb5 4096 735139839 735135744 350.6G 83 Linux
/dev/sdb6 735139840 763346943 28207104 13.5G 83 Linux
/dev/sdb7 763348992 767444991 4096000 2G b W95 FAT32
Partition table entries are not in disk order.
Ed Broadley (rebroad+ubuntu) wrote : | #8 |
I'm using Ubuntu 15.10
Nishihama Kenkowo (hitobashira) wrote : | #9 |
I had similar, before 4Weeks, in ubuntu 16.04 beta.
Assertion (metadata_length > 0) at ../../.
----
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)
----
$ sudo fdisk -l /dev/sda
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x50632122
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 14336 209728574 209714239 100G 7 HPFS/NTFS/exFAT
/dev/sda2 209729536 250689535 40960000 19.5G 3 XENIX usr
/dev/sda3 250689536 291650473 40960938 19.5G 3 XENIX usr
/dev/sda4 291651583 500100343 208448761 99.4G f W95 Ext'd (LBA)
/dev/sda5 291651646 332625887 40974242 19.6G 83 Linux
/dev/sda6 332625888 353108699 20482812 9.8G 7 HPFS/NTFS/exFAT
/dev/sda7 353112064 500100343 146988280 70.1G 83 Linux
Curtis Gedak (gedakc) wrote : | #10 |
@Nishihama ,
This issue is caused when there is less than two unallocated sectors between logical partitions. The Extended Boot Record is stored in the unallocated sector area. In your situation the problem arises with sda5 and sda6 sda5.
332625887 end of sda5
332625888 start of sda6
The source of the crash is in the libparted library, and hence will show up with partition tools that use libparted, such as parted or gparted.
This issue was also reported in upstream Debian. See:
Debian Bug report logs - #819488 gparted crash with a libparted backtrace
https:/
affects: | gparted (Ubuntu) → parted (Ubuntu) |
summary: |
- Gparted crashed on loading + Parted can't handle lack of space between logical partitions |
Changed in parted (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
V字龍(Vdragon) (vdragon) wrote : | #11 |
Hi, I encountered the same issue however I merely just fix the wrong order of logical partition using fdisk.
V字龍(Vdragon) (vdragon) wrote : | #12 |
Here's the details and reproducible steps on Parted mailinglist:
http://
Interestingly, while
Number Start End Size Type File system Flags
1 1s 204799s 204799s extended lba
6 3s 202751s 202749s logical
5 202752s 204799s 2048s logical
does lack of space between logical partitions Parted doesn't complain, while after I fix the order of partitions using fdisk like this
Device Start End Sectors Size Id Type
1 1 204799 204799 100M f W95 Ext'd (LBA)
5 3 202751 202749 99M 83 Linux
6 202752 204799 2048 1M 83 Linux
Parted starts to crash...
V字龍(Vdragon) (vdragon) wrote : | #13 |
BTW,
Number Start End Size Type File system Flags
1 1s 204799s 204799s extended lba
6 3s 202751s 202749s logical
5 202752s 204799s 2048s logical
is actually entirely produced built by Parted.
JEMYZHANG (jemy-zhang) wrote : | #14 |
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_
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)
Roberto Pogliani (roberto321) wrote : | #15 |
I tested a workaround that seems to be good till when this bug will officially fixed
I am installing Ubuntu 16.04.1
When mooving a partition with gparted I got the same bug:
metadata_length > 0, add_logical_
After reading your comments, I edited the partition and put a small unallocated space after partition, just 2MB
In this way partition has been moved and resized correctly without errors
Changed in parted (Debian): | |
status: | Unknown → New |
anatoly techtonik (techtonik) wrote : | #16 |
I am facing this bug as well. =(
Device Boot Start End Sectors Size Id Type
/dev/loop22p1 2048 3074047 3072000 1.5G 27 Hidden NTFS WinRE
/dev/loop22p2 3074088 55119014 52044927 24.8G 7 HPFS/NTFS/exFAT
/dev/loop22p3 55119015 488392064 433273050 206.6G 5 Extended
/dev/loop22p5 * 55119078 56179304 1060227 517.7M 83 Linux
/dev/loop22p6 56179368 76437269 20257902 9.7G 83 Linux
/dev/loop22p7 97755588 102253724 4498137 2.1G 82 Linux swap / Solaris
/dev/loop22p8 102253788 488392064 386138277 184.1G 83 Linux
/dev/loop22p9 76437271 97754901 21317631 10.2G 8e Linux LVM
Partition table entries are not in disk order.
techtonik@
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: /lib/x86_
5: parted(+0x7794) [0x5636dc478794]
4: parted(
3: parted(main+0x121e) [0x5636dc4772be]
2: /lib/x86_
1: parted(_start+0x2a) [0x5636dc47748a]
anatoly techtonik (techtonik) wrote : | #17 |
Oops. This is the correct `sudo fdisk -l -u` table for /dev/sda
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2000895 1998848 976M 83 Linux
/dev/sda2 2002942 392624127 390621186 186.3G 5 Extended
/dev/sda3 1759543296 3907026943 2147483648 1T 83 Linux
/dev/sda5 2002944 163719167 161716224 77.1G 83 Linux
/dev/sda6 163721216 197314559 33593344 16G 82 Linux swap / Solaris
/dev/sda7 197314560 392624127 195309568 93.1G 83 Linux
Partition table entries are not in disk order.
Joe le Kiffeur (joelekiffeur) wrote : | #18 |
I confirmed on Ubuntu 19.10.
Also, I can't use GParted in as Clonezilla live ISO.
Changed in parted (Ubuntu): | |
status: | Triaged → Confirmed |
assignee: | nobody → Joe le Kiffeur (joelekiffeur) |
assignee: | Joe le Kiffeur (joelekiffeur) → nobody |
If I recall correctly this is an old problem that was fixed in newer versions of the libparted library used by GParted.
I assume that you are running on an older version of Ubuntu. If you only wish to use the latest version of GParted, you might try booting from media containing GParted Live.
http:// gparted. org/livecd. php