From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0061.outbound.protection.outlook.com [104.47.2.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4388021967BF0 for ; Wed, 7 Jun 2017 21:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XnWHmmu0B8z5Pa6BeTidZ0OVStCH5AXUqt7UxDOsxhM=; b=XUBRnQvQMRGXJGbNJ/oXdGDEq6anOCWf1kAdBf2/Lnx9/eSxSJZntnPUO2lX8qSnajSmGQGnCPEJUIrRG5hWbW5gDqUt9ZLYlHvBAs2UyNfUd3NYm/KLTHVo1nfW53s++PB6yhDsGvAhQtOkSx8qsgar/EuF4fi0KSw10ojRSBM= Received: from DB6PR04MB3269.eurprd04.prod.outlook.com (10.170.216.145) by DB6PR04MB3270.eurprd04.prod.outlook.com (10.170.216.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 8 Jun 2017 04:20:53 +0000 Received: from DB6PR04MB3269.eurprd04.prod.outlook.com ([fe80::71a0:e9ff:9975:f06a]) by DB6PR04MB3269.eurprd04.prod.outlook.com ([fe80::71a0:e9ff:9975:f06a%13]) with mapi id 15.01.1124.013; Thu, 8 Jun 2017 04:20:53 +0000 From: Shubham Mittal To: "vladimir.olovyannikov@broadcom.com" CC: "edk2-devel@lists.01.org" Thread-Topic: GPT support in UEFI Thread-Index: AQHS4A022afc3NsgaEqDCPiklwd+Bg== Date: Thu, 8 Jun 2017 04:20:53 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=nxp.com; x-originating-ip: [2603:10a6:6:2f:cafe::be] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR04MB3270; 7:M83mIf3psjNmhswKe5H++AkyKQ/s10ljhLl8ICPHw1JaV0P9TPdHJ3Cgaa1ZtD18eX0b7in0P/n8AKF7c2SGzcrKFL09VzcEHgiEfeGT2P8OdbtjAk1AdFSSRNhZAnllTwnu8FCAVUkJQXQI0W7p44ShCK+3fangb/Yhe7JxIr+K681urPm5Z7LC9O1WaUJygwSDrEJmnGiZxgdZ1D450OccTSynaT/uW1zTliFqz+fqkzMi/aBpy1ZtXsRpJ2GYafmp+t27lq+3ajVd1S6nuNb90dClwqyubATYP7qEjXUkASzTw59SHFP+l34aywHfaRdJsk5t/wZZoj0W895ASQ== x-ms-traffictypediagnostic: DB6PR04MB3270: x-ms-office365-filtering-correlation-id: 8cebab9a-1b8a-4f26-3983-08d4ae25c0d3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075); SRVR:DB6PR04MB3270; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123560025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR04MB3270; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR04MB3270; x-forefront-prvs: 0332AACBC3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39850400002)(39450400003)(39860400002)(39840400002)(39410400002)(39400400002)(24454002)(377454003)(3660700001)(33656002)(86362001)(19627405001)(6606003)(102836003)(54896002)(2351001)(53336002)(99286003)(6116002)(8936002)(53936002)(8676002)(25786009)(6916009)(3280700002)(81166006)(5660300001)(2900100001)(7696004)(14454004)(5250100002)(3480700004)(74316002)(6436002)(4326008)(478600001)(55016002)(236005)(110136004)(9686003)(189998001)(6506006)(38730400002)(7736002)(50986999)(5640700003)(54356999)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR04MB3270; H:DB6PR04MB3269.eurprd04.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jun 2017 04:20:53.7392 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3270 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: GPT support in UEFI X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 04:19:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, i also think the block number provided by me was wrong. Actually i didn't k= now that parameter represents block number. Now when i know all the parameters to gpt create command, i used as specifi= ed 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 err= or 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 ne= ed 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 part= ition 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 lis= t. 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 partiti= on 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" > 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 partitio= n named F1. it does not give error, but when i use "gpt list BLK3:", it does not show t= he partition created. also, i used "gpt fatformat BLK3:" to format the sd and then when i use "gp= t sync BLK3:" and again start uefi, it does show FS0: which means a file sy= stem is created on the sd but the partition i created does not show there a= nd 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