bios and uefi re-engineering finished.

This commit is contained in:
Michael H.G. Schmidt 2023-02-20 16:32:39 +01:00
parent fdadd9aa03
commit 9463e14820
4 changed files with 238 additions and 92 deletions

260
README.md
View File

@ -439,7 +439,102 @@ cd /D %USERPROFILE%\workspace\git\w10install
03_PrepareBoot.cmd
```
This will create the new "boot.wim" image.
This will create the new "boot.wim" image. It will also:
- set the correct locale in the boot image
- install the custom boot menu for the setup
- configure the xml files the unattended installation
- copy snapshot64 to the boot image for bare metal recovery
- copy the "netuse" script to attach a network drive
Example run:
```text
=========================================
START of BOOT image creation process ...
=========================================
########## calling [ mount-boot.cmd ] ##########
creating wim mountpoint for BOOT ...
setting write access for boot.wim ...
mounting boot.wim to C:\TEMP\BOOT ...
Deployment Image Servicing and Management tool
Version: 10.0.19041.329
Mounting image
[==========================100.0%==========================]
The operation completed successfully.
########## calling [ finish-boot.cmd ] ##########
searching for SCRIPT settings ...
OK. Loading SCRIPT settings ...
searching for COMPANY settings ...
INFO: config file ..\company\settings.cmd NOT FOUND
renaming Windows setup.exe to boot image ...
1 file(s) moved.
setting language in boot image ...
Deployment Image Servicing and Management tool
Version: 10.0.19041.329
Image Version: 10.0.19041.508
Input locale has been set to: de-DE
The operation completed successfully.
Deployment Image Servicing and Management tool
Version: 10.0.19041.329
Image Version: 10.0.19041.508
System locale has been set to: de-DE
The operation completed successfully.
replacing setup.exe with our installer utility ...
1 file(s) copied.
copying config file for unattended install [ BIOS ]...
1 file(s) copied.
working on [ C:\TEMP\BOOT\autounattend_BIOS.xml ] and replacing string [ ___MYUSER___ ] With [ localadmin ] ...
working on [ C:\TEMP\BOOT\autounattend_BIOS.xml ] and replacing string [ ___MYNAME___ ] With [ Local Administrator ] ...
working on [ C:\TEMP\BOOT\autounattend_BIOS.xml ] and replacing string [ ___MYPASS___ ] With [ ******** ] ...
working on [ C:\TEMP\BOOT\autounattend_BIOS.xml ] and replacing string [ ___MYLANG___ ] With [ de-DE ] ...
copying config file for unattended install [ UEFI ]...
1 file(s) copied.
working on [ C:\TEMP\BOOT\autounattend_UEFI.xml ] and replacing string [ ___MYUSER___ ] With [ localadmin ] ...
working on [ C:\TEMP\BOOT\autounattend_UEFI.xml ] and replacing string [ ___MYNAME___ ] With [ Local Administrator ] ...
working on [ C:\TEMP\BOOT\autounattend_UEFI.xml ] and replacing string [ ___MYPASS___ ] With [ ******** ] ...
working on [ C:\TEMP\BOOT\autounattend_UEFI.xml ] and replacing string [ ___MYLANG___ ] With [ de-DE ] ...
copying STANDARD snapshot64.exe to boot image ...
1 file(s) copied.
copy netuse helper script to boot image ...
1 file(s) copied.
unmounting and committing changes to C:\TEMP\W10\sources\boot.wim ...
Deployment Image Servicing and Management tool
Version: 10.0.19041.329
Image File : C:\TEMP\W10\sources\boot.wim
Image Index : 2
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.
======
READY.
======
```
## 8.2 Prepare the new windows image
@ -454,6 +549,76 @@ This will create/prepare the new "install.wim" and it will remove all apps that
*HINT: To leave the standard apps in the image just call the script without switch '/R'*
Example run:
```text
=========================================
START of MAIN image creation process ...
=========================================
########## calling [ export-image.cmd ] ##########
[export-image.cmd] INFO: found C:\TEMP\W10\sources\install.wim
[export-image.cmd] INFO: exporting image from C:\TEMP\W10\sources\install.wim ...
Deployment Image Servicing and Management tool
Version: 10.0.19041.329
Exporting image
[==========================100.0%==========================]
The operation completed successfully.
[export-image.cmd] WARNING: removing original C:\TEMP\W10\sources\install.wim ...
[export-image.cmd] INFO: renaming C:\TEMP\W10\sources\w10pro.wim ...
1 file(s) moved.
READY.
########## calling [ mount-image.cmd ] ##########
creating image mountpoint ...
setting write access for install.wim ...
mounting install.wim to C:\TEMP\IMAGE ...
Deployment Image Servicing and Management tool
Version: 10.0.19041.329
Mounting image
[==========================100.0%==========================]
The operation completed successfully.
########## calling [ finish-image.cmd ] ##########
[finish-image.cmd] INFO: copying scripts to C:\TEMP\IMAGE\Windows\Setup\scripts ...
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
[finish-image.cmd] INFO: doing cleanup on mountpoint C:\TEMP\IMAGE ...
Deployment Image Servicing and Management tool
Version: 10.0.19041.329
Image Version: 10.0.19042.508
[=========== 20.0% ]
The operation completed successfully.
[finish-image.cmd] INFO: unmounting and committing changes to C:\TEMP\W10\sources\install.wim ...
Deployment Image Servicing and Management tool
Version: 10.0.19041.329
Image File : C:\TEMP\W10\sources\install.wim
Image Index : 1
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.
checking for NTLite ...
calling NTLite ...
======
READY.
======
```
## 8.3 Edit the Windows image with "NTLite"
@ -492,7 +657,7 @@ cd /D %USERPROFILE%\workspace\git\w10install
Example run:
```text
====================
Format USB Media ...
Format Media ...
====================
Showing disk list ...
@ -577,42 +742,20 @@ IMPORTANT HINT: the script will ask for UEFI or BIOS mode. This means: In case y
Example run:
```
searching for SCRIPT settings ...
OK. Loading SCRIPT settings ...
searching for COMPANY settings ...
OK. Loading COMPANY settings ...
=================================
Copying all data to USB Stick ...
Copying all data to Media ...
=================================
using drive [ E: ] ...
using drive [ e: ] ...
INFO: DRIVETPYE = [ FAT32 ]
IMPORTANT:
How is your target media formatted?
- use "exfat" for BIOS based installations only!
- use "fat32" for UEFI based installations only!
REASON: UEFI cannot read "exfat" filesystems and Windows setup will throw error code: 0x80042565
BIOS(default) or UEFI setup (B/U)? b
selected: BIOS
1 file(s) copied.
working on [ E:\autounattend.xml ] and replacing string [ ___MYUSER___ ] With [ support ] ...
working on [ E:\autounattend.xml ] and replacing string [ ___MYNAME___ ] With [ Exabyte Support ] ...
working on [ E:\autounattend.xml ] and replacing string [ ___MYPASS___ ] With [ ******** ] ...
working on [ E:\autounattend.xml ] and replacing string [ ___MYLANG___ ] With [ de-DE ] ...
moving [ c:\temp\install.wim ] to c:\TEMP\W10\sources ...
1 file(s) moved.
copying all files in [ c:\TEMP\W10 ] to drive E: ...
DRIVETPYE = [ FAT32 ]
copying all files in [ c:\TEMP\W10 ] to drive e: ...
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Dienstag, 14. Februar 2023 14:18:39
Started : Montag, 20. Februar 2023 15:59:31
Source : c:\TEMP\W10\
Dest = E:\
@ -622,47 +765,60 @@ copying all files in [ c:\TEMP\W10 ] to drive E: ...
------------------------------------------------------------------------------
100% New File 31938 c:\TEMP\W10\Auto-saved 09100bfc.xml
100% New File 128 c:\TEMP\W10\autorun.inf
100% New File 413738 c:\TEMP\W10\bootmgr
100% New File 1.4 m c:\TEMP\W10\bootmgr.efi
100% New File 74305 c:\TEMP\W10\NTLite.log
100% New File 74184 c:\TEMP\W10\setup.exe
[...]
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 82 81 1 0 0 1
Files : 866 866 0 0 0 0
Bytes : 3.534 g 3.534 g 0 0 0 0
Times : 0:00:22 0:00:21 0:00:00 0:00:01
Speed : 179432212 Bytes/sec.
Speed : 10267.193 MegaBytes/min.
Ended : Montag, 20. Februar 2023 15:59:53
copying folder [ tools ] to drive e: ...
100% New File 22016 C:\Users\mschmidt\workspace\git\WINDOWS\w10install\tools\allpull.exe
100% New File 22016 C:\Users\mschmidt\workspace\w10install\tools\allpull.exe
[...]
copying folder [ software ] to E:\tools ...
copying folder [ software ] to e:\tools ...
100% New File 1.6 m C:\Users\mschmidt\workspace\git\WINDOWS\w10install\software\7z-setup.msi
100% New File 1.6 m C:\Users\mschmidt\workspace\w10install\software\7z-setup.msi
[...]
copying folder [ drivers ] to E:\tools ...
copying folder [ drivers ] to e:\tools ...
100% New File 488 C:\Users\mschmidt\workspace\git\WINDOWS\w10install\drivers\install-archerT5E-bluetooth.cmd
100% New File 488 C:\Users\mschmidt\workspace\w10install\drivers\install-archerT5E-bluetooth.cmd
[...]
copying folder [ scripts ] to E:\tools ...
copying folder [ scripts ] to e:\tools ...
100% New File 5161 C:\Users\mschmidt\workspace\git\WINDOWS\w10install\scripts\autoconfig-all.cmd
100% New File 5834 C:\Users\mschmidt\workspace\w10install\scripts\autoconfig.cmd
[...]
copying folder [ source ] to E:\tools ...
copying folder [ source ] to e:\tools ...
100% New File 2123 C:\Users\mschmidt\workspace\git\WINDOWS\w10install\source\allpull.pb
100% New File 2123 C:\Users\mschmidt\workspace\w10install\source\allpull.pb
[...]
copying folder [ optional ] to E:\tools ...
copying folder [ optional ] to e:\tools ...
100% New File 456 C:\Users\mschmidt\workspace\git\WINDOWS\w10install\optional\install-antivir.cmd
100% New File 955 C:\Users\mschmidt\workspace\w10install\optional\block-updates.cmd
[...]
copying folder [ company ] to E:\tools ...
copying folder [ apps ] to e:\tools ...
100% New File 152 C:\Users\mschmidt\workspace\git\WINDOWS\w10install\company\ftpsettings.cmd
[...]
copying folder [ apps ] to E:\tools ...
100% New File 70 C:\Users\mschmidt\workspace\git\WINDOWS\w10install\apps\apps.txt
100% New File 147 C:\Users\mschmidt\workspace\w10install\apps\apps.txt
[...]
copying autoconfig starter script to e: ...
@ -671,6 +827,12 @@ copying autoconfig starter script to e: ...
putting copytools script to e: ...
1 file(s) copied.
IMPORTANT HINT:
How is your target media formatted?
- use "exfat" for BIOS based installations only!
- use "fat32" for UEFI based installations only!
REASON: UEFI cannot read "exfat" filesystems and Windows setup will throw error code: 0x80042565
======
READY.
======
@ -779,7 +941,7 @@ In the next screen select your USB disk:
## 10.3 Installing
After booting from the USB media you will see a menu. Select "INSTALL system" and click on "Yes" two times. *IMPORTANT! This will DELETE ALL DATA from your machine!* Answering "No" will reboot the machine without touching your data.
After booting from the USB media you will see a menu. Select "INSTALL" and click on "Yes" two times. *IMPORTANT! This will DELETE ALL DATA from your machine!* Answering "No" will reboot the machine without touching your data.
Clicking on the button "COMMAND shell" will start the rescue system.
@ -787,6 +949,8 @@ Clicking on "Snapshot 64" will start the Bsckup/Restore program and you can rest
![](setup_boot_menu.jpg)
*IMPORTANT HINT: According to the settings of your firmware select "BIOS" or "UEFI" mode!*
## 10.4 FINISH

View File

@ -4,9 +4,9 @@ set BOOT=%SystemDrive%\TEMP\BOOT
set SCRIPT_SETTINGS=..\scripts\settings.cmd
set COMPANY_SETTINGS=..\company\settings.cmd
set LANG=en-US
set MYUSER=
set MYNAME=
set MYPASS=
set localadmin=localadmin
set localadmin_name=Local Administrator
set localadmin_password=
rem ===================
rem CONFIGFILE CHECK
@ -19,6 +19,7 @@ if NOT EXIST %SCRIPT_SETTINGS% (
echo OK. Loading SCRIPT settings ...
call %SCRIPT_SETTINGS%
)
echo.
echo searching for COMPANY settings ...
if NOT EXIST %COMPANY_SETTINGS% (
@ -27,6 +28,7 @@ if NOT EXIST %COMPANY_SETTINGS% (
echo OK. Loading COMPANY settings ...
call %COMPANY_SETTINGS%
)
echo.
rem ======
rem MAIN
@ -35,57 +37,37 @@ rem ======
if NOT EXIST %BOOT%\winsetup.exe (
echo renaming Windows setup.exe to boot image ...
move /Y %BOOT%\setup.exe %BOOT%\winsetup.exe
echo.
)
echo setting language in boot image ...
dism /image:%BOOT% /Set-InputLocale:%LANG% || exit /b 1
dism /image:%BOOT% /Set-SysLocale:%LANG% || exit /b 1
echo.
echo replacing setup.exe with our installer utility ...
copy /Y installer.exe %BOOT%\setup.exe
rem ask for user ...
if "@%localadmin%" NEQ "@" (
set MYUSER=%localadmin%
) else (
echo.
set /p MYUSER="Username (%MYUSER%)? "
)
rem ask for real name ...
if "@%localadmin_name%" NEQ "@" (
set MYNAME=%localadmin_name%
) else (
echo.
set /p MYNAME="Display Name (%MYNAME%)? "
)
rem ask for a password ...
if "@%localadmin_password%" NEQ "@" (
set MYPASS=%localadmin_password%
) else (
echo.
set /p MYPASS="Password (not set)? "
)
echo copying config for unattended install ...
copy /Y autounattend_BIOS_template.xml %BOOT%\autounattend_BIOS.xml
copy /Y autounattend_UEFI_template.xml %BOOT%\autounattend_UEFI.xml
echo.
rem prepare BIOS version ...
..\tools\searchreplace %BOOT%\autounattend_BIOS.xml ___MYUSER___ "%MYUSER%"
..\tools\searchreplace %BOOT%\autounattend_BIOS.xml ___MYNAME___ "%MYNAME%"
..\tools\searchreplace %BOOT%\autounattend_BIOS.xml ___MYPASS___ "%MYPASS%" /S
..\tools\searchreplace %BOOT%\autounattend_BIOS.xml ___MYLANG___ "%LANG%"
echo.
rem prepare unattended xml files ...
for %%A in (
rem prepare UEFI version ...
..\tools\searchreplace %BOOT%\autounattend_UEFI.xml ___MYUSER___ "%MYUSER%"
..\tools\searchreplace %BOOT%\autounattend_UEFI.xml ___MYNAME___ "%MYNAME%"
..\tools\searchreplace %BOOT%\autounattend_UEFI.xml ___MYPASS___ "%MYPASS%" /S
..\tools\searchreplace %BOOT%\autounattend_UEFI.xml ___MYLANG___ "%LANG%"
echo.
BIOS
UEFI
) do (
echo copying config file for unattended install [ %%A ]...
copy /Y autounattend_%%A_template.xml %BOOT%\autounattend_%%A.xml
rem prepare BIOS version ...
..\tools\searchreplace %BOOT%\autounattend_%%A.xml ___MYUSER___ "%localadmin%"
..\tools\searchreplace %BOOT%\autounattend_%%A.xml ___MYNAME___ "%localadmin_name%"
..\tools\searchreplace %BOOT%\autounattend_%%A.xml ___MYPASS___ "%localadmin_password%" /S
..\tools\searchreplace %BOOT%\autounattend_%%A.xml ___MYLANG___ "%LANG%"
echo.
)
if EXIST ..\company\snapshot64.exe (
echo copying LICENSED snapshot64.exe to boot image ...

View File

@ -12,7 +12,7 @@ set preserve_savedgames_folder=1
set searchdomains=localdomain,fritz.box
set gitserver=github.com
set gitrepo=my_repo_at_github
set localadmin=localadmin
rem set localadmin=localadmin
set localadmin_name=Local Administrator
set localadmin_password=

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 43 KiB