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.mit...@nxp.com<mailto:shubham.mit...@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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to