Windows.10.Custom.ISO/README.md

84 lines
4.2 KiB
Markdown
Raw Normal View History

2020-11-09 15:40:36 +00:00
# How to make a Windows 10 custom ISO using a vm on a Linux host
2020-11-09 13:57:06 +00:00
2020-11-09 15:40:36 +00:00
This readme will guide you through the process of making your own distributable Windows 10 ISO.
This method was tested on a Ubuntu 20.04.1 LTS (Focal Fossa) system using a lbvirt powered vm, it can be done on a Windows host with a vm too! I guess vmware is your best bet!
# What are we going to do?
2020-11-09 15:57:16 +00:00
In short, we will install a normal Windows 10 to a vm then we will modify the running system to our needs, we will install and remove software, tweak the settings etc. and after that we will create a wim file of our existing installation and replace the wim file with the install.wim on the Windows 10 installer iso and recompile the extracted iso files to a new iso so it will install Windows 10 with your own preferences and preset user account!
2020-11-09 15:40:36 +00:00
# Dependencies
- A Virtual Machine manager of your choice
- Official Windows 10 ISO from M$ (https://www.microsoft.com/de-de/software-download/windows10) or choose whatever version you like with https://tb.rg-adguard.net/public.php
- Windows ADK (https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install) (Only the Deployment Tools)
- A USB Stick
- Time
# Installation
There are 2 ways on how to do it, do it like normal with internet activated, or disable internet access and maybe follow a guide like https://wiki.ameliorated.info/doku.php?id=documentation_2004 to debloat your system from the beginning, the amelioration process however requires you to mount the virtual disk image at some point, if you are using libvirt and chose qcow2 as your virtual disk image format you should follow these steps: https://gist.github.com/shamil/62935d9b456a6f9877b5
If you chose to install it the vanilla M$ way, just install it as usual, create your user and follow the steps.
Ameliorated is the same but without internet connection, see their documentation for that!
# Post Installation
Modify the Windows 10 installation to your own needs, remove or install Software, tweak the system to your needs, basically personalize the installationas you would need it if you ever need to reinstall it and need a system up and running quickly with all the tools you need!
Install WIndows ADK and copy oscdimg.exe to your usb stick from the install directory on your pc for later use, then you can uninstall Windows ADK if you don't need it.
After you are finished with modifying and personalizing your system, reboot the vm and boot into the Windows 10 iso
# Capturing the Installation
In the Windows 10 installer you press Shift+F10 to open CMD
then you start by identifying your disks, use diskpart for this.
2020-11-09 15:47:35 +00:00
```
2020-11-09 15:40:36 +00:00
diskpart
DISKPART> list vol
2020-11-09 15:47:35 +00:00
```
2020-11-09 15:40:36 +00:00
This will list all connected volumes to the vm, make sure to pass your USB stick over to your vm, it will show up in diskpart aswell.
Remember the drive letter for the Windows installation and for the usb stick!
In this example is /imagefile:D:\install.wim the location where you will write the image, for example your USB stick or if you have enough space the virtual disk, this is up to you!
/capturedir:K:\ is the location of your Windows disk, the path that you are going to make an image of!
2020-11-09 15:47:35 +00:00
```
dism /capture-image /imagefile:D:\install.wim /capturedir:K:\ /name:"Windows 10 Capture" /compress:maximum /checkintegrity /verify /bootable
```
2020-11-09 15:40:36 +00:00
This will take some time.
After it is finished, reboot into your Windows system, you can now see the install.wim you just created.
# USB Stick preparation
Unpack the Windows 10 iso you downloaded earlier to a folder into your usb stick/virtual disk drive, could be 'win10_iso' and navigate to the sources and replace the install.wim with your install.wim.
# ISO creation
Navigate in your cmd to the folder where you store oscdimg.exe
Find the drive letter of your usb stick and follow the command
In this example line "d:" is the drive letter of your usb, please make sure to enter the correct letter!
2020-11-09 15:47:35 +00:00
```
oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bd:\win10_iso\boot\etfsboot.com#pEF,e,bd:\win10_iso\efi\microsoft\boot\efisys.bin d:\win10_iso d:\my.personal.windows.10.iso
```
2020-11-09 15:40:36 +00:00
Congratulations! You just created your first own Windows 10 image!
# Sources
https://www.tenforums.com/tutorials/72031-create-windows-10-iso-image-existing-installation.html