Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit c947667

Browse files
committed
Option to create a USB drive for booting
1 parent 8691f79 commit c947667

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,37 @@ The global heap allocator is shared among all processors/cores/threads and is a
150150

151151
## Usage 1: Running a UEFI Blue-Pill Hypervisor through the UEFI Shell on VMware Workstation (Supported)
152152

153+
0. **Create a USB Drive for Booting**
154+
155+
Run the following PowerShell script as an administrator to create a new partition on the USB drive and format it as FAT32. This script shrinks the existing partition by 512 MB and creates a new partition with the label "Hypervisor" on the USB drive. Make sure to modify the drive letters according to your environment. Alternatively, you can use a physical USB drive.
156+
157+
```powershell
158+
# Define the size to shrink in MB
159+
$sizeToShrinkMB = 512
160+
161+
# Define the drive letter of the existing partition to shrink
162+
$existingDriveLetter = "C"
163+
164+
# Define the drive letter and label for the new partition
165+
$newDriveLetter = "D"
166+
$newFileSystemLabel = "Hypervisor"
167+
168+
# Shrink the existing partition
169+
$volume = Get-Volume -DriveLetter $existingDriveLetter
170+
$partition = $volume | Get-Partition
171+
Resize-Partition -DriveLetter $partition.DriveLetter -Size ($partition.Size - ($sizeToShrinkMB * 1MB))
172+
173+
# Create a new partition in the unallocated space
174+
$disk = Get-Disk -Number $partition.DiskNumber
175+
$newPartition = New-Partition -DiskNumber $disk.Number -UseMaximumSize -DriveLetter $newDriveLetter
176+
177+
# Format the new partition
178+
Format-Volume -DriveLetter $newDriveLetter -FileSystem FAT32 -NewFileSystemLabel $newFileSystemLabel
179+
180+
Write-Output "Partition created and formatted successfully."
181+
```
182+
183+
153184
1. **Setup for VMware Workstation**
154185
155186
- **Build the Project**: Follow the build instructions provided in the previous sections to compile the project.

0 commit comments

Comments
 (0)