Windows Security

UEFI/GPT Lab Part 1
Lab Objectives:
  • Create a UEFI bootable GPT partitioned drive in Windows 10
  • Copy boot files to the drive from Windows
  • Examine boot files in Windows
1.  Open a command prompt as an Administrator.

2. Enter
 
	diskpart 
  Microsoft DiskPart version 10.0.19041.964

  Copyright (C) Microsoft Corporation.
  On computer: DESKTOP-8M0RP18

  DISKPART>
3.  Enter:
 
	list disk 
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           60 GB  1024 KB
  Disk 1    Online           57 GB    57 GB
4.  Enter:
 
	select disk <number>
Where <number> is the number of the disk you are going to partition. Ensure you select the correct disk or you may destroy your filesystem!
  Disk 1 is now the selected disk.
5.  Enter:
 
	clean 
To erase the disk.
  DiskPart succeeded in cleaning the disk.
6.  Enter:
 
	convert gpt 
To convert the disk to GPT format.
  DiskPart successfully converted the selected disk to GPT format.
7.  Enter:
 
	exit 
To return to the command prompt.

8.  Enter:
 
	powershell 
To launch the powershell interpreter.
  Windows PowerShell
  Copyright (C) Microsoft Corporation. All rights reserved.

  Try the new cross-platform PowerShell https://aka.ms/pscore6
9.  Enter:
 
	get-disk 
To list available disks.
  Number Friendly Name        Serial Number                    HealthStatus         OperationalStatus      Total Size Partition
                                                                                                                      Style
  ------ -------------        -------------                    ------------         -----------------      ---------- ----------
  0      QEMU HARDDISK        QM00001                          Healthy              Online                      60 GB MBR
  1      SanDisk Ultra USB... 4C530001131126121261             Healthy              Online                   57.28 GB GPT
10.  Enter:
 
	New-Partition -DiskNumber <number> -Size 100MB -GptType "{c12a7328-f81f-11d2-ba4b-00a0c93ec93b}" -DriveLetter "S" 
Where <number> is the correct number for your disk.
This creates an EFI system partition 100MB in size and labels it with the S: drive mount point. The "c12a7328-f81f-11d2-ba4b-00a0c93ec93b" GUID identifies it as an EFI system partition to GPT.
		DiskPath:
	\\?\usbstor#disk&ven_sandisk&prod_ultra_usb_3.0&rev_1.00#4c530001131126121261&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

	PartitionNumber  DriveLetter Offset                                            Size Type
	---------------  ----------- ------                                            ---- ----
	1                S           1048576                                         100 MB System
11. Enter:
 
	Format-Volume -FileSystem FAT32 -NewFileSystemLabel "SYSTEM" -DriveLetter "S" -Force 
to format the partition with a FAT32 filesystem and label it "SYSTEM".
	DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining  Size
	----------- ------------ -------------- --------- ------------ ----------------- -------------  ----
	S           SYSTEM       FAT32          Removable Healthy      OK                        96 MB 96 MB
12.  Enter:
 
	New-Partition -DiskNumber 1 -Size 16MB -GptType "{e3c9e316-0b5c-4db8-817d-f92df00215ae}"  
to create a MSR partition.
                DiskPath:
	\\?\usbstor#disk&ven_sandisk&prod_ultra_usb_3.0&rev_1.00#4c530001131126121261&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

	PartitionNumber  DriveLetter Offset                                            Size Type
	---------------  ----------- ------                                            ---- ----
	2                           105906176                                        16 MB Reserved
The "e3c9e316-0b5c-4db8-817d-f92df00215ae" GUID identifies the partion as an MSR.
13.  Enter:
 
	New-Partition -DiskNumber 1 -UseMaximumSize -GptType "{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}" -DriveLetter "W"
To create a basic GPT partition with the rest of the storage space and assign drive letter W:
		DiskPath:
	\\?\usbstor#disk&ven_sandisk&prod_ultra_usb_3.0&rev_1.00#4c530001131126121261&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

	PartitionNumber  DriveLetter Offset                                            Size Type
	---------------  ----------- ------                                            ---- ----
	3                W           122683392                                     57.17 GB Basic