Creating partition in windows

create partition msr

Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a Microsoft Reserved (MSR) partition on a GUID partition table (gpt) disk. A Microsoft Reserved partition is required on every gpt disk. The size of this partition depends on the total size of the gpt disk. The size of the gpt disk must be at least 32 MB to create a Microsoft Reserved partition.

Be very careful when using this command. Because gpt disks require a specific partition layout, creating Microsoft Reserved partitions can cause the disk to become unreadable.

A basic gpt disk must be selected for this operation to succeed. You must use the select disk command to select a basic gpt disk and shift the focus to it.

Syntax

Parameters

Parameter Description
size= The size of the partition in megabytes (MB). The partition is at least as long in bytes as the number specified by . If no size is given, the partition continues until there is no more free space in the current region.
offset= Specifies the offset in kilobytes (KB), at which the partition is created. The offset rounds up to completely fill whatever sector size is used. If no offset is given, the partition is placed in the first disk extent that is large enough to hold it.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

On gpt disks that are used to boot the Windows operating system, the Extensible Firmware Interface (EFI) system partition is the first partition on the disk, followed by the Microsoft Reserved partition. gpt disks that are used only for data storage do not have an EFI system partition, in which case the Microsoft Reserved partition is the first partition.

Windows doesn’t mount Microsoft Reserved partitions. You cannot store data on them and you cannot delete them.

Examples

To create a Microsoft Reserved partition of 1000 megabytes in size, type:

create partition primary create partition primary

Область применения: Windows Server (половина ежегодного канала), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Создает основной раздел на базовом диске с фокусом. Creates a primary partition on the basic disk with focus. После создания секции фокус автоматически перемещается на новую секцию. After the partition has been created, the focus automatically shifts to the new partition.

Для выполнения этой операции необходимо выбрать базовый диск. A basic disk must be selected for this operation to succeed. Чтобы выбрать базовый диск и переместить фокус на него, необходимо использовать команду Выбор диска . You must use the select disk command to select a basic disk and shift the focus to it.

Синтаксис Syntax

Параметры Parameters

Параметр Parameter Описание Description
Размер = size= Указывает размер раздела в мегабайтах (МБ). Specifies the size of the partition in megabytes (MB). Если размер не указан, Секция будет продолжаться до тех пор, пока в текущем регионе не будет больше нераспределенного пространства. If no size is given, the partition continues until there is no more unallocated space in the current region.
offset = offset= Смещение в килобайтах (КБ), в котором создается секция. The offset in kilobytes (KB), at which the partition is created. Если смещение не задано, раздел будет начинаться в начале самого крупного экстента диска, достаточного для его хранения. If no offset is given, the partition will start at the beginning of the largest disk extent that is large enough to hold it.
Выровняйте = align= Выравнивает все экстенты секций до ближайшей границы выравнивания. Aligns all partition extents to the closest alignment boundary. Обычно используется с массивами LUN аппаратного RAID-массива для повышения производительности. Typically used with hardware RAID Logical Unit Number (LUN) arrays to improve performance. количество килобайтов (КБ) от начала диска до ближайшей границы выравнивания. is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
Идентификатор = < | >id= Указывает тип секции. Specifies the partition type. Этот параметр предназначен для использования только изготовителем оборудования (OEM). This parameter is intended for original equipment manufacturer (OEM) use only. С этим параметром можно указать любой байт типа секции или GUID. Any partition type byte or GUID can be specified with this parameter. DiskPart не проверяет тип секции на допустимость, за исключением того, что он является байтом в шестнадцатеричной форме или GUID. DiskPart doesn’t check the partition type for validity except to ensure that it is a byte in hexadecimal form or a GUID. Внимание! Создание секций с этим параметром может привести к сбою или невозможности запуска компьютера. Caution: Creating partitions with this parameter might cause your computer to fail or be unable to start up. Если вы не являетесь поставщиком вычислительной техники или ИТ-специалистом, имеющим дело с дисками GPT, не создавайте разделы на GPT-дисках с помощью этого параметра. Unless you are an OEM or an IT professional experienced with gpt disks, do not create partitions on gpt disks using this parameter. Вместо этого всегда используйте команду » создать секцию EFI » для создания СИСТЕМНЫХ разделов EFI, команду » создать секцию MSR » для создания зарезервированных секций Майкрософт и команду » создать первичную секцию» (без id=< | параметра) для создания основных разделов на дисках GPT. Instead, always use the create partition efi command to create EFI System partitions, the create partition msr command to create Microsoft Reserved partitions, and the create partition primary) command (without the id=< | parameter) to create primary partitions on gpt disks.

Для дисков основной загрузочной записи (MBR) необходимо указать байт типа раздела в шестнадцатеричной форме для секции. For master boot record (MBR) disks, you must specify a partition type byte, in hexadecimal form, for the partition. Если этот параметр не указан, команда создает секцию типа 0x06 , которая указывает, что файловая система не установлена. If this parameter isn’t specified, the command creates a partition of type 0x06 , which specifies that a file system isn’t installed. Примеры приведены ниже. Examples include:

  • Раздел данных LDM: 0x42 LDM data partition: 0x42
  • Раздел восстановления: 0x27 Recovery partition: 0x27
  • Распознанная Секция OEM: 0x12, 0X84, 0XDE, 0XFE, 0x82 Recognized OEM partition: 0x12, 0x84, 0xDE, 0xFE, 0xA0

Для дисков с таблицей разделов GUID (GPT) можно указать GUID типа раздела для создаваемой секции. For GUID partition table (gpt) disks, you can specify a partition type GUID for the partition that you want to create. Распознаваемые идентификаторы GUID включают: Recognized GUIDs include:

  • Системный раздел EFI: c12a7328-f81f-11d2-ba4b-00a0c93ec93b EFI system partition: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
  • Зарезервированный раздел Майкрософт: e3c9e316-0b5c-4db8-817d-f92df00215ae Microsoft Reserved partition: e3c9e316-0b5c-4db8-817d-f92df00215ae
  • Базовый раздел данных: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 Basic data partition: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
  • Раздел метаданных LDM (динамический диск): 5808c8aa-7e8f-42e0-85d2-e1e90434cfb3 LDM metadata partition (dynamic disk): 5808c8aa-7e8f-42e0-85d2-e1e90434cfb3
  • Раздел данных LDM (динамический диск): af9b60a0-1431-4f62-bc68-3311714a69ad LDM data partition (dynamic disk): af9b60a0-1431-4f62-bc68-3311714a69ad
  • Раздел восстановления: de94bba4-06d1-4d40-A16A-bfd50179d6ac Recovery partition: de94bba4-06d1-4d40-a16a-bfd50179d6ac

Если этот параметр не указан для диска GPT, команда создает базовый раздел данных. If this parameter isn’t specified for a gpt disk, the command creates a basic data partition. Noerr noerr Только для сценариев. For scripting only. При возникновении ошибки DiskPart продолжит обрабатывать команды, как если бы ошибка не возникала. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Без параметра noerr ошибка приводит к выходу из программы DiskPart с кодом ошибки. Without the noerr parameter, an error causes DiskPart to exit with an error code.

Примеры Examples

Чтобы создать основной раздел размером 1000 МБ, введите: To create a primary partition of 1000 megabytes in size, type:

BIOS/MBR-based hard drive partitions

Create custom partition layouts for your hard disk drives (HDDs), solid-state drives (SSDs), and other drives when deploying Windows to BIOS–based devices.

NoteВ В If you use a custom partition layout on WindowsВ 10 for desktop editions (Home, Pro, Enterprise, and Education), update the push-button recovery script so the recovery tools can recreate the custom partition layout when needed.

Partition Requirements

When you deploy Windows to a BIOS-based device, you must format hard drives by using an MBR file system. Windows does not support the GUID partition table (GPT) file system on BIOS-based computers.

An MBR drive can have up to four standard partitions. Typically, these standard partitions are designated as primary partitions. For information about how to create additional partitions beyond this limit, see Configure More than Four Partitions on a BIOS/MBR-Based Hard Disk.

System partition

Each bootable drive must contain a system partition. The system partition must be configured as the active partition.

The minimum size of this partition is 100 MB.

Windows partition

  • This partition must have at least 20 gigabytes (GB) of drive space for 64-bit versions, or 16 GB for 32-bit versions.
  • The Windows partition must be formatted using the NTFS file format.
  • The Windows partition must have 16 GB of free space after the user has completed the Out Of Box Experience (OOBE) and Automatic Maintenance has completed.
  • This partition can have a maximum of 2 terabytes (TB) of space. Software tools to extend the visible partition space beyond 2 TB are not supported on BIOS because they can interfere with software solutions for application compatibility and recovery.

Recovery tools partition

Create a separate recovery partition to support automatic failover and to support booting WindowsВ BitLocker Drive Encryption-encrypted partitions.

We recommend that you place this partition in a separate partition, immediately after the Windows partition. This allows Windows to modify and recreate the partition later if future updates require a larger recovery image.

The Windows Recovery Environment (Windows RE) tools require additional free space:

  • A minimum of 52 MB is required but 250 MB is recommended, to accomodate future updates, especially with custom partition layouts.

When calculating free space, note:

  • The recovery image, winre.wim, is typically between 250-300MB, depending on what drivers, languages, and customizations you add.
  • The file system itself can take up additional space. For example, NTFS may reserve 5-15MB or more on a 750MB partition.

Data partitions

The recommended partition layout for WindowsВ 10 does not include utility or data partitions.

However, if utility or data partitions are required, they should be placed either before the Windows partition or after the Windows RE partition. By keeping the Windows and recovery partitions together, then when future updates of Windows RE area available, Windows will be able to grow the Windows RE partition by shrinking the Windows partition.

This layout makes it more difficult for end users to remove the data partition and merge the space with the Windows partition. For example, the Windows RE partition may need to be moved to the end of the unused space reclaimed from the data partition, so that the Windows partition can be extended. WindowsВ 10 does not include functionality or utility to facilitate this process. However, manufacturers can develop and provide such a utility if PCs are shipped with data partitions.

Each partition can have a maximum of 2 terabytes (TB) of space.

If you’re going to be adding more than four total partitions to the disk, see Configure More than Four Partitions on a BIOS/MBR-Based Hard Disk for more info.

Partition layout

If you install Windows using a bootable USB key made by Windows Imaging and Configuration Designer (ICD), it creates the following layout by default: a system partition, a Windows partition, and a recovery tools partition.

System and utility partitions

By default, system partitions do not appear in File Explorer. This helps protect end users from accidentally modifying a partition.

To keep system and utility partitions from being reset, use type 0x27. Do not use any of the following types: 0x7, 0x0c, 0x0b, 0x0e, 0x06, and 0x42.

To set partitions as utility partitions

  1. When you are deploying Windows by using Windows ICD, the partition type will be set automatically.
  2. When you are deploying Windows by using the DiskPart tool, use the set command after you create the partition.

To verify that system and utility partitions exist

  1. Click Start, right-click This PC, and then click Manage. The Computer Management window opens.
  2. Click Disk Management. The list of available drives and partitions appears.
  3. In the list of drives and partitions, confirm that the system and utility partitions are present and are not assigned a drive letter.

Sample files: configuring disk layout by using WindowsВ PE and DiskPart scripts

For image-based deployment, boot the PC to Windows PE, and then use the DiskPart tool to create the partition structures on your destination PCs.

NoteВ В In these DiskPart examples, the partitions are assigned the letters: System=S, Windows=W, and Recovery=R.

Change the Windows drive letter to a letter that’s near the end of the alphabet, such as W, to avoid drive letter conflicts. Do not use X, because this drive letter is reserved for Windows PE. After the device reboots, the Windows partition is assigned the letter C, and the other partitions don’t receive drive letters.

If you reboot, WindowsВ PE reassigns disk letters alphabetically, starting with the letter C, without regard to the configuration in Windows Setup. This configuration can change based on the presence of different drives, such as USB flash drives.

The following steps describe how to partition your hard drives and prepare to apply images. You can use the code in the sections that follow to complete these steps.

To partition hard drives and prepare to apply images

Save the following code as a text file (CreatePartitions-BIOS.txt) on a USB flash drive.

Use WindowsВ PE to boot the destination computer.

Clean and partition the drive. In this example, F is the letter of the USB flash drive.

If you use a custom partition layout on WindowsВ 10 for desktop editions, update the push-button recovery script so the recovery tools can recreate the custom partition layout when needed.

Important To avoid bare metal recovery boot issues due to partition size, it is recommended that manufacturers allow the bare metal recovery feature’s auto generation script to create the partition used for the recovery WIM. If manufacturer’s wish to use a custom DISKPART script for partition creation, the recommended minimum partition size is 990MB and a minimum of 250MB of free space.

Next steps

Use a deployment script to apply the Windows images on the newly created partitions. For more information, see Capture and Apply Windows, System, and Recovery Partitions.

Читайте также:  Best icon themes linux
Оцените статью