Install Windows function roles

Source: Internet
Author: User

Install Windows function roles

Install Windows function roles

 

Who can't install the Windows function role? Use the control panel. If it is a server version, use the Server Manager. Is it necessary to write it? If so, it would be a waste of time. We want to introduce how to install features that are not available in the current Windows version.

First of all, we should declare that this article is not a rigorous academic article, and its concept is not accurate enough. In addition, in many cases, we just want to share some experience at the operation layer.

We know that Windows with the same version has different version types, such as Standard edition, Professional edition, and Enterprise edition, and the corresponding server version type (for how many types of versions are available, you can check the files under \ Windows \ servicing \ editions ). After we installed the Enterprise Edition, we found that we still want to use some features of the Professional Edition, such as the media center. Is the system reinstalled? After reading this article, you may have another option. This document uses Windows 8.1 as an example to describe how to install the deduplication function of Windows Server 2012 R2.

 

I. System Composition

 

Windows is an operating system. So what is the complete system composed? From the perspective of installing a function role, it can be divided into the following levels: system, Role, function, package, assembly, and list. That is:

The system is composed of multiple roles;

A role consists of one or more functions;

A function consists of one or more packages. A package may contain multiple functions;

A package consists of one or more Assembly sets and a list. An Assembly corresponds to a list (this is not rigorous, but does not affect the results ).

This idea should have existed since Windows Vista, but the concepts of different versions will change, and the specific operation commands will be different.

Systems, roles, and functions are logical concepts, and functions are essentially different from those of roles. What actually exists in physics is packages, programming sets, and lists.

Package file, \ WINDOWS \ servicing \ Packages

Assembly file, \ WINDOWS \ winsxs

Configuration file, \ WINDOWS \ winsxs \ Manifests

 

The following is a brief introduction.

 

1. The system is composed of multiple roles.

 

This is self-evident.

 

2. A role consists of one or more functions.

 

Corresponding to the role selection page on the server version.

For example, the Hyper-V role consists of the following functions:

Get-WindowsOptionalFeature-Online-FeatureName * hyper-v * | select FeatureName

Microsoft-Hyper-V

Microsoft-Hyper-V-Offline

Microsoft-Hyper-V-Online

RSAT-Hyper-V-Tools-Feature

Microsoft-Hyper-V-Management-Clients

Microsoft-Hyper-V-Management-PowerShell

The preceding command indicates that the role layer is purely logical. In a non-server version system, there is no role selection interface.

There is a dependency between functions. The following command shows that the Dedup-Core function depends on the File-Services function.

Get-WindowsOptionalFeature-Online-FeatureName Dedup-Core

Feature Name: Dedup-Core

Display Name: duplicate data deletion

Description: deletes duplicates and compresses at the application block level to reduce the physical storage required for data.

Restart Required: Possible

State: Enabled

Custom Properties: ServerComponent \ Description: duplicate data is deleted as a single copy of the same data stored on the volume, thus saving disk space.

ServerComponent \ DisplayName: duplicate data deletion

ServerComponent \ Id: 436

ServerComponent \ Parent: File-Services

ServerComponent \ Type: RoleService

ServerComponent \ UniqueName: FS-Data-Deduplication

ServerComponent \ NonAncestorDependencies \ ServerComponent \ UniqueName: FS-FileServer

ServerComponent \ Deploys \ Update \ Name: Dedup-Core

ServerComponent \ SystemServices \ SystemService \ defamonmonitoring: false

ServerComponent \ SystemServices \ SystemService \ Name: ddpsvc

 

3. A function consists of one or more packages. A package may also contain multiple functions.

 

Dedup-Core is a function of the file and storage service role. It consists of two feature packages and corresponding language packs:

Microsoft-Windows-Dedup-ChunkLibrary-Package ~ 31bf3856ad364e35 ~ Amd64 ~~ 6.3.9600.16384.mum

Microsoft-Windows-Dedup-ChunkLibrary-Package ~ 31bf3856ad364e35 ~ Amd64 ~ Zh-CN ~ 6.3.9600.16384.mum

Microsoft-Windows-Dedup-Package ~ 31bf3856ad364e35 ~ Amd64 ~~ 6.3.9600.16384.mum

Microsoft-Windows-Dedup-Package ~ 31bf3856ad364e35 ~ Amd64 ~ Zh-CN ~ 6.3.9600.16384.mum

The file name is too long. It is difficult to read such articles (or log files) and it will take a while.

Each package file also has a corresponding certificate file with the extension. cat. Because the package file is a plain text file, with the Certificate file, you can ensure that the package file cannot be modified in the graphic interface; it can be modified in a non-graphic interface (that is, the WinRE environment.

Why is this function used for demonstration? There are several reasons: first, it is practical. Enabling deduplication can save a lot of disk space. With the virtual machine, we will find that the large disk is not enough. After the deduplication function is enabled, the effect of saving disk space is very obvious. Second, this function is representative, third, it is relatively simple.

Let's talk about its representativeness. the deduplication function has two packages:

The two packages are of two types. The first Package is Microsoft-Windows-Dedup-ChunkLibrary-Package, which is automatically installed by the system and is available in both the client and server versions; the second Package is Microsoft-Windows-Dedup-Package, which is available only on the server version. In addition, the incremental compression function of the component is added from windows8.1.

 

4. A package consists of one or more Assembly sets and lists. An Assembly corresponds to a list.

 

An assembly is also called a component.

The Microsoft-Windows-Dedup-ChunkLibrary-Package corresponds to three sets:

Amd64_microsoft-windows-dedup-chunklibrary_31bf3856ad364e35_6.3.9600.16384_none_b739226fcac7b86b

Amd64_microsoft-windows-dedup-common_31bf3856ad364e35_6.3.9600.16384_none_24924b7b049f1064

Amd64_microsoft-windows-dedup-common.resources_31bf3856ad364e35_6.3.9600.16384_zh-cn_735de6f4f3c9bf01

The Microsoft-Windows-Dedup-Package corresponds to seven sets:

Amd64_microsoft-windows-dedup-service_31bf3856ad364e35_6.3.9600.16384_none_bfb8b8d13d6b64ec

Amd64_microsoft-windows-dedup-pipeline_31bf3856ad364e35_6.3.9600.16384_none_4a1a2e1b94c17293

Amd64_microsoft-windows-dedup-backup_31bf3856ad364e35_6.3.9600.16384_none_082618006d52d13d

Amd64_microsoft-windows-dedup-vsswriter_31bf3856ad364e35_6.3.9600.16384_none_6a34e1622afa6abc

Amd64_microsoft-windows-d... p-service.resources_31bf3856ad364e35_6.3.9600.16384_zh-cn_ef122ebc772ca755

Amd64_microsoft-windows-dedup-filter_31bf3856ad364e35_6.3.9600.16384_none_f8cff29f2baf02c3

Amd64_microsoft-windows-fsdm-hostprocess_31bf3856ad364e35_6.3.9600.16384_none_1dcf65c39dce3a7c

Each Assembly corresponds to a directory on the disk. The directory contains several files and subdirectories. During package installation, it will be copied from the installation source to the \ Windows \ Winsxs directory; each assembly has a configuration file with the same name as the directory name. The extension is manifest and copied to the \ Windows \ Winsxs \ Manifests directory. When the function is enabled, the file corresponding to the component will be copied to the system directory, and services will be created if necessary. From Vista, the management system is based on components and is no longer based on INF.

Distribution list files corresponding to the two packages:

Amd64_microsoft-windows-d... klibrary-deployment_31bf3856ad364e35_6.3.9600.16384_none_586b9e5d057f82e3.manifest

Amd64_microsoft-windows-dedup-deployment_31bf3856ad364e35_6.3.9600.16384_none_417674c644d0189e.manifest

 

Ii. File extraction and incremental Compression

 

1. Select the installation Source

 

In Windows 8.1, the deduplication function does not exist. You need to extract related files from the corresponding Server version, that is, Windows Server 2012 R2.

Table of clients and servers

Client

Server

Major version number

Windows 8.1

Windows 2012 R2

6.3

Windows 8

Windows 2012

6.2

Windows 7

Windows 2008 R2

6.1

Windows Vista

Windows 2008

6.0

 

Find install in the Soures directory on the Windows Server 2012 R2 disk. wim file, opened with the new version of the compression software, you will see a directory such as 1, 2, 3, 4, corresponding to the standard version of the core, standard version, data center version of the core, data center version. Among them, the data center version has the most comprehensive functions, but the four versions are no different for the duplicate data deletion function we demonstrated. It doesn't matter if you don't have an official version. You can download the trial version from the Microsoft site. In addition, you 'd better use the original version instead of the new version, because more files will be compressed in the new version, which makes operations unnecessary.

If you extract files from a running system, you should use a system that has enabled relevant functions and has not been patched.

 

2. Extract files

 

There are many directories and files in the installation source. We only need three directories:

\ WINDOWS \ servicing \ Packages, package file;

\ WINDOWS \ winsxs: Assembly file. Except for the Assembly subdirectory, other subdirectories are not required;

\ WINDOWS \ winsxs \ Manifests: configuration file.

 

Copy the subdirectories and files in these three directories to the same directory. Since there are tens of thousands of files and directories, the process of copying is very long and boring. In the past, in the DOS era, a command append was used to concatenate directories, which is equivalent to an operation in a directory, but now it does not exist. In addition, the installation package command dism can only specify one installation source, as a result, you have to copy it if you are bored.

Assume that all files and directories are copied to s: \ 4 \ Packages.

 

3. incremental Compression

 

Incremental Compression: Delta Compression

Remote Differential Compression: Remote Differential Compression

Single Instance Storage: Single Instance Store

Delete duplicate Data: Data Deduplication

Although these concepts all mention compression, the core idea is not to compress, but to store a single instance, that is, only one copy of the same part is saved, only some at the file level, some are at the disk level.

Why do we need to talk about incremental compression? It is because many of the files copied to s: \ 4 \ Packages are incrementally compressed. If you use NotePad to open the files, you can understand only the content starting with DCN PA30, and the rest are garbled.

Incremental compression is performed based on the difference between the two files. It is based on a version (usually the latest version) that is not required currently (usually the old version) it saves the difference from the reference file.

The differences between different versions of the same file are usually not big, and some are even the same. Therefore, incremental compression can significantly save disk space.

In either case, incremental compression occurs: first, the function is not enabled, and files that are not currently in use are saved as compressed files (but not immediately compressed). Once a function is enabled, the related files are automatically decompressed. Second, a new version patch of an assembly is installed. The new version files are saved as uncompressed files, and the replaced versions are saved as incremental compression files, if the new version is uninstalled, files of earlier versions are automatically decompressed.

Execute the task plan and compress it forcibly.

Schtasks.exe/Run/TN "\ Microsoft \ Windows \ Servicing \ StartComponentCleanup"

The file ID.

DC, short for incremental compression. N indicates a certain type of compression. In addition to DCN, there are also DCD and DCM. PA30 should be the version of incremental compression, indicating that the compression uses msdelta. dll is used as the engine, and msdelta is also used for decompression. dll; there is also a version PA19 that uses mspatchc. dll compression, using mspatcha. dll to extract (extract is also called application, apply ).

 

Compression type

File ID

Registry Value

Baseline Compression

DCD

CF: 10; f! XXX: 3

CTS and DV

No baseline Compression

DCN

CF: 200

F! XXX: 21

List File compression

DCM

CF: c

Uncompressed

 

CF: 0; f! XXX: 1

Due to the small amount of information in this area, the above content has a large number of guesses, which is insufficient for full trust. For more information about the file identity, see the msdelta. h file in the Windows SDK.

 

3. Installation Package

 

1. Preparations before installation

 

Disable the Hash test.

Because the default Assembly file should be uncompressed, but the files we extracted from the installation CD are compressed. During the installation package, the system will perform a Hash test on the Assembly file, certainly cannot pass the test. To do this, you must disable the Hash test function. You need to add a DisableFileHashVerification attribute in the registry. The type is DWORD, the value is 1, and the location is HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ SideBySide \ Configuration.

 

2. Installation Package

 

Command Used by the installation package: Dism

Dism/online/Add-Package/PackagePath: Path of the Package file

As mentioned earlier, deduplication is a function of the file service role. It also depends on some basic functions of file service, namely, Microsoft-Windows-FileServer-Package.

Dism/online/Add-Package/PackagePath: Microsoft-Windows-FileServer-Package ~ 31bf3856ad364e35 ~ Amd64 ~~ 6.3.9600.16384.mum

Dism/online/Add-Package/PackagePath: Microsoft-Windows-FileServer-Package ~ 31bf3856ad364e35 ~ Amd64 ~ Zh-CN ~ 6.3.9600.16384.mum

Dism/online/Add-Package/PackagePath: Microsoft-Windows-Dedup-Package ~ 31bf3856ad364e35 ~ Amd64 ~~ 6.3.9600.16384.mum

Dism/online/Add-Package/PackagePath: Microsoft-Windows-Dedup-Package ~ 31bf3856ad364e35 ~ Amd64 ~ Zh-CN ~ 6.3.9600.16384.mum

 

3. Preparations before enabling the Function

 

This step is critical, because almost all errors are related to the settings here. If the extracted file is an uncompressed original file, skip this step.

As mentioned above, the deduplication function involves 10 sets, three of which have been installed.

During the package installation process, the content in the registry should be automatically written. However, if the registry is installed several times, only one or two times are correct, and most of them are unsuccessful, the specific cause is unknown. If the settings in the Registry are incorrect, the decompression fails and the function cannot be enabled.

If the function cannot be enabled, you can refer to the appendix to set the relevant registry values. The Registry is located at HKLM \ COMPONENTS \ DerivedData \ Components, and the file is \ Windows \ System32 \ Config \ Components.

Generally, HKLM \ COMPONENTS is not loaded. You need to load it before performing subsequent operations.

 

 

4. Enable Functions

 

Enable-WindowsOptionalFeature-Online-FeatureName File-Services

Enable-WindowsOptionalFeature-Online-FeatureName CoreFileServer

Enable-WindowsOptionalFeature-Online-FeatureName Dedup-Core

The preceding two commands describe that a package (FileServer) contains two functions. The following command describe two packages to form one function.

 

5. Verification

 

If the installation is successful, run the following command.

View the command for deduplication: get-command * dedup *

Enable deduplication of Disk Data: Enable-DedupVolumeT:

Scan the disk and calculate the deleted duplicate data status: Update-DedupStatusT:

Return the deleted duplicate data status: Get-DedupStatus

This may be the slowest command in the system. After the command is executed, the result is not immediately displayed. Generally, it takes two days to see the result.

 

Iv. troubleshooting

 

Common Errors include:

1. Unable to read the configuration registry key

Enable-WindowsOptionalFeature: unable to read the configuration registry key.

This is because FileServer is not correctly installed and enabled. See the previous section.

2. The component file does not match the verification information in the component list.

This is because the Hash test is not disabled. See the previous section.

3. 0x800f0922

Enable-WindowsOptionalFeature: Enable-WindowsOptionalFeature failed. Error code = 0x800f0922

This is because the incremental compression value in the registry is not correctly set when the deduplication function is enabled. See the previous section.

However, if the deduplication function has been enabled, some files may have been decompressed. In this case, the files that have been decompressed cannot be set to 21. If it is set to 21, the files must be decompressed again. An error is required.

4. 0x8056530b, 0x80565306

Enable-DedupVolume: MSFT_DedupVolume.Volume = 'C: '-HRESULT 0x8056530b. The specified volume type is not supported. Fixed NTFS data volumes that support writing and CSV files that are supported by NTFS data volumes support deduplication.

This is because the system volume and network path cannot be deleted repeatedly.

5. 0x800f0830

The specified image is no longer available and may be damaged.

Discard the modified image. Then start again.

This error is really small. Find the Registry HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ ComponentBased Servicing, delete the attribute Unserviceable, or change it to 0, but Microsoft asked us to give up, I don't know why.

In addition, there are several mistakes that need to be mentioned, but they are limited to space and only omitted for prompt. If you cannot understand it, it means you haven't met it. Ignore it directly.

1. Reference assembly not found

HKLM \ Components \ DerivedData \ Components \ Identity missing

2. The referenced program is not installed on the system.

The value of V in HKLM \ Components \ DerivedData \ VersionedIndex \ XXX (winblue_rXXX) \ ComponentFamilies \ ComponentsFamily is missing! XXX

HKLM \ Components \ DerivedData \ Components \ Identity missing

3. Component Storage damaged

The assembly or inventory file is missing

HKLM \ Components \ DerivedData \ VersionedIndex \ XXX (winblue_rXXX) \ ComponentFamilies \ ComponentsFamily is missing

4. One or more transactions do not exist

HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ SideBySide \ Winners is missing

Errors cannot be listed, but you still need to read the logs by yourself. There are two main types:

1. \ Windows \ Logs \ CBS. log

The content of this file is very rich, but it may not be easy to understand at the beginning. You can refer to Microsoft's article "Install log diagnosis program for optional components".

Even if the dism command prompts an error, check the DISM log file \ WINDOWS \ Logs \ DISM \ dism. log. However, this file is almost useless in the graphic interface. You can ignore it. You only need to check this file in the WinRE environment.

2. \ Windows \ Inf \ setupapi. dev. log

If you are prompted that the update cannot be completed when installing the driver, check this file.

 

Finally, will Microsoft be unhappy when I see this article?

 

Appendix: Registry Value of the deduplication component

 

Amd64_microsoft-windows-dedup-common_31bf3856ad364e35_6.3.9600.16384_none_24924b7b049f1064

CF = 200

F! Ddp_ps.dll_549a992a3c8616e4 = 21

F! Ddputils. dll = 21

F! Ddptrace. dll = 21

F! Ddp. mof = 21

Amd64_microsoft-windows-dedup-common.resources_31bf3856ad364e35_6.3.9600.16384_zh-cn_735de6f4f3c9bf01

CF = 200

F! Ddp. mfl = 1

F! Ddputils. dll. mui = 21

Amd64_microsoft-windows-dedup-vsswriter_31bf3856ad364e35_6.3.9600.16384_none_6a34e1622afa6abc

CF = 200

F! Ddpvssvc. dll = 21

Amd64_microsoft-windows-dedup-service_31bf3856ad364e35_6.3.9600.16384_none_bfb8b8d13d6b64ec

F! Dedupfilemetadata. cdxml = 1

F! Ddpsvc. dll = 21

F! Deduplication. psd1 = 1

F! Ddpeval.exe = 21

F! Dedupjob. cdxml = 21

F! Ddpwmi. dll = 21

F! Ddpcli.exe = 21

F! Dedupmetadata. cdxml = 1

F! Deduplication. types. ps1xm_9ba49f296646713d = 21

F! Dedupstatus. cdxml = 1

F! Dedupschedule. cdxml = 21

F! Dedupvolume. cdxml = 21

F! Deduplication. format. ps1x_74de558af5a08661 = 21

F! Deduplicationprovider. mof = 21

CF = 200

Amd64_microsoft-windows-dedup-pipeline_31bf3856ad364e35_6.3.9600.16384_none_4a1a2e1b94c17293

CF = 200

F! Ddppipeline. dll = 21

F! Ddpscan. dll = 21

F! Ddpstore. dll = 21

Amd64_microsoft-windows-dedup-backup_31bf3856ad364e35_6.3.9600.16384_none_082618006d52d13d

CF = 200

F! Ddpbackup. dll = 21

Amd64_microsoft-windows-d... p-service.resources_31bf3856ad364e35_6.3.9600.16384_zh-cn_ef122ebc772ca755

CF = 200

F! Ddpsvc. dll. mui = 21

F! Deduplicationprovider. mfl = 21

F! Ddpwmi. dll. mui = 21

Amd64_microsoft-windows-dedup-filter_31bf3856ad364e35_6.3.9600.16384_none_f8cff29f2baf02c3

CF = 200

F! Dedup. sys = 21

Amd64_microsoft-windows-dedup-chunklibrary_31bf3856ad364e35_6.3.9600.16384_none_b739226fcac7b86b

CF = 200

F! Ddpchunk. dll = 21

Amd64_microsoft-windows-fsdm-hostprocess_31bf3856ad364e35_6.3.9600.16384_none_1dcf65c39dce3a7c

CF = 200

F! Fsdmhost.exe = 21

Note: This setting is based on extracting files from the disc.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.