GNU bug report logs - #46272
Bug with new parted 3.4 version. Unable to handle one of my disk.

Previous Next

Package: parted;

Reported by: Eric Valette <eric.valette <at> free.fr>

Date: Wed, 3 Feb 2021 14:39:02 UTC

Severity: normal

To reply to this bug, email your comments to 46272 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#46272; Package parted. (Wed, 03 Feb 2021 14:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Valette <eric.valette <at> free.fr>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Wed, 03 Feb 2021 14:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Valette <eric.valette <at> free.fr>
To: bug-parted <at> gnu.org
Subject: Bug with new parted 3.4 version. Unable to handle one of my disk.
Date: Wed, 03 Feb 2021 15:22:35 +0100
[Message part 1 (text/plain, inline)]
Package: parted

Version: 3.4

parted /dev/sdb
GNU Parted 3.4
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help                                                             
  align-check TYPE N                       check partition N for TYPE(min|opt) alignment
  help [COMMAND]                           print general help, or help on COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a particular partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START and END
  resizepart NUMBER END                    resize partition NUMBER
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  disk_set FLAG STATE                      change the FLAG on selected device
  disk_toggle [FLAG]                       toggle the state of FLAG on selected device
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and copyright information of GNU Parted
(parted) print                                                            
Backtrace has 14 calls on stack:
  14: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x45) [0x7f42e4569c85]
  13: /lib/x86_64-linux-gnu/libparted.so.2(+0x267e7) [0x7f42e45817e7]
  12: /lib/x86_64-linux-gnu/libparted.so.2(+0x1369a) [0x7f42e456e69a]
  11: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_add_partition+0x1bc) [0x7f42e456ef3c]
  10: /lib/x86_64-linux-gnu/libparted.so.2(+0x27295) [0x7f42e4582295]
  9: /lib/x86_64-linux-gnu/libparted.so.2(+0x27447) [0x7f42e4582447]
  8: /lib/x86_64-linux-gnu/libparted.so.2(+0x272d9) [0x7f42e45822d9]
 7: /lib/x86_64-linux-gnu/libparted.so.2(+0x27501) [0x7f42e4582501]
  6: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_new+0x48) [0x7f42e456e9f8]
  5: parted(+0x8b29) [0x5618f9641b29]
  4: parted(interactive_mode+0x187) [0x5618f96473a7]
  3: parted(main+0x1376) [0x5618f963fdd6]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f42e4336d0a]
  1: parted(_start+0x2a) [0x5618f963fe5a]


You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:

        http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.
If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:

        http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (3.4)
along with the error message below, the output of

        parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Assertion (metadata_length > 0) at ../../../libparted/labels/dos.c:2359 in function add_logical_part_metadata() failed.

Aborted
root <at> tri-yann4:~# parted /dev/sdb unit co print unit s print
Backtrace has 14 calls on stack:
  14: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x45) [0x7efefbf72c85]
  13: /lib/x86_64-linux-gnu/libparted.so.2(+0x267e7) [0x7efefbf8a7e7]
  12: /lib/x86_64-linux-gnu/libparted.so.2(+0x1369a) [0x7efefbf7769a]
  11: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_add_partition+0x1bc) [0x7efefbf77f3c]
  10: /lib/x86_64-linux-gnu/libparted.so.2(+0x27295) [0x7efefbf8b295]
  9: /lib/x86_64-linux-gnu/libparted.so.2(+0x27447) [0x7efefbf8b447]
  8: /lib/x86_64-linux-gnu/libparted.so.2(+0x272d9) [0x7efefbf8b2d9]
  7: /lib/x86_64-linux-gnu/libparted.so.2(+0x27501) [0x7efefbf8b501]
  6: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_new+0x48) [0x7efefbf779f8]
  5: parted(+0x8b29) [0x55e3bf3dab29]
  4: parted(non_interactive_mode+0xb8) [0x55e3bf3e0518]
  3: parted(main+0x1265) [0x55e3bf3d8cc5]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7efefbd3fd0a]
  1: parted(_start+0x2a) [0x55e3bf3d8e5a]

....
 
Assertion (metadata_length > 0) at ../../../libparted/labels/dos.c:2359 in function add_logical_part_metadata() failed.

Aborted


sfdisk -V /dev/sdb
/dev/sdb:
No errors detected.
Remaining 13226 unallocated 512-byte sectors.

sfdisk -d /dev/sdb > my_disk_partition.txt

more my_disk_partition.txt
label: dos
label-id: 0x0006411f
device: /dev/sdb
unit: sectors
sector-size: 512

/dev/sdb1 : start=        2048, size=   117184512, type=7, bootable
/dev/sdb3 : start=   117188606, size=   117252098, type=5
/dev/sdb5 : start=   117190656, size=    41013248, type=83
/dev/sdb6 : start=   158203904, size=     9762816, type=83
/dev/sdb7 : start=   167968768, size=    13670400, type=83
/dev/sdb8 : start=   181641216, size=     1951744, type=83
/dev/sdb9 : start=   183595008, size=    39059456, type=83
/dev/sdb10 : start=   222656512, size=    11784192, type=82

To recreate an identically partitionned disk

you can recreate the same disk format via: 

sfdisk /dev/sdb < my_disk_partition.txt  

  
-- 
Eric Valette
[Message part 2 (text/html, inline)]

Information forwarded to bug-parted <at> gnu.org:
bug#46272; Package parted. (Wed, 03 Feb 2021 18:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 46272 <at> debbugs.gnu.org (full text, mbox):

From: Eric Valette <eric.valette <at> free.fr>
To: 46272 <at> debbugs.gnu.org
Subject: Additional info : partition alignment is old for this disk (was one
 sector not one MiB)
Date: Wed, 3 Feb 2021 17:43:01 +0100
Apparently the fact that part 5 and 6 (two first extended partition) 
have no space at all between them is what causes the bug.

The sfdisk command to recreate my partitioning may fail and probably 
because the default value for gain is NOW 1 MiB when it was one sector 
long time ago. Man sfdisk to see gain definition.

Try the following file instead (not tested)

more my_disk_partition.txt
label: dos
label-id: 0x0006411f
device: /dev/sdb
unit: sectors
sector-size: 512
gain: 512

/dev/sdb1 : start=        2048, size=   117184512, type=7, bootable
/dev/sdb3 : start=   117188606, size=   117252098, type=5
/dev/sdb5 : start=   117190656, size=    41013248, type=83
/dev/sdb6 : start=   158203904, size=     9762816, type=83
/dev/sdb7 : start=   167968768, size=    13670400, type=83
/dev/sdb8 : start=   181641216, size=     1951744, type=83
/dev/sdb9 : start=   183595008, size=    39059456, type=83
/dev/sdb10 : start=   222656512, size=    11784192, type=82

To recreate an identically partitioned disk

you can recreate the same disk format via:

sfdisk /dev/sdb < my_disk_partition.txt


-- eric




Information forwarded to bug-parted <at> gnu.org:
bug#46272; Package parted. (Sun, 21 Feb 2021 10:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 46272 <at> debbugs.gnu.org (full text, mbox):

From: Eric Valette <eric.valette <at> free.fr>
To: 46272 <at> debbugs.gnu.org
Subject: easus partition manager tools was able to resize the bugged partition
Date: Sun, 21 Feb 2021 11:48:47 +0100
So while I understand my partition table could seems broken, other tools 
are able to display and fix it.

-- eric




This bug report was last modified 3 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.