- Capture and apply Windows Full Flash Update (FFU) images
- What you need to work with FFUs in Windows
- Capture an FFU
- Deploy Windows from WinPE using an FFU
- Capturing and applying FFUs on differently-sized drives
- Mount an FFU for servicing
- DISM: проверка и восстановление системных компонентов образа Windows 10
- SFC /scannow: Проверка и восстановление системных файлов Windows
- DISM /RestoreHealth: Восстановление хранилища компонентов образа Windows
- Восстановление поврежденного хранилища компонентов Windows 10/Server 2016 с помощью PowerShell
- Восстановление хранилища компонентов оффлайн если Windows не загружается
Capture and apply Windows Full Flash Update (FFU) images
Deploy Windows faster on the factory floor by using the Full Flash Update (FFU) image format. FFU images allow you to apply an image of a physical drive, including Windows, recovery, and system partition information all at once directly to a different drive.
Unlike the file-based WIM format, FFU is a sector-based file container that stores one or more partitions. Sector-based imaging means that FFUs take less time to deploy, but have larger files sizes than WIMs. See WIM vs. VHD vs. FFU: comparing image file formats for information about the differences between image formats.
Starting with Windows 10, version 1709, DISM has the ability to capture, deploy, and service FFUs, with the following limitations:
- The drive that an FFU is applied to has to be the same or larger than the drive it is captured from
- FFU captures of encrypted disks are not supported
- Captures of disks that have Volume Shadow Copy Service (VSS) enabled are not supported
- Splitting compressed FFUs is not supported
What you need to work with FFUs in Windows
To capture, deploy, and mount FFU images with DISM, you’ll need to work in a Windows 10, version 1709 or later, or WinPE for Windows 10, version 1709 or later environment.
To capture and deploy FFUs using the instructions below, you’ll also need:
- A Windows PC that has been generalized with Sysprep. We’ll refer to this as the reference PC. For a walkthrough on how to create an image that’s ready for deployment, see the OEM deployment of Windows 10 lab.
- A PC to deploy the FFU image to. We’ll refer to this as the destination PC. The hard drive on this PC will be overwritten, so make sure you’re using a PC that doesn’t have any information you want to keep.
- The latest version of the ADK, from Download the Windows ADK
- Bootable WinPE media for Windows 10, version 1803 or later. See WinPE: Create USB bootable drive for instructions on how to create WinPE Media.
- Storage
USB storage, formatted as NTFS with enough space to save the FFU. 16 GB is enough space to store an FFU of a basic Windows image. You can use the same USB drive for WinPE and storage if you follow the instructions for creating a multipartiton USB drive. For best performance, you want to maximize I/O between where your FFU is stored and the destination PC. For best performance use a USB 3.0 drive to store the image, and an internal SSD for the destination device.
or
Network storage where you can keep your FFU image. For optimal performance, use a 1 Gb or faster network.
Capture an FFU
Boot the reference PC using WinPE bootable media.
Identify the drive to which you’ll be capturing the image from. You can use diskpart, or add Windows PowerShell support to WinPE and use Get-Disk for scriptability and more complex setups such as a server with multiple disks.
The output will list your drives. Make a note of the disk number in the Disk ### column. This is the value that you’ll use when capturing your image.
Use DISM to capture an image of all the partitions on the physical drive. For disk X:, the string used with /capturedrive will look like this: \\.\PhysicalDriveX , where X is the disk number that diskpart provides. For example, to capture Disk 0, you’d use /CaptureDrive:\\.\PhysicalDrive0 .
For more information about PhysicalDrive X, see CreateFile function.
To see command line options for capturing FFUs, run dism /capture-ffu /? or see DISM Image Management Command-Line Options. Note that you shouldn’t have to specify a PlatformID when capturing a desktop image.
The following command captures an FFU image of PhysicalDrive0 called WinOEM.ffu. The /name and /description arguments allow you to set information about your image. This information is displayed when you use dism /get-imageinfo . /name is required, /description is optional.
This command also gives a name and description to the FFU image. Name is a required parameter.
Deploy Windows from WinPE using an FFU
Boot your destination PC to WinPE.
Connect a storage drive or map the network location that has your FFU file and note the drive letter, for example, N.
Identify the drive to which you’ll be applying the image:
Note the drive number in the Disk ### column.
Apply the image to the cleaned drive. Here, we’re applying n:\WinOEM.ffu to Disk 0.
To see the commands available with /apply-ffu, run dism /apply-ffu /? or see DISM Image Management Command-Line Options.
Capturing and applying FFUs on differently-sized drives
The FFU format captures the partition layout. If the reference PC and destination PC hard drives may be different sizes, use this strategy to make sure your Windows partition is as large as it can be:
On the reference PC, install Windows with no recovery partition, and set up the Windows partition as the final partition on the drive. To set this up, use Windows Setup or a deployment script.
On the destination PC, deploy the FFU. For larger drives, there will be unused space at the end.
Using Diskpart, expand the Windows partition to fill the empty space.
Then, shrink the Windows partition to make room for the recovery partition.
Configure your recovery partition.
Mount an FFU for servicing
You can use DISM to mount FFU images for servicing. Like with other image formats, you can mount and modify an FFU before committing changes and unmounting. Mounting an FFU for servicing uses the same /mount-image command that you use for mounting other image types. When mounting an FFU, you’ll always use /index:1 when mounting.
Unlike WIM images, FFU images get mounted as virtual hard disks. Files appear in the specified mount folder, but since FFUs can contain more than one partition but only have one index, DISM maps only the Windows partition from the mounted FFU to the mount folder.
To mount an FFU
Open a Command Prompt as administrator.
Mount the image using dism /mount-image . This example mounts D:\WinOEM.ffu to C:\ffumount:
To see available command line options for /mount-image run dism /mount-image /? or see DISM image management command line options.
Service your image. For example, to enable the legacy components feature:
To see available options, run dism /image:
Unmount your FFU image and commit or discard changes. If you use /commit, your changes will be saved to your FFU file.
To unmount your FFU and commit changes, you’d use /unmount-image with the /commit option:
If you decide to not keep the changes you’ve made to the FFU, you can use /unmount-image with the /discard option:
DISM: проверка и восстановление системных компонентов образа Windows 10
Для проверки целостности системных файлов и восстановления поврежденных файлов (библиотек) компонентов в Windows (Windows Server) можно использовать команды SFC и DISM (Deployment Image Servicing and Management). Данные утилиты могут быть крайне полезными, если операционная система Windows работает нестабильно, появляются ошибки при запуске стандартных приложений или служб, после вирусного заражения и т.д.
Утилита DISM включена в состав Windows, начиная с Vista и может быть использована во всех поддерживаемых версиях начиная с Windows 7/Windows Server 2008 R2 (есть ограничения) заканчивая последними билдами Windows 10 / Windows Server 2019. В этой статье мы рассмотрим, как использовать утилиты DISM и SFC для проверки и восстановления целостности образа и системных файлов Windows 10.
SFC /scannow: Проверка и восстановление системных файлов Windows
Утилиту DISM для восстановления Windows обычно рекомендуется использовать после утилиты проверки целостности системных файлов SFC (System File Checker). Команда sfc /scannow сканирует защищенные системные файлы Windows, и, если они отсутствуют или повреждены, попробует восстановить их оригинальные копии из хранилища системных компонентов Windows (каталог C:\Windows\WinSxS).
Если команда sfc /scannow возвращает ошибку “ Программа защиты ресурсов Windows обнаружила повреждённые файлы, но не может восстановить некоторые из них / Windows Resource Protection found corrupt files but was unable to fix some of them ”, скорее всего утилита не смогла получить необходимые файла из хранилища компонентов (образа) Windows.
В этом случае вам нужно попробовать восстановить хранилище компонентов (ваш образ Windows) с помощью DISM.
После восстановления образа вы можете повторно использовать утилиту SFC для восстановления системных файлов.
DISM /RestoreHealth: Восстановление хранилища компонентов образа Windows
Для сканирования образа Windows на наличие ошибок и их исправления используется параметр DISM /Cleanup-image . Рассмотренные ниже команды выполняются в командной строке, запущенной с правами администратора.
Чтобы проверить наличие признака повреждения хранилища компонентов образа Windows (флага CBS) , который выставил один из системных процессов, выполните следующую команду (не применимо к Windows 7/Server 2008R2):
DISM /Online /Cleanup-Image /CheckHealth
При запуске этой команды не выполняется сканирование хранилища, проверяются лишь записанные ранее значения и события в журнале Windows. Изменения не вносятся. Команда проверит, не помечен ли образ как поврежденный и возможно ли устранить данное повреждение.
В этом примере команда вернула, что с образом все хорошо:
No component store corruption detected.
The operation completed successfully.DISM /Online /Cleanup-Image /ScanHealth – выполнить полное сканирование хранилища компонентов на наличие повреждений в системных образа Windows (выполняется довольно долго от 10 до 30 минут).
Если команда /ScanHealth возвращает ошибки:
- Хранилище компонентов подлежит восстановлению (The component sore is repairable);
- Ошибка: 1726. Сбой при удалённом вызове процедуры;
- Ошибка: 1910. Не найден указанный источник экспорта объекта.
Это однозначно говорит о том, что ваш образ Windows 10 поврежден и его нужно восстановить.
Чтобы исправить ошибки, автоматически скачать и заменить файлы повреждённых или отсутствующих компонентов эталонными версиями файлов (библиотек) из центра обновлений Windows (на компьютере должен быть доступ в Интернет), выполните:
DISM /Online /Cleanup-Image /RestoreHealth
Процесс сканирования и восстановления компонентов может быть довольно длительным (30 минут или более).
Если восстановление выполнится успешно, появится сообщение:
Восстановление выполнено успешно. Операция успешно завершена.
The restore operation completed successfully. The operation completed successfully.Если на компьютере (сервере) отсутствует доступ в Интернет или отключена служба Windows Update, то при восстановлении хранилища компонентов появляются ошибки вида:
- 0x800f0906 — Не удалось скачать исходные файлы. Укажите расположение файлов, необходимых для восстановления компонента, с помощью параметра Источник (0x800f0906 — The source files could not be downloaded. Use the source option to specify the location of the files that are required to restore the feature);
- Ошибка: 0x800f0950 — Сбой DISM. Операция не выполнена (0x800f0950 — DISM failed. No operation was performed);
- Ошибка: 0x800F081F. Не удалось найти исходные файлы. Укажите расположение файлов, необходимых для восстановления компонента, с помощью параметра Источник (Error 0x800f081f, The source files could not be found. Use the «Source» option to specify the location of the files that are required to restore the feature).
Вы можете указать WIM или ESD файл с оригинальным установочным образом Windows, который нужно использовать в качестве источника для восстановления файлов компонентов системы. Предположим, вы смонтировали установочный ISO образ Windows 10 в виртуальный привод E:. Для восстановления хранилища компонентов из образа используйте одну из команд:
DISM /online /cleanup-image /restorehealth /source:E:\sources\install.wim
Или:
DISM /online /cleanup-image /restorehealth /source:E:\sources\install.esdЧтобы запретить использовать центр обновлений Windows в Интернете, и выполнять сканирование и восстановление образа Windows только из локального WIM/ESD файла:
DISM /online /cleanup-image /restorehealth /source:E:\sources\install.wim /limitaccess
Или:
DISM /online /cleanup-image /restorehealth /source:E:\sources\install.esd /limitaccessdism /online /cleanup-image /restorehealth /limitaccess
Журнал сканирования и восстановления системных файлов утилиты DISM можно найти здесь: C:\Windows\Logs\CBS.log .
После восстановления хранилища компонентов вы можете запустить утилиту проверки системных файлов sfc /scannow . Скорее всего она успешно восстановит поврежденные файлы (Программа защиты ресурсов Windows обнаружила поврежденные файлы и успешно их восстановила).
Восстановление поврежденного хранилища компонентов Windows 10/Server 2016 с помощью PowerShell
В версии PowerShell в Windows 10 и Windows Server 2016/2019 есть аналоги рассмотренных выше команд DISM. Для сканирования хранилища компонентов и поиска повреждений в образе выполните:
Repair-WindowsImage -Online –ScanHealth
Если ошибок в хранилище компонентов не обнаружено, появится сообщение:
ImageHealth State: Healthy
Для запуска восстановления системных компонентов и файлов наберите:
Repair-WindowsImage -Online -RestoreHealth
Repair-WindowsImage -Online -RestoreHealth -Source E:\sources\install.wim:1
Где, 1 – индекс используемой у вас редакции Windows из WIM или ESD файла (список редакций Windows в WIM файле можно вывести так: Get-WindowsImage -ImagePath «E:\sources\install.wim» ).
Восстановление хранилища компонентов оффлайн если Windows не загружается
Если Windows не загружается корректно, вы можете выполнить проверку и исправление системных файлов в оффлайн режиме.
- Для этого загрузитесь с установочного (загрузочного диска) и на экране начала установки нажмите Shift + F10
- Чтобы разобраться с буквами дисков, назначенных в среде WinPE, выполните команду diskpart -> list vol (в моем примере диску, на котором установлена Windows присвоена буква C:\, эту букву я буду использовать в следующих командах);
- Проверим системные файлы и исправим поврежденные файлы командой: sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
- Для исправления хранилища компонентов используйте следующую команду (в качестве источника для восстановления компонентов мы используем WIM файл с установочным образом Windows 10, с которого мы загрузили компьютер):
Dism /image:C:\ /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim - Если на целевом диске недостаточно места, то для извлечения временных файлов нам понадобится отдельный диск достаточного размера, например F:\, на котором нужно создать пустой каталог: mkdir f:\scratch и запустить восстановление хранилища компонентов командой:
Dism /image:C:\ /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim /ScratchDir:F:\scratch