mkdir c:\winpe mkdir c:\winpe\mount cd c:\winpe copype.cmd amd64 c:\winpe mkdir c:\netboot\win\boot imagex /mountrw winpe.wim 1 mount xcopy c:\winpe\mount\windows\boot\pxe\pxeboot.n12 c:\netboot\win xcopy c:\winpe\mount\windows\boot\pxe\bootmgr.exe c:\netboot\win xcopy c:\winpe\iso\boot\boot.sdi c:\netboot\win\boot
startnet.cmd
file startnet.cmd
C:\winpe\mount\Windows\System32\startnet.cmd
@echo off echo. echo wpeinit. echo ... echo. wpeinit echo WinPE: echo 1) echo . echo. echo 2) smb echo Windows 2008 R2. echo. echo 3) smb echo Windows 2008 R2 Standart Full echo. echo , echo Enter( = 1 ). set /p ID= echo. if %ID%==1 goto :first if %ID%==2 goto :second if %ID%==3 goto :third if %ID% GTR 3 goto :failure if %ID% LSS 3 goto :failure exit /b :second echo 2 echo. echo smb . net use j: \\1.2.3.4\public echo j:\win2008s_x64\setup.exe j:\win2008s_x64\setup.exe exit /b :third echo 3 echo. echo smb . net use j: \\1.2.3.4\public echo : j:\win2008s_x64\setup.exe /unattend:j:\autounattend.xml j:\win2008s_x64\setup.exe /unattend:j:\autounattend.xml exit /b :first echo 1 echo. :failure echo. echo smb . net use j: \\1.2.3.4\public exit /b
startnet.cmd
. imagex.exe /unmount /commit mount xcopy c:\winpe\winpe.wim c:\netboot\win\boot
What is the boot configuration data store?
The boot configuration data store contains boot configuration parameters and controls the launch of the Microsoft Windows Vista and Microsoft Windows Server 2008 operating systems. These parameters were previously stored in the Boot.ini file (for BIOS-based operating systems) or in NVRAM (for EFI-based operating systems (Extensible Firmware Interface)). To change the Windows code that runs before loading the operating system, you can use the command line utility Bcdedit.exe, with which you can add, delete, modify, and supplement entries in the boot configuration data store.
bcdedit -createstore %1\BCD bcdedit -store %1\BCD -create {ramdiskoptions} /d "Ramdisk options" bcdedit -store %1\BCD -set {ramdiskoptions} ramdisksdidevice boot bcdedit -store %1\BCD -set {ramdiskoptions} ramdisksdipath \boot\boot.sdi for /F "tokens=2 delims={}" %%i in ('bcdedit -store %1\BCD -create /d "MyWinPE Boot Image" /application osloader') do set guid={%%i} bcdedit -store %1\BCD -set %guid% systemroot \Windows bcdedit -store %1\BCD -set %guid% detecthal Yes bcdedit -store %1\BCD -set %guid% winpe Yes bcdedit -store %1\BCD -set %guid% osdevice ramdisk=[boot]\Boot\winpe.wim,{ramdiskoptions} bcdedit -store %1\BCD -set %guid% device ramdisk=[boot]\Boot\winpe.wim,{ramdiskoptions} bcdedit -store %1\BCD -create {bootmgr} /d "Windows BootManager" bcdedit -store %1\BCD -set {bootmgr} timeout 30 bcdedit -store %1\BCD -set {bootmgr} displayorder %guid%
createbcd.cmd c:\netboot\win\boot
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ComplianceCheck> <DisplayReport>Never</DisplayReport> </ComplianceCheck> <DiskConfiguration> <WillShowUI>OnError</WillShowUI> <Disk> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> <CreatePartitions> <CreatePartition> <Order>1</Order> <Type>Primary</Type> <Extend>true</Extend> </CreatePartition> </CreatePartitions> <ModifyPartitions> <!-- Modify the system partition--> <ModifyPartition> <Order>1</Order> <PartitionID>1</PartitionID> <Format>NTFS</Format> <Label>System</Label> </ModifyPartition> </ModifyPartitions> </Disk> </DiskConfiguration> <ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/IMAGE/NAME</Key> <Value>Windows Server 2008 R2 SERVERSTANDARD</Value> </MetaData> </InstallFrom> <InstallToAvailablePartition>false</InstallToAvailablePartition> <WillShowUI>OnError</WillShowUI> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> </OSImage> </ImageInstall> <UpgradeData> <WillShowUI>OnError</WillShowUI> <Upgrade>false</Upgrade> </UpgradeData> <UserData> <ProductKey> <Key></Key> <WillShowUI>OnError</WillShowUI> </ProductKey> <AcceptEula>true</AcceptEula> <FullName>serverclub</FullName> <Organization>serverclub</Organization> </UserData> </component> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-US</UILanguage> <WillShowUI>OnError</WillShowUI> </SetupUILanguage> <UserLocale>en-US</UserLocale> <SystemLocale>en-US</SystemLocale> <UILanguage>en-US</UILanguage> <UILanguageFallback>en-US</UILanguageFallback> <InputLocale>en-US</InputLocale> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <InputLocale>en-US</InputLocale> <UILanguage>en-US</UILanguage> <UILanguageFallback>en-US</UILanguageFallback> </component> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ComputerName>CHANGE-ME</ComputerName> <ProductKey>XXX-ZZZ-YYY-RRR-QQQ</ProductKey> <RegisteredOrganization>serverclub</RegisteredOrganization> <RegisteredOwner>serverclub</RegisteredOwner> <DoNotCleanTaskBar>true</DoNotCleanTaskBar> <TimeZone>UTC</TimeZone> <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserAccounts> <AdministratorPassword> <Value>ServerMegaSecurePassword111</Value> <PlainText>true</PlainText> </AdministratorPassword> </UserAccounts> </component> </settings> <settings pass="offlineServicing"> <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DriverPaths> <PathAndCredentials wcm:keyValue="1" wcm:action="add"> <Path>j:\</Path> </PathAndCredentials> </DriverPaths> </component> </settings> <cpi:offlineImage cpi:source="wim:j:/win2008s_x64/sources/install.wim#Windows Server 2008 R2 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
startnet.cmd
script.c:\netboot\win
folder to the server tftp root, and also place the files from the Windows Server 2008 installation disk / image in the folder accessible for mounting via sbm protocol.Source: https://habr.com/ru/post/213007/
All Articles