Subject: bug#31111: closed (Re: bug#31111: Partition table wrongly identified as "atari")

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 10 May 2018 18:54:02 +0000

Your bug report

#31111: Partition table wrongly identified as "atari"

which was filed against the parted package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
31111: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31111
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#31111: Partition table wrongly identified as "atari"
From: Phil Susi <[email-masked]>
To: bouke_1 <[email-masked]>, [email-masked]
Date: Thu, 10 May 2018 14:52:52 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On 5/10/2018 1:53 PM, Phil Susi wrote:
> I'd say so.  I can't reproduce the problem though by simply creating an
> image file and making the partitions as you describe.  Can you send your
> whole MBR so I can try to reproduce it and see if fixing this logic
> error fixes it?

Ok, after looking at the code it wasn't very hard to slap a few of the
right bytes into an empty file and trick atari_probe.  I've fixed it
now.  Will post the patch tomorrow.  Thanks.

Subject: Partition table wrongly identified as "atari"
From: bouke_1 <[email-masked]>
To: [email-masked]
Date: Mon, 09 Apr 2018 15:39:52 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

After restoring an image using Clonezilla (which in turn uses sfdisk to 
configure the partitions), parted identifies the partition table of my 
harddisk as "Atari" and sees only one partition, while in fact it is a 
valid msdos partition table with three NTFS partitions (boot, main and 
restore). Other tools (e.g., fdisk) correctly identify an "msdos" 
partition list. The disk contains a Windows 10 environment and that 
boots and works correctly. So I have reason to believe that parted is 
wrong (or the rest of the world is crazy, which is not impossible).

I ran parted from the Linux command line from a Clonezilla Live disk (on 
a USB drive) which is based on debian zesty. The version of parted used 
there is (of course) the latest stable, 3.2. I also tried gparted (which 
uses libparted) in its latest stable live distribution, which gives the 
same results.
Also, I restored the same Clonezilla image to another PC, again, with 
the same results. These PC's are pretty standard, neither brand new nor 
very old desktop boxes with a single 500GB disk.

The attachment shows a screenshot of the parted results together with 
those of sfdisk (which is proof but does not provide too much 
information). I also attached the extended parted output since it is 
mandatory but I don't think it provides much.

Clonezilla uses parted to check the partition layout. When I restore the 
image to a PC, I can use the PC normally but Clonezilla will not allow 
me to write a new image from it. I think I will be able to work around 
this, but it if this is a bug or quirk in parted it may merit some 
attention.

I don't know how parted determines the partition table type, but there 
must be something on the disk that makes it think it is Atari. If I can 
help by providing e.g., a dump of the boot sector of the disk, or any 
other data please let me know.

Bouke