1

Topic: Disk partitioning not recognized by 0.19.1 and more

Hello, something strange is happening here for which I can't find any exlanation ..

I tested all versions of the live CD from 0.16 to stable 0.25.
When using 0.19.1 and higher versions, my primary disk (/dev/sda .. except in 0.25 where it is named /dev/sdc, go figure !!) partition table is not recognized properly by GParted (and by parted ..).

Until 0.18.0-2, everything is recognized fine by GParted, and here is what parted tells:

[b]gparted-live-0.16.1-1-amd64.iso[/b]

root@debian:/mnt/dm3# parted /dev/sda
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

In 0.19.1-4, GParted shows only 1 FAT32 partition in my disk, sized to the whole disk, and flagged with a warning.

In 0.25.0-3 (and also 0.23 ..), GParted shows one Unknown parittion, sized to the whole disk, and flagged with a warning.

Here is what parted says in each case:

[b]gparted-live-0.19.1-4-amd64.iso[/b]

root@debian:/mnt/dm3# parted /dev/sda
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
[b]gparted-live-0.25.0-3-amd64.iso[/b]

(on this one, my disk appears as sdc and it lists as unknown in gparted, vhile it was fat32 in version 0.19 ... go figure ..)

root@debian:/mnt/dm3# parted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA SAMSUNG HD160JJ (scsi)
Disk /dev/sdc: 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

There is no error in Windows XP or in Win7, and PartitionGuru (http://www.eassos.com/partitionguru-free.php) sees no error as well.

PartitionGuru does give a warning on 2 partiions, the one listed as #2 and #5 by parted in the 0.1.6 version above, saying that the DBR size is less than actual size, but looking by hand in the MBR and BPB, I couldn't find anything alarming or significant. And its only a warning ..

Using lsblsk, fdisk, cfdisk, sfdisk in both 0.19 and 0.25, they do not see anything abnormal, all seems fine and they give the same in both Live CD versions:

root@debian:/mnt# [b]lsblk[/b] -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@debian:~# [b]fdisk[/b] -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
[b]cfdisk[/b] is ok and sees all on /dev/sda
(I didn't take any capture, that didn't seem useful)
sfdisk is ok also:

root@debian:~# [b]sfdisk[/b] -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@debian:~# [b]sfdisk[/b] -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@debian:/mnt# [b]sfdisk[/b] -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

Reading that a malformed MBR could also create some problems to parted, quickly checked it, but did not find anything.
Note: I have Grub4dos 0.4.5c in the MBR, to multiboot between my DOS, XP and Win7 partitions.

root@debian:/mnt/dm3# [b]dd[/b] 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 can you help ?

What is going on since GParted 0.19 which makes it not interpret my partition table correctly ?
How should I correct things ? (or is there a bug in parted / GParted ??)

Thank you in advance for any help ..

2

Re: Disk partitioning not recognized by 0.19.1 and more

Based on the output from the parted commands, it appears that you have discovered an anomaly in parted.

GParted Live is based on Debian Live (Sid) and uses libparted to manage partition tables.

GParted Live 0.19.1-1 was the first release use libparted parted 3.2.

GParted Live 0.19.0.1 and earlier used libparted 2.3 or lower.

Hence it appears that parted 2.3 and earlier have one view of the partition table, whereas parted 3.2 sees things differently.

I recommend that you report the problem upstream to the parted project mailing list bug-parted@gnu.org and provide the output of the following command for both parted 2.3 and 3.2.

parted /dev/sda unit s print

3 (edited by erwin9 2016-02-28 20:33:49)

Re: Disk partitioning not recognized by 0.19.1 and more

Thank you, I confirm that with 0.19.0-1, there is no problem.

Bear with my question, but having never used mailing lists previously .. is it as simple as sending a mail to the mentioned mail address, and then following replies at http://lists.gnu.org/archive/html/bug-parted/ ?

How are bug#xxxxx assigned ?

4

Re: Disk partitioning not recognized by 0.19.1 and more

Yes, it's as simple as you state.

As far as I know, the Parted project does not use a bug tracker.

5 (edited by erwin9 2016-03-10 00:45:57)

Re: Disk partitioning not recognized by 0.19.1 and more

Well I tried posting there beginning of last week but my messages won't show up in the mailing list.

Don't know if there is a manual process in the middle to approve or filter out some messages, but nothing is showing nor coming back to me, not even an acknowledge that my mail was received.


Anyway, meanwhile, I could determine that the problem is linked with GRUB4DOS.

When I restore the MBR with bootrec /FixMbr from a Win7 boot CD, everything is ok in parted and in GParted.

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

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

Not sure what to do with the bug-parted mailing list .. I will try with another mail account just in case ...


And now that I can use 0.25.0-3, it looks like I found a bug .. I'll open another thread :-)

6 (edited by erwin9 2016-03-10 01:04:41)

Re: Disk partitioning not recognized by 0.19.1 and more

Edit: looks like my last attempt is ok, this should appear in the bug-parted mailing list as bug #22967 ..

7

Re: Disk partitioning not recognized by 0.19.1 and more

Thanks erwin9 for reporting back with the bug-parted mailing list number.  I have noted the link below.

bug#22967: parted 3.2 fails to read MBR partition table where parted 2.3 was ok