Servicing

Remin project notes

Some early notes from the initial PoC of the Remin project (Replicated MinWin), an attempt to revive bare metal Nano Server.

notes

packages:

// CORRECT ORDER
/PackagePath:I:\tmp\packageshit\Microsoft-Windows-Foundation-Group-merged-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-Foundation-Group-merged-Package
/PackagePath:I:\tmp\packageshit\Microsoft-Windows-BootEnvironment-BootManagers-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-BootEnvironment-BootManagers-Package
/PackagePath:I:\tmp\packageshit\Microsoft-OneCore-Common-DriverClasses-Core-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-Common-DriverClasses-Core-Package
/PackagePath:I:\tmp\packageshit\Microsoft-Windows-Server-Minimal-Drivers-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-Server-Minimal-Drivers-Package
/PackagePath:I:\tmp\packageshit\Microsoft-Windows-CoreSystem-merged-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-CoreSystem-merged-Package
/PackagePath:I:\tmp\packageshit\Microsoft-OneCore-Wer-merged-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-Wer-merged-Package
/PackagePath:I:\tmp\packageshit\Microsoft-OneCore-Console-Host-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-Console-Host-Package
/PackagePath:I:\tmp\packageshit\Microsoft-Windows-Online-Setup-State-Full-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-Online-Setup-State-Full-Package
/PackagePath:I:\tmp\packageshit\Microsoft-OneCore-CoreSystem-Core-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-CoreSystem-Core-Package
/PackagePath:I:\tmp\packageshit\Microsoft-NanoServer-Edition-Core-Package
/PackagePath:I:\tmp\packageshit\en-US\Microsoft-NanoServer-Edition-Core-Package

notes

servicing.exe
copy /y I:\tmp\image-repro\wcp.dll V:\Windows\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.18945.1001_none_c944f4cc2876ca60\wcp.dll
copy /y "I:\tmp\insider_tmps\tmp6\files\windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Microsoft-OneCore-CoreSystem-BootableSKU-merged-Package~31bf3856ad364e35~amd64~~10.0.18945.1001.cat" "V:\Windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}"
copy /y "I:\tmp\insider_tmps\tmp6\files\windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Microsoft-OneCore-BootableSKU-merged-Package~31bf3856ad364e35~amd64~~10.0.18945.1001.cat" "V:\Windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}"

DISM ADD

dism /image:V:\ /add-package /packagepath:"I:\tmp\packageshit\Microsoft-Windows-ServicingStack-OneCore-Package.cab"
dism /image:V:\ /add-package /packagepath:"I:\tmp\packageshit\Microsoft-Windows-Servicing-Core-Package.cab"
dism /image:V:\ /add-package /packagepath:"I:\tmp\packageshit\Microsoft-Windows-ServicingStack-OneCore-Package.cab"
dism /image:V:\ /add-package /packagepath:"I:\tmp\packageshit\Microsoft-Windows-ServicingStack-OneCoreadmin-Package.cab"

BIG ADD

dism /image:V:\ /add-package /PackagePath:I:\tmp\packageshit\Microsoft-Windows-Foundation-Group-merged-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-Foundation-Group-merged-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-BootEnvironment-BootManagers-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-BootEnvironment-BootManagers-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-Common-DriverClasses-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-Common-DriverClasses-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-Server-Minimal-Drivers-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-Server-Minimal-Drivers-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-ServerCore-Drivers-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-ServerCore-Drivers-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-CoreSystem-merged-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-CoreSystem-merged-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-OneCore-Wer-merged-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-Wer-merged-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-Online-Setup-State-Full-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-Online-Setup-State-Full-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-OneCore-CoreSystem-Core-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-CoreSystem-Core-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-OneCore-EnterpriseNetworking-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-EnterpriseNetworking-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-OneCore-Pnp-Full-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-Pnp-Full-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-Network-Security-Core-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-Network-Security-Core-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-CoreSystem-RemoteFS-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-Windows-CoreSystem-RemoteFS-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-Windows-RemoteFS-Legacy-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-OneCore-Console-Host-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-OneCore-Console-Host-Package.cab /PackagePath:I:\tmp\packageshit\Microsoft-NanoServer-Edition-Core-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Microsoft-NanoServer-Edition-Core-Package.cab /PackagePath:I:\tmp\packageshit\Remin-SKU-Foundation-Package.cab /PackagePath:I:\tmp\packageshit\en-US\Remin-SKU-Foundation-Package.cab 

ADD PRODUCTOPTIONS AND OTHER REG FIXES (disable mpssvc, bfe, set subsystems, setup state, wininit, product policy)

AS SYSTEM

copy /y V:\windows\system32\boot\winload.efi V:\windows\system32
copy /y V:\windows\system32\boot\en-us\winload.efi.mui V:\windows\system32\en-us

copy /y I:\tmp\insider_tmps\tmp6\files\windows\system32\nihost.exe V:\windows\system32
copy /y I:\tmp\insider_tmps\tmp6\files\windows\system32\nsrc.exe V:\windows\system32
copy /y I:\tmp\insider_tmps\tmp6\files\windows\system32\en-us\nihost.exe.mui V:\windows\system32\en-us
copy /y I:\tmp\insider_tmps\tmp6\files\windows\system32\en-us\nsrc.exe.mui V:\windows\system32\en-us

MAKE BOOTABLE

bcdboot C:\windows /s X: /f UEFI /p /d
bcdedit /store X:\efi\Microsoft\boot\bcd
bcdedit /store X:\efi\Microsoft\boot\bcd /set {default} osdevice hd_partition=v:
bcdedit /store X:\efi\Microsoft\boot\bcd /set {default} device hd_partition=v:
bcdedit /store X:\efi\Microsoft\boot\bcd /set {default} testsigning on
bcdedit /store X:\efi\Microsoft\boot\bcd /set {bootmgr} device hd_partition=x:

bcdedit /store X:\efi\Microsoft\boot\bcd /set {default} debug off
bcdedit /store X:\efi\Microsoft\boot\bcd /dbgsettings serial debugport:1 baudrate:115200
bcdedit /store X:\efi\Microsoft\boot\bcd /set {default} bootdebug off
bcdedit /store X:\efi\Microsoft\boot\bcd /set {bootmgr} bootdebug off

list

I:\tmp\images-repro\disk.vhd

@echo off
xcopy /y /e components\*.manifest I:\tmp\wsrv\18945\windows\winsxs\manifests\
xcopy /y /e components\* I:\tmp\wsrv\18945\windows\winsxs\
xcopy /y /e packages\*.mum I:\tmp\wsrv\18945\Windows\servicing\Packages\
copy /y I:\tmp\wsrv\18945\windows\servicing\packages\Windows-Defender-Server-Core-Group-Package~31bf3856ad364e35~amd64~en-US~10.0.18945.1001.cat I:\tmp\wsrv\18945\windows\servicing\packages\Remin-SKU-Foundation-Package.cat
copy /y I:\tmp\wsrv\18945\windows\servicing\packages\Windows-Defender-Server-Core-Group-Package~31bf3856ad364e35~amd64~en-US~10.0.18945.1001.cat I:\tmp\wsrv\18945\windows\servicing\packages\Remin-SKU-Foundation-Package-en-US.cat

copy /y amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.18945.1001_none_c944f4cc2876ca60.manifest I:\tmp\ss-18945\manifest.txt
copy /y amd64_microsoft-windows-d..ing-management-core_31bf3856ad364e35_10.0.18945.1001_none_eb19b9888beb6b30.manifest I:\tmp\ss-18945\dism-core.manifest
copy /y amd64_microsoft-windows-d..gement-winproviders_31bf3856ad364e35_10.0.18945.1001_none_77334d1b06186fc7.manifest I:\tmp\ss-18945\dism-providers.manifest
copy /y amd64_microsoft-windows-d..ervicing-management_31bf3856ad364e35_10.0.18945.1001_none_1e8f369b6ed8bb42.manifest I:\tmp\ss-18945\dism.manifest
copy /y amd64_microsoft-windows-d..cing-management-api_31bf3856ad364e35_10.0.18945.1001_none_66a76be4c078727f.manifest I:\tmp\ss-18945\dism-api.manifest
copy /y amd64_microsoft-windows-pantherengine_31bf3856ad364e35_10.0.18945.1001_none_6df70314070307d0.manifest I:\tmp\ss-18945\panther.manifest
copy /y amd64_microsoft-windows-packagemanager_31bf3856ad364e35_10.0.18945.1001_none_acbd579f547095a3.manifest I:\tmp\ss-18945\pkgmgr.manifest

xcopy /y /e I:\tmp\wsrv\18945\windows\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.18945.1001_none_c944f4cc2876ca60\* I:\tmp\ss-18945\
xcopy /y /e I:\tmp\wsrv\18945\windows\winsxs\amd64_microsoft-windows-d..ing-management-core_31bf3856ad364e35_10.0.18945.1001_none_eb19b9888beb6b30\* I:\tmp\ss-18945\
xcopy /y /e I:\tmp\wsrv\18945\windows\winsxs\amd64_microsoft-windows-d..gement-winproviders_31bf3856ad364e35_10.0.18945.1001_none_77334d1b06186fc7\* I:\tmp\ss-18945\
xcopy /y /e I:\tmp\wsrv\18945\windows\winsxs\amd64_microsoft-windows-d..ervicing-management_31bf3856ad364e35_10.0.18945.1001_none_1e8f369b6ed8bb42\* I:\tmp\ss-18945\
xcopy /y /e I:\tmp\wsrv\18945\windows\winsxs\amd64_microsoft-windows-d..cing-management-api_31bf3856ad364e35_10.0.18945.1001_none_66a76be4c078727f\* I:\tmp\ss-18945\
xcopy /y /e I:\tmp\wsrv\18945\windows\winsxs\amd64_microsoft-windows-pantherengine_31bf3856ad364e35_10.0.18945.1001_none_6df70314070307d0\* I:\tmp\ss-18945\
xcopy /y /e I:\tmp\wsrv\18945\windows\winsxs\amd64_microsoft-windows-packagemanager_31bf3856ad364e35_10.0.18945.1001_none_acbd579f547095a3\* I:\tmp\ss-18945\

:: REMOVE EVENTS FROM DISM.MANIFEST!

SxS hashing

https://web.archive.org/web/20170909224540/https://stolenbytes.com/?p=177