From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 06 Sep 2012 12:57:40 -0600 Subject: [U-Boot] gpt: GUID/UUID - GPT restoration - open questions In-Reply-To: <20120906161443.0a884e29@amdc308.digital.local> References: <1345795995-24656-1-git-send-email-l.majewski@samsung.com> <20120824104836.22dfc647@amdc308.digital.local> <504896CF.6050505@gmail.com> <20120906161443.0a884e29@amdc308.digital.local> Message-ID: <5048F224.5090009@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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?