Forum Discussion
How to install Windows 10 on NVMe SSD on old PC? Since old computers don't load NVMe SSD drives when
Another example of what it might look like in diskpart (it's not that different on nix btw, especially if you want partition alignment, advanced format disk or another type (512e vs 4k sectors I mean,) it's basically like using a raid calculator.
NTFS:
1TB = 1048576 (MB) -> 2^20 * 1
500GB = 512001 (MB) -> 500 * 1024 + 1
250GB = 256001 (MB) -> 250 * 1024 + 1
150GB = 153601 (MB) -> 150 * 1024 + 1
100GB = 102401 (MB) -> 100 * 1024 + 1
50GB = 51201 (MB) -> 50 * 1024 + 1
NTFS -> (Size in GB * 1024) + 1
FAT32 (up to 32GB) -> (Size in GB * 1024) + 12
Minimum page file size: Varies based on page file usage history, amount of RAM (RAM ÷ 8, max 32 GB) and crash dump settings.
Maximum page file size: 3 × RAM or 4 GB, whichever is larger. This is then limited to the volume size ÷ 8. However, it can grow to within 1 GB of free space on the volume if required for crash dump settings.
https://docs.microsoft.com/en-US/windows/client-management/determine-appropriate-page-file-size
58369 (57GB NTFS)
16385 (16GB NTFS)
1025 (1GB NTFS)
Old PC Pagefile: MIN 128 MAX 3075 (MAX > 2560 = 1/8th of 20GB Volume)
New PC Pagefile: MIN 2048 MAX 49155 (MAX > 19200 = 1/8th of 150GB Volume | MAX > 7296 = 1/8th of 57GB Volume )
51073 = 58369 - 7296 (Virtual Drive File Size = System Drive Size - Swap File Size)
CREATE VDISK FILE="M:\Win11_64.vhdx" MAXIMUM=51073 TYPE=FIXED
DISKPART> help create vdisk
Creates a virtual disk file. Currently only VHD and VHDX format files are
supported and are specified through the file extensions (.vhd and .vhdx)
of the virtual disk file.
Syntax: CREATE VDISK FILE=<"filename"> MAXIMUM=<N> [TYPE={FIXED|EXPANDABLE}]
[SD=<SDDL string>] [PARENT=<"filename">] [SOURCE=<"filename">]
[NOERR]
FILE=<"filename">
Specifies the complete path and filename of the virtual disk
file. The file may be on a network share.
MAXIMUM=<N> The maximum amount of space exposed by the virtual disk, in
megabytes (MB).
TYPE={FIXED|EXPANDABLE}
FIXED specifies a fixed size virtual disk file. EXPANDABLE
specifies a virtual disk file that resizes to accommodate
the allocated data. The default is FIXED.
[PARENT=<"filename">]
Path to an existing parent virtual disk file to create a
differencing disk. With the PARENT parameter, MAXIMUM should
not be specified because the differencing disk gets the size
from its parent. Also, TYPE should not be specified since only
EXPANDABLE differencing disks can be created.
[SOURCE=<"filename">]
Path to an existing virtual disk file to be used to
pre-populate the new virtual disk file. When SOURCE is
specified, data from the input virtual disk file is copied
block for block from the input virtual disk file to the
created virtual disk file. There is no parent-child
relationship established however.
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
Example:
CREATE VDISK FILE="c:\test\test.vhd" MAXIMUM=1000
CREATE VDISK FILE="c:\test\child.vhdx" PARENT="c:\test\test.vhdx"
CREATE VDISK FILE="c:\test\test.vhd" MAXIMUM=1000 SD="D:P(A;;GA;;;WD)"
CREATE VDISK FILE="c:\test\new.vhdx" SOURCE="c:\test\test.vhd"
Another example for an EFI / UEFI system in diskpart (you can find similar ones in the sample scripts for MBR partitions. This one is for 150GB obviously, zero-indexed, so it's a perfect 150GB, not more not less. You can set it to whatever you want using the above examples, although MSR is almost always going to be 500MB, and the EFI partition will be something in the range of 100-128MB, depending on bootloader complexity, menu options, if you have a multi-boot setup I mean. Most of the time, 100MB is good enough for the system partition, unless of course you have some type of Unix / Linux multi-boot setup utilizing a complex GRUB 2.x menu with RHEL, Solaris, alongside the Windows 10 / 11 bootloader, etc. I'm sure even then 100mb is probably fine (the example below utilizes binary prefixes.)
list disk
select disk <enter disk number>
list partition
clean
convert gpt
create partition efi size=100
create partition msr size=500
create partition primary size=153601
list volume
select volume <enter volume number>
assign letter=c
format fs=ntfs unit=4096 quick
Comparable Linux / Unix examples:
NEWFS: TB = {[(1099511627776 * Size in TB) + 1048576] / 512}
NEWFS: GB = {[(1073741824 * Size in GB) + 1048576] / 512}
1TB = 2147485696 sectors = 1048576.0MB ( cyl groups)
500GB = 1048578048 sectors = 512001.0MB ( cyl groups)
250GB = 524289024 sectors = 256001.0MB ( cyl groups)
150GB = 314574848 sectors = 153601.0MB ( cyl groups)
100GB = 209717248 sectors = 102401.0MB ( cyl groups)
50GB = 104859648 sectors = 51201.0MB ( cyl groups)
newfs -N -b4096 -f512 -i8192 –o space -s104859648 /dev/rdsk/c2t0d0p0
FDISK: 59616 cylinders - Cylinder blocks 131072 - 512 byte blocks (sectors)
1TB = 16385 cylinders {[(2^40) / (Cylinder Blocks * Sectors)]+1}
500GB = 8001 cylinders {[(2^30 * 500) / (Cylinder Blocks * Sector Size)]+1}
250GB = 4001 cylinders {[(2^30 * 250) / (Cylinder Blocks * Sector Size)]+1}
150GB = 2401 cylinders {[(2^30 * 150) / (Cylinder Blocks * Sector Size)]+1}
100GB = 1601 cylinders {[(2^30 * 100) / (Cylinder Blocks * Sector Size)]+1}
50GB = 801 cylinders {[(2^30 * 50) / (Cylinder Blocks * Sector Size)]+1}