GNU bug report logs - #22967
parted 3.2 fails to read MBR partition table where parted 2.3 was ok

Previous Next

Package: parted;

Reported by: a <mapibid <at> hotmail.com>

Date: Wed, 9 Mar 2016 22:57:02 UTC

Severity: normal

To reply to this bug, email your comments to 22967 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#22967; Package parted. (Wed, 09 Mar 2016 22:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to a <mapibid <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Wed, 09 Mar 2016 22:57:02 GMT) Full text and rfc822 format available.

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

From: a <mapibid <at> hotmail.com>
To: "bug-parted <at> gnu.org" <bug-parted <at> gnu.org>
Subject: parted 3.2 fails to read MBR partition table where parted 2.3 was ok
Date: Wed, 9 Mar 2016 22:33:16 +0000
Hello, (sorry if duplicate, but my previous send doesn't seem to appear 
on the mailing list !)

I got a problem here with my MBR partition table and parted 3.2 which 
only detects a "loop" partition table while 2.3 is ok.

----------------------------------------------------
Things are working perfectly with parted 2.3:

GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA SAMSUNG HD160JJ (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
  1      32.3kB  41.1MB  41.1MB  primary   fat32        hidden
  2      41.1MB  51.6GB  51.5GB  primary   ntfs         boot
  3      51.6GB  72.9GB  21.3GB  primary   ntfs         hidden
  4      72.9GB  160GB   87.1GB  extended               lba
  5      101GB   105GB   4294MB  logical   ntfs
  6      105GB   131GB   25.2GB  logical   ntfs
  7      131GB   156GB   25.2GB  logical   ntfs
  8      156GB   160GB   4345MB  logical   ntfs


Or the same with "parted /dev/sda unit s print":
Model: ATA SAMSUNG HD160JJ (scsi)
Disk /dev/sda: 312581808s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End         Size        Type      File system  Flags
  1      63s         80324s      80262s      primary   fat32        hidden
  2      80325s      100743614s  100663290s  primary   ntfs         boot
  3      100743615s  142400159s  41656545s   primary   ntfs         hidden
  4      142400160s  312580095s  170179936s  extended               lba
  5      197243552s  205630014s  8386463s    logical   ntfs
  6      205632063s  254935484s  49303422s   logical   ntfs
  7      254935548s  304094384s  49158837s   logical   ntfs
  8      304094448s  312580095s  8485648s    logical   ntfs


----------------------------------------------------

However, parted 3.2 does not read the partition table properly anymore 
and goes in "loop" mode:

GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA SAMSUNG HD160JJ (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End    Size   File system  Flags
  1      0.00B  160GB  160GB  fat32

Or the same with "parted /dev/sda unit s print":
Model: ATA SAMSUNG HD160JJ (scsi)
Disk /dev/sda: 312581808s
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End         Size        File system  Flags
  1      0s     312581807s  312581808s  fat32

----------------------------------------------------

Note: I am using the GParted Live CD's, booting them, so I have no way 
to test any version of parted other than the ones on these CD's, which 
are 2.3 and 3.2 to date.

----------------------------------------------------

Besides that, lsblk, fdisk, cfdisk, fsdisk all work perfectly:

root <at> debian:~# lsblk -o name,maj:min,rm,size,ro,type,fstype,label,mountpoint
NAME                        MAJ:MIN RM   SIZE RO TYPE   FSTYPE    LABEL 
        MOUNTPOINT
sda                           8:0    0 149.1G  0 disk
├─sda1                        8:1    0  39.2M  0 part   vfat    DOSGUB4DOS
├─sda2                        8:2    0    48G  0 part   ntfs    WIN7
├─sda3                        8:3    0  19.9G  0 part   ntfs
├─sda4                        8:4    0     1K  0 part
├─sda5                        8:5    0     4G  0 part   ntfs    SWAP_XP
├─sda6                        8:6    0  23.5G  0 part   ntfs    WINAPP_XP
├─sda7                        8:7    0  23.5G  0 part   ntfs    WINAPP_W7
└─sda8                        8:8    0     4G  0 part   ntfs    SWAP_W7
sdb                           8:16   0 698.7G  0 disk   nvidia_raid_member
├─sdb2                        8:18   0     1K  0 part
├─sdb5                        8:21   0  29.5G  0 part   ntfs    DATA
├─sdb6                        8:22   0  98.3G  0 part   ntfs    CD_IMAGE
├─sdb7                        8:23   0     1G  0 part   vfat    DOS_APPS
├─sdb8                        8:24   0 343.6G  0 part   ntfs    SAVE
├─sdb9                        8:25   0  49.3G  0 part   ntfs    VIRTUAL
└─nvidia_deicejfc (dm-0)    254:0    0 698.7G  0 dmraid
   ├─nvidia_deicejfc5 (dm-1) 254:1    0  29.5G  0 dmraid ntfs     DATA
   ├─nvidia_deicejfc6 (dm-2) 254:2    0  98.3G  0 dmraid ntfs     CD_IMAGE
   ├─nvidia_deicejfc7 (dm-3) 254:3    0     1G  0 dmraid vfat 
DOS_APPS     /mnt/dm3
   ├─nvidia_deicejfc8 (dm-4) 254:4    0 343.6G  0 dmraid ntfs     SAVE
   └─nvidia_deicejfc9 (dm-5) 254:5    0  49.3G  0 dmraid ntfs     VIRTUAL
sdc                           8:32   0 698.7G  0 disk   nvidia_raid_member
├─sdc2                        8:34   0     1K  0 part
├─sdc5                        8:37   0  29.5G  0 part   ntfs    DATA
├─sdc6                        8:38   0  98.3G  0 part   ntfs    CD_IMAGE
├─sdc7                        8:39   0     1G  0 part   vfat    DOS_APPS
├─sdc8                        8:40   0 343.6G  0 part   ntfs    SAVE
├─sdc9                        8:41   0  49.3G  0 part   ntfs    VIRTUAL
└─nvidia_deicejfc (dm-0)    254:0    0 698.7G  0 dmraid
   ├─nvidia_deicejfc5 (dm-1) 254:1    0  29.5G  0 dmraid ntfs     DATA
   ├─nvidia_deicejfc6 (dm-2) 254:2    0  98.3G  0 dmraid ntfs     CD_IMAGE
   ├─nvidia_deicejfc7 (dm-3) 254:3    0     1G  0 dmraid vfat 
DOS_APPS     /mnt/dm3
   ├─nvidia_deicejfc8 (dm-4) 254:4    0 343.6G  0 dmraid ntfs     SAVE
   └─nvidia_deicejfc9 (dm-5) 254:5    0  49.3G  0 dmraid ntfs     VIRTUAL
sr0                          11:0    1  1024M  0 rom
sr1                          11:1    1   195M  0 rom    udf 
GParted-live /lib/live/mount/medium
loop0                         7:0    0 164.1M  1 loop   squashfs 
          /lib/live/mount/rootfs/filesystem.squashfs

============================================

root <at> debian:~# fdisk -l -u /dev/sda

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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
Disk identifier: 0x165e165e

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63       80324       40131   1b  Hidden W95 FAT32
/dev/sda2   *       80325   100743614    50331645    7  HPFS/NTFS/exFAT
/dev/sda3       100743615   142400159    20828272+  17  Hidden HPFS/NTFS
/dev/sda4       142400160   312580095    85089968    f  W95 Ext'd (LBA)
/dev/sda5       197243552   205630014     4193231+   7  HPFS/NTFS/exFAT
/dev/sda6       205632063   254935484    24651711    7  HPFS/NTFS/exFAT
/dev/sda7       254935548   304094384    24579418+   7  HPFS/NTFS/exFAT
/dev/sda8       304094448   312580095     4242824    7  HPFS/NTFS/exFAT

============================================

sfdisk is ok also:

root <at> debian:~# sfdisk -l -u s /dev/sda
unrecognized format - using sectors

Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

    Device Boot    Start       End   #sectors  Id  System
/dev/sda1            63     80324      80262  1b  Hidden W95 FAT32
/dev/sda2   *     80325 100743614  100663290   7  HPFS/NTFS/exFAT
/dev/sda3     100743615 142400159   41656545  17  Hidden HPFS/NTFS
/dev/sda4     142400160 312580095  170179936   f  W95 Ext'd (LBA)
/dev/sda5     197243552 205630014    8386463   7  HPFS/NTFS/exFAT
/dev/sda6     205632063 254935484   49303422   7  HPFS/NTFS/exFAT
/dev/sda7     254935548 304094384   49158837   7  HPFS/NTFS/exFAT
/dev/sda8     304094448 312580095    8485648   7  HPFS/NTFS/exFAT


root <at> debian:~# sfdisk -l -u S -x /dev/sda

Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

    Device Boot    Start       End   #sectors  Id  System
/dev/sda1            63     80324      80262  1b  Hidden W95 FAT32
/dev/sda2   *     80325 100743614  100663290   7  HPFS/NTFS/exFAT
/dev/sda3     100743615 142400159   41656545  17  Hidden HPFS/NTFS
/dev/sda4     142400160 312580095  170179936   f  W95 Ext'd (LBA)

/dev/sda5     197243552 205630014    8386463   7  HPFS/NTFS/exFAT
     -         205632000 254935484   49303485   5  Extended
     -         142400160 142400159          0   0  Empty
     -         142400160 142400159          0   0  Empty

/dev/sda6     205632063 254935484   49303422   7  HPFS/NTFS/exFAT
     -         254935485 304094384   49158900   5  Extended
     -         205632000 205631999          0   0  Empty
     -         205632000 205631999          0   0  Empty

/dev/sda7     254935548 304094384   49158837   7  HPFS/NTFS/exFAT
     -         304094385 312580095    8485711   5  Extended
     -         254935485 254935484          0   0  Empty
     -         254935485 254935484          0   0  Empty

/dev/sda8     304094448 312580095    8485648   7  HPFS/NTFS/exFAT
     -         304094385 304094384          0   0  Empty
     -         304094385 304094384          0   0  Empty
     -         304094385 304094384          0   0  Empty


root <at> debian:~# sfdisk -V /dev/sda
Warning: partition 4 does not end at a cylinder boundary
Warning: partition 5 does not start at a cylinder boundary
Warning: partition 5 does not end at a cylinder boundary
Warning: partition [8] does not end at a cylinder boundary
Warning: partition 8 does not end at a cylinder boundary
/dev/sda: OK

============================================

I suspect the problem is with my MBR contents ...It has Grub4dos in 
there, to multiboot between my DOS, XP and Win7 partitions.
Problem is happening whether it is version 0.4.5c o 0.4.6a.


In case that can help, here is the contents of my /dev/sda MBR

root <at> debian:~# dd if=/dev/sdc bs=512 count=1 | hexdump -C
1+0 records in
1+0 records out
512 bytes copied, 0.000732162 s, 699 kB/s
00000000  eb 5e 80 00 20 39 ff ff  00 00 00 00 02 01 63 00  |.^.. 
9........c.|
00000010  02 00 00 00 00 f8 00 00  3f 00 ff 00 00 00 00 00 
|........?.......|
00000020  c5 39 01 00 6a 02 00 00  00 00 00 00 02 00 00 00 
|.9..j...........|
00000030  01 00 06 00 00 00 00 00  00 00 00 00 00 00 00 00 
|................|
00000040  80 00 29 7b 3c d6 9c 4e  4f 20 4e 41 4d 45 20 20  |..){<..NO 
NAME  |
00000050  20 20 46 41 54 33 32 20  20 20 00 00 00 00 00 00  |  FAT32 ......|
00000060  fa 31 db 8e d3 bc 80 05  e8 00 00 5b 81 eb 6b 00 
|.1.........[..k.|
00000070  c1 eb 04 8c c8 01 c3 8e  db 53 6a 7d cb 68 00 20 
|.........Sj}.h. |
00000080  17 bc 00 90 fb 16 07 b9  12 00 b8 01 02 89 cb 4b 
|...............K|
00000090  c1 e3 09 ba 80 00 51 53  e8 a4 00 5b 59 72 04 e2 
|......QS...[Yr..|
000000a0  e9 f6 dc 0e 1f 9c 31 f6  31 ff b9 df 00 fc f3 a5 
|......1.1.......|
000000b0  bb fc 1f 66 b8 05 4d cb  93 66 39 07 75 03 e8 39 
|...f..M..f9.u..9|
000000c0  1c ea c6 00 00 20 16 1f  66 39 07 74 28 66 60 bf  |..... 
..f9.t(f`.|
000000d0  03 00 b8 11 02 99 bb 00  02 b9 02 00 e8 80 00 73 
|...............s|
000000e0  02 75 ef 66 61 66 39 07  75 4d c7 06 06 00 00 ff 
|.u.faf9.uM......|
000000f0  80 26 02 00 fe 9d 72 33  0e 1f ad 88 e6 ad 89 c1 
|.&....r3........|
00000100  24 3f 74 14 b0 01 bf 03  00 b4 02 68 00 0d 07 31 
|$?t........h...1|
00000110  db e8 4b 00 73 03 75 f1  f9 e8 5c 11 0f 87 f3 1b 
|..K.s.u...\.....|
00000120  83 c6 0c 81 fe fe 01 72  cf 77 0c be b2 31 b0 04 
|.......r.w...1..|
00000130  b9 01 00 31 d2 eb cf be  91 01 e8 4d 00 eb fe 1e 
|...1.......M....|
00000140  06 52 56 57 55 f9 cd 13  5d 5f 5e 5a 07 1f c3 fa 
|.RVWU...]_^Z....|
00000150  b8 00 20 8e d0 bc dc 8f  fb 66 61 07 1f eb c1 60  |.. 
......fa....`|
00000160  50 53 51 fe c8 00 c1 d0  e0 00 c7 b0 01 e8 cf ff 
|PSQ.............|
00000170  59 5b 58 72 04 fe c8 75  e7 61 73 09 60 31 c0 e8 
|Y[Xr...u.as.`1..|
00000180  bd ff 61 4f f9 c3 b4 0e  cd 10 2e ac 3c 00 75 f6 
|..aO........<.u.|
00000190  c3 0d 0a 4d 69 73 73 69  6e 67 20 4d 42 52 2d 68  |...Missing 
MBR-h|
000001a0  65 6c 70 65 72 2e 00 00  00 00 00 00 00 00 00 00 
|elper...........|
000001b0  00 00 00 00 00 00 00 00  5e 16 5e 16 00 00 00 01 
|........^.^.....|
000001c0  01 00 1b fe 3f 04 3f 00  00 00 86 39 01 00 80 00 
|....?.?....9....|
000001d0  01 05 07 fe ff ff c5 39  01 00 fa ff ff 05 00 fe 
|.......9........|
000001e0  ff ff 17 fe ff ff bf 39  01 06 e1 a0 7b 02 00 fe 
|.......9....{...|
000001f0  ff ff 0f fe ff ff a0 da  7c 08 60 bd 24 0a 55 aa 
|........|.`.$.U.|
00000200

----------------------------------------------------


So I am at a loss .. what is going wrong which makes parted 3.2 not 
interpret my partition table correctly, while parted 2.3 is ok ?
How should I correct things ? (or is there a bug in parted 3.2 ??)

Thank you in advance for any feedback .. or ready to provide more if you 
suspect a problem in parted 3.2.

Thanks, and best regards, Erwin9

Information forwarded to bug-parted <at> gnu.org:
bug#22967; Package parted. (Wed, 09 Mar 2016 23:24:02 GMT) Full text and rfc822 format available.

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

From: a <mapibid <at> hotmail.com>
To: "22967 <at> debbugs.gnu.org" <22967 <at> debbugs.gnu.org>
Subject: parted 3.2 fails to read MBR partition table where parted 2.3 was ok
Date: Wed, 9 Mar 2016 23:23:06 +0000
I can bring some more details:

the problem definitely looks to be that parted 3.2 doesn't like the 
GRUB4DOS MBR (see dump contents I supplied at end of in my first post), 
while parted 2.3 is ok.


Indeed, when I reset the MBR with bootrec /FixMbr from a Win7 boot CD, 
everything is ok in parted 3.2.


And as soon as I reinstall GRUB4DOS, no matter which version (0.4.5c or 
0.4.6a), parted can't read the partition table anymore.


Still, the partition table itself (0x1BE to 0x1FE) is totally identical 
in all cases.


So something in the rest of the MBR contents, between 0 and 0x1BD, is 
not digested by parted 3.2 ... are you able to tell what ?
GRUB4DOS being quite spread and used (Grub2 is too complex to configure 
and requires to have a Linux install, which I do not have), parted 
should compose with it like other Boot Managers .. shouldn't it ?

Thank you for any hint/help or let me know if you need anything more,
Erwin9


Information forwarded to bug-parted <at> gnu.org:
bug#22967; Package parted. (Fri, 11 Mar 2016 20:06:02 GMT) Full text and rfc822 format available.

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

From: Ulf Zibis <Ulf.Zibis <at> gmx.de>
To: bug-parted <at> gnu.org
Subject: Re: bug#22967: parted 3.2 fails to read MBR partition table where
 parted 2.3 was ok
Date: Fri, 11 Mar 2016 21:05:35 +0100
[Message part 1 (text/plain, inline)]
I like to add that GRUB4DOS ist widely used on bootable pendrives e.g. with MultiSystem.
So would be helpful, if it would be treated by parted.

-Ulf

Am 10.03.2016 um 00:23 schrieb a:
> I can bring some more details:
>
> the problem definitely looks to be that parted 3.2 doesn't like the
> GRUB4DOS MBR (see dump contents I supplied at end of in my first post),
> while parted 2.3 is ok.
>
>
> Indeed, when I reset the MBR with bootrec /FixMbr from a Win7 boot CD,
> everything is ok in parted 3.2.
>
>
> And as soon as I reinstall GRUB4DOS, no matter which version (0.4.5c or
> 0.4.6a), parted can't read the partition table anymore.
>
>
> Still, the partition table itself (0x1BE to 0x1FE) is totally identical
> in all cases.
>
>
> So something in the rest of the MBR contents, between 0 and 0x1BD, is
> not digested by parted 3.2 ... are you able to tell what ?
> GRUB4DOS being quite spread and used (Grub2 is too complex to configure
> and requires to have a Linux install, which I do not have), parted
> should compose with it like other Boot Managers .. shouldn't it ?
>
> Thank you for any hint/help or let me know if you need anything more,
> Erwin9
>


[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-parted <at> gnu.org:
bug#22967; Package parted. (Tue, 12 Apr 2016 00:27:01 GMT) Full text and rfc822 format available.

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

From: Phillip Susi <psusi <at> ubuntu.com>
To: a <mapibid <at> hotmail.com>, 22967 <at> debbugs.gnu.org
Subject: Re: bug#22967: parted 3.2 fails to read MBR partition table where
 parted 2.3 was ok
Date: Mon, 11 Apr 2016 20:26:50 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 03/09/2016 05:33 PM, a wrote:
> Hello, (sorry if duplicate, but my previous send doesn't seem to
> appear on the mailing list !)
> 
> I got a problem here with my MBR partition table and parted 3.2
> which only detects a "loop" partition table while 2.3 is ok.

It seems that your hexdump of your MBR was line wrapped by your mail
client, corrupting it.  Could you dump it to a .txt file and attach it
instead?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCgAGBQJXDEDKAAoJEBB5UWFcu6UWa5sIAKYE0MnuT46ioUAp4dVkf1Md
jkxqV8/murdDINdtQGtSGMJYJKDijtBExFKHX4HX81kFrEmmzbAaNQOzkcpHRUa6
wH1IlViNrhuv68C/Mz9Nl6p1uFUwgwmAJHH+3Ul95biNklZmVfsiUctzq0D3djAh
aZl5CzKFNo721Z44ZswunqFLXj9SjN5iwqqfCEwDFIALCIjjmx3U4gPzU/PYxdVo
3mU7CyfNyvs9wZlBA5uH9G3GPcDV6M3uD9+t/uQpA3WaNx6hmYxlXeXchDE/AllZ
orSgAZoNQsbtujtQQZK3e9JC7AoV4b4T8JGawV1mHUmbETnEa2aSLuziGCeBjNU=
=5T5P
-----END PGP SIGNATURE-----




Information forwarded to bug-parted <at> gnu.org:
bug#22967; Package parted. (Thu, 14 Apr 2016 12:46:02 GMT) Full text and rfc822 format available.

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

From: a a <mapibid <at> hotmail.com>
To: "22967 <at> debbugs.gnu.org" <22967 <at> debbugs.gnu.org>
Subject: parted 3.2 fails to read MBR partition table where parted 2.3 was ok
Date: Thu, 14 Apr 2016 12:44:57 +0000
[Message part 1 (text/plain, inline)]
Sure.
Here it is <MBRdump.txt>

Erwin9


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
[MBRdump.txt (text/plain, attachment)]

This bug report was last modified 9 years and 65 days ago.

Previous Next


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