2. Diskpart forcibly mounts the hard disk partition and assigns the drive letter

Practical application

Mount efi partition via diskpart

Refer to the above blog to assign a drive letter to any partition, as long as it is not a partition protected by the system, you can directly access the files inside through the file explorer

The above diskpart tool can not only mount partitions, but also mount the entire complete disk, which is used to repair the situation that the mobile hard disk cannot be read by the computer

Windows 10 20H2 version can not be accessed to mount the efi partition, but the author’s previous internal preview of the pre-emptive version 2004 is possible

Simple price

The Diskpart command interpreter can manage computer drives (disks, partitions, volumes, or virtual hard disks).
List first, then select an object to make it the focus, and then you can use the diskpart command. Once the object has focus, any diskpart commands you type will act on that object.

Applicable: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Japanese Windows Server 2008 R2, Windows Server 2008

Rules of Use

1. List available objects
  • list disk-displays all disks on the computer.

  • list volume-displays all volumes on the computer.

  • list partition-displays the partitions on the focused disk on the computer.

  • list vdisk-displays all virtual disks on the computer.

After running the list command, an asterisk (*) will appear next to the object with focus

2. Determine the focus

When you select an object, the focus stays on that object until you select another object. For example, if the focus is set on disk 0 and volume 8 on disk 2 is selected, the focus will shift from disk 0 to disk 2, volume 8.
Certain commands automatically change the focus. For example, when a new partition is created, the focus will automatically switch to the new partition.
The focus can only be placed on the partition on the selected disk. After the partition has focus, if any) also has focus, then the related volume (. If the volume has focus, the related disk and partition will also get focus, provided that the volume is mapped to a single specific partition. If not, then the disk and partition The attention of will be lost.

parameter
Command Description
active Mark the disk partition with focus as the active partition.
add Mirror the selected simple volume to the specified disk.
assign Assign a drive letter or mount point to the selected volume.
Attach vdisk Put (sometimes called mount or surface) a virtual hard disk (VHD) so that it appears on the host computer as a local hard drive.
attributes Display, set or clear the attributes of a disk or volume.
automount Enable or disable the automatic loading function.
break Divide the selected mirrored volume into two simple volumes.
clean Delete all partitions or volume formats from the selected disk.
compact vdisk Reduce the physical size of dynamically expanding virtual hard disk (VHD) files.
convert Convert the file allocation table of (FAT) and FAT32 volumes to the NTFS file system so that existing files and directories remain unchanged.
create Create partitions on a disk, create a volume on one or more disks, or create a partition on a virtual hard disk (VHD).
delete Delete the partition or volume.
detach vdisk Stop the selected virtual hard disk (VHD) from being displayed as a local hard disk drive on the host computer.
detail Display information about the selected disk, partition, volume, or virtual hard disk (VHD).
exit Exit the diskpart command interpreter.
expand vdisk Expand the virtual hard disk (VHD) to the specified size.
extend Extend the focused volume or partition along with its file system to the available (unallocated) space on the disk.
filesystems Displays information about the current file system of the volume with the focus, and lists the file systems supported when the volume is formatted.
format Format the disk to accept Windows files.
gpt Assign the gpt attribute of) (to the partition, and focus on the basic GUID partition table (gpt) disk.
help Displays a list of available commands or detailed help information about the specified command.
import Import the external disk group to the disk group of the local computer.
inactive Mark the focused system partition or boot partition as an inactive (MBR) disk on the basic master boot record.
list Display the list of disk partitions in the disk, the list of volumes in the disk, or display the list of virtual hard disks (Vhd).
merge vdisk Merge the difference virtual hard disk (VHD) with its corresponding parent VHD.
offline Bring the online disk or volume offline.
online Bring the offline disk or volume online.
recover Refresh the status of all the disks in the disk group, try to recover the disks in the invalid disk group, and resynchronize the obsolete mirrored volume and RAID-5 volume.
rem Provide a way to add comments to the script.
remove Remove the drive letter or mount point from the volume.
repair Repair the focused RAID-5 volume by replacing the failed disk area with the specified dynamic disk.
rescan Look for new disks that may have been added to the computer.
retain Prepare an existing dynamic simple volume to be used as a boot volume or system volume.
san Display or set the storage area network (san) policy of the operating system.
select Move the focus to the disk, partition, volume, or virtual hard disk (VHD).
set id Change the "Partition Type" field of the partition that has the focus.
shrink Reduce the size of the selected volume by the specified amount.
uniqueid Display or set the GUID partition table (GPT) identifier or master boot record (MBR's master) signature.

Guess you like

Origin blog.csdn.net/qq_43808700/article/details/112977842