bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Bug in parted with GPT partition table from Lenovo Ideapad A1


From: Markall, Graham
Subject: RE: Bug in parted with GPT partition table from Lenovo Ideapad A1
Date: Fri, 30 Dec 2011 18:41:34 +0000

Hi Rod,

Thanks for your reply!

> The use you've presented is invalid, for two related reasons. The first
> problem is that GPT places partition data at both the start AND THE END
> of the disk, and without BOTH sets of data, the GPT as a whole is
> broken. Since you're feeding a small (128 KiB) part of the disk to
> parted, the best that parted can do is to treat the disk image as if it
> were a damaged disk. A second problem is that you're feeding parted an
> image file rather than a whole disk. Although parted can work on disk
> image files, the one you're using is essentially truncated, so the
> partitions defined in the main GPT data structures are too big for the
> "disk" (the file).

I hadn't realised that GPT expected data at both ends of the disk - I 
see now why I was getting errors about one of the tables being OK but 
the other corrupt.

> As a practical matter, what are you trying to accomplish? If you need to
> examine or modify the partition table on the Lenovo, you should do so on
> that machine, or by transferring its whole disk to another computer; you
> should NOT be trying to modify a partition table (particularly a GPT) by
> transferring a few sectors to another computer. That just creates a lot
> of ways for things to go wrong. If some problem is preventing you from
> working on the Lenovo, please describe it.

The Ideapad A1 is actually an Android tablet, and this partition table
is stored on the embedded flash memory (an emmc device). This emmc
device is partitioned, and the file that I was trying to examine exists
within one of these partitions, but is used to map out the partitions of
the emmc storage that should be visible to the Android OS - there are at
least 10 partitions on the emmc, but only 5 or so appear in the
partition table I was trying to examine.

What I am trying to accomplish is primarily to reverse-engineer the way
the storage works on the device in order to build custom OS images for 
it - I was mainly just trying to view this partition table, rather than
to make any changes. It probably wouldn't make sense to try to change 
the partition table.

> As to the fact that parted crashed on you, the situation could have been
> handled better; however, it IS a case of "garbage-in/garbage-out." The
> best you could hope for would be for the program to show you the
> partitions defined in the main partition table and then to refuse to
> make any actual changes.

I don't think I'm experienced enough to be able to offer to create a
patch that would do this, but I could offer to test one in the future -
I have a few of these different "GPT partition table" partitions that I
could try it to see if they cause a crash.


Many thanks,
Graham.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]