public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* GPT support in UEFI
@ 2017-06-08  4:20 Shubham Mittal
  0 siblings, 0 replies; only message in thread
From: Shubham Mittal @ 2017-06-08  4:20 UTC (permalink / raw)
  To: vladimir.olovyannikov@broadcom.com; +Cc: edk2-devel@lists.01.org

Hi,

i also think the block number provided by me was wrong. Actually i didn't know that parameter represents block number.
Now when i know all the parameters to gpt create command, i used as specified by you.
first of all, i used gpt clear BLK3 to install empty gpt tables.
then, i tried gpt create BLK3 P1 0 128 1 -type 0 to create a partition P1.
then, i have to format it using gpt fatformat BLK3 P1 but this gives an error saying

gpt: Invalid argument - 'P1'
could not find partition P1 (case-sensitive). Make sure the name is spelled properly

however, this shouldn't happen as i already created a partition named P1.

Any Suggestions are welcome!!

Thanks,
Shubham


Vladimir::
gpt clear just creates an empty gpt table on a block device. I doubt you need it for sd card. To format the sd card say on blk2 use gpt fatformat blk2.
Normally when you want to create gpt partitions from scratch you do
gpt clear
gpt create blk2 partname 0 partsizeinmb 0 -type N, and then you format partition with gpt fatformat blk2 partname.
gpt fatformat blk2 will format the whole device.
After that do gpt sync blk2 to let the upper layer know there is a need to reread devices. Then map -r and you will see your new filesystem in the list. The way you tried to create a partition is a bit strange to me. You want a partition to start from block 131242 and be 64MB?
I usually create ESP partition as
gpt create blk2 ESP 0 128 1 -type 0
gpt fatformat blk3 formats ENTIRE device effectively destroying gpt partition table. If you want to just format ESP partition to FAT32 then use
gpt fatformat blk3 ESP.
gpt create has this syntax:
gpt create blk partname startblk sizeinMB flag type. If you set startblk as 0, the first available block is used.

Hope this helps.

Thank you,
Vladimir

On Jun 7, 2017 2:30 AM, "Shubham Mittal" <shubham.mittal@nxp.com<mailto:shubham.mittal@nxp.com>> wrote:

Thanks a lot for the guide to your GPT shell command patch.

I applied it in my local repository and i am able to see shell command "gpt" in UEFI.



Now, when the sd card is corrupted, i used "gpt clear BLK3:" where BLK3 is the sd.

then, i used "gpt create BLK3: F1 131242 64 1 -type 0" to create a partition named F1.

it does not give error, but when i use "gpt list BLK3:", it does not show the partition created.

also, i used "gpt fatformat BLK3:" to format the sd and then when i use "gpt sync BLK3:" and again start uefi, it does show FS0: which means a file system is created on the sd but the partition i created does not show there and also not showing when i use "gpt list BLK3:".



Please reply asap what is wrong here.

i think gpt create command is wrong because i am unable to understand what each parameter represents.



Thanks,

Shubham Mittal



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-08  4:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-08  4:20 GPT support in UEFI Shubham Mittal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox