[U-Boot] gpt: GUID/UUID - GPT restoration - open questions

Lukasz Majewski l.majewski at samsung.com
Fri Sep 7 08:45:59 CEST 2012


Hi Stephen,

> On 09/06/2012 08:14 AM, Lukasz Majewski wrote:
> > Hi Rob,
> > 
> >> The question I'm asking is why we need partition creation support
> >> in u-boot in the first place? 
> > 
> > Please consider following scenarios:
> > 
> > 1. eMMC content is exported to the user (via UMS USB Mass Storage).
> > Then user by chance or on purpose will corrupt MBR/GPT.
> > 
> > 2. misuse of "mmc" command - user by chance writes mmc erase 0.
> > 
> > To unbrick the device one would simply use "gpt/part restore"
> > command with already defined at ./include/config/{target}.h default
> > settings for partitions.
> > 
> >> Next you need filesystem creation too?
> > 
> > I can use UMS to export eMMC to host PC (with restored partitions)
> > and then use mkfs.* to create proper file system.
> 
> In that case, wouldn't you be exposing the entire eMMC device over
> UMS, and hence the user could just run fdisk/parted/... on the host,
> just like you're proposing they run mkfs on the host?

This would be one option for restoring GPT table.

However, I believe, that there also should be a separate gpt command to
do the trick and restore default GPT (with default partitions) only
from u-boot (with no UMS interaction).

Additionally it is far more user friendly, when one type "gpt default"
and default partitions are restored for a particular board (stored
at ./include/configs/{board}.h .

-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center | Linux Platform Group


More information about the U-Boot mailing list