Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Laptop to custom.ISO (slimmolG, v1)
- 2018-0113
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- What if you wanted to capture your brand new laptop as a custom bootable Windows 10 ISO already preset with your user settings and pre-installed software?
- I performed this capture as an experiment while writing crib notes for accuracy, then fleshed them out further so a computer novice friend (and nearly anybody who can type and click) could follow along. The guide was validated using Windows 10 Pro v1703 on my EVOC Clevo P650HS-G, and some steps include USB-->USB transfers since my laptop is an offline machine. The ISO creation protocol works for Pro and Home, but Hyper-V is not included and can't be installed in Win10-Home; free alternative hypervisors exist.
- You can go from a power up, to a custom.ISO, to validating your custom.ISO on your laptop in a virtual machine in less than an hour, not including download times. All without allowing your new laptop on the internet... as long as you have a second computer and USB drive :)
- Dowload this guide as a text file:
- https://pastebin.com/edit/9SPSRBRU
- Phase 1
- Get your laptop out of the shipping box, power it up, and install Macrium Reflect free edition; no, seriously, do this. Follow the guide by @Phoenix (but don't move any libraries, folders, etc.) and save an MRIMG or two on an external device or two.
- Phase 2
- Create a custom ISO with your user settings and pre-installed software.
- ** It's nowhere near as long or complicated as it looks **
- Build Process:
- A) Setup drive(s), apply labels, make folders (line 58)
- B) Download/extract Windows ISO template
- C) Create bootable WinPE flash drive (line 135)
- D) Download/install ADK Deployment Tool
- E) Clean partition (line 182)
- F) Create custom install.wim
- G) Replace downloaded ISO install.wim (line 248)
- H) Create new bootable custom.ISO
- Test Process:
- I) Enable/setup Hyper-V (line 286)
- J) Install/run custom.ISO in the VM
- K) Boot/install custom.ISO on your SSD (line 385)
- Phase 3
- L) Teleport back to the start using the initial Macrium MRIMG files
- ============================================================
- Capture your system as a custom.ISO
- Requirements:
- Your laptop and a flash drive
- An Official Windows 10 v1703+ ISO
- The Windows Deployment tools (free from MS).
- NOTE:
- Your complete Windows installation must
- be 100% on a single partition or it fails.
- Phase 1
- *) Save a couple Macrium Reflect MRIMG backups
- -Follow the guide by @Phoenix (but don't move any libraries, folders, etc.)
- http://forum.notebookreview.com/threads/macrium-reflect-installation-usage-guide.804746/
- -Just setup MR and save the MRIMGs.
- Phase 2
- A-### Setup or partition source machine drives
- - partition your primary SSD
- - and keep your 2nd SSD as a safe storage reserve
- 1) Press Win + R
- 2) type "diskmgmt.msc", hit enter
- Right-click D: (your 2nd drive)
- select "Change Drive Letter..."
- select "Change"
- assign letter "E" or higher, OK.
- Right click E:, select properties,
- label E: as Drive2, Storage, or whatever
- Right-click on C:, select "Shrink Volume"
- Reduce the volume of C: by >=65GB
- ideally ~split volume, e.g. 500-->200/300
- Right-click new Unallocated box graphic
- select New Simple Volume
- specify size >=65GB = shrink amount
- assign drive letter D:
- Label volume as "Data", finish wizard.
- Right-click C:, select properties
- Label C: as "Windows"
- Label all other drives at this point for clarity.
- 3) Exit disk manager
- 4) On Data(D:)
- Create a folder named "Scratch"
- Create a folder named "Iso_files"
- Create a folder named "Hyper-V"
- 5) Restart your laptop.
- * Alternatively, use two drives for the setup
- - It's a little faster. That's it.
- 1) Letter and label SSDs as Windows(C:) and Data(D:)
- Right-click drives in Windows Explorer
- click properties, type in the names
- 2) Label other drives now for clarity
- 3) On Data(D:)
- Create a folder named "Scratch"
- Create a folder named "Iso_files"
- Create a folder named "Hyper-V"
- B-### Download/extract Win10 ISO for the custom build template
- -Match your download to your installed OS version
- 1) Download ISO from windowsiso.net
- (alternatively, use the download tool at Heidoc.net)
- Select Win10 version from drop-down list
- e.g. Win10 1703 CU Download>Standard
- Scroll down, select language/version:
- select the English, x64 link on farthest right
- =Win10_1703_English_x64.iso (4,232,730 kb)
- You can verify this download via MD5, SHA1, SHA256 checksums:
- Download>install HashCalc (or use no-install HashMyFiles, etc.)
- Browse to Win10 ISO in Data box
- Click Calculate, wait 1.5-2 min for sums
- MD5=effccfda8a8dcf0b91bb3878702ae2d8
- SHA1=ce8005a659e8df7fe9b080352cb1c313c3e9adce
- SHA256=b842a801bf1dedf3acbfd909f91fb2a741eef20fda133daa1878e46a07ec9237
- Note:
- Win10 ISO CRC/MD5/SHA1/256 checksum dump:
- use browser search to easily find all three calculated sums.
- https://pastebin.com/fgqtG3mJ
- Microsoft SHA1 Hash Archive:
- you can query using the calculated SHA1 sum
- http://www.heidoc.net/php/myvsdump.php
- 2) Save downloaded ISO to USB, move to the source laptop
- Copy ISO to Data(D:)
- 3) Mount the moved ISO by double clicking
- 4) Copy all of the files to D:\Iso_files
- note that the folder D:\Iso_files\Sources now exists
- 5) Unmount the ISO by Right-click>Eject
- The official ISO file isn't used later, but keep it handy.
- C-### Create bootable Win10PE from the Win10 1703+ ISO
- 1) Quick-format a small flash drive (even 0.5 GB is fine)
- Right-click, select format>Quick-format>start
- 2) Browse to D:\Iso_files
- 3) Copy all of the contents EXCEPT the "sources" folder to the USB drive
- 4) Create a folder named "sources" on the USB drive
- 5) Browse to D:\Iso-files\sources and find "boot.wim"
- 6) Copy "boot.wim" to your empty USB "sources" folder
- = Finished!
- = drive has 0.32 GB of files
- 7) Label the USB WinPE drive
- Right-click, select Rename, = DISM-W10PE
- - serves as reminder of the build method.
- - DISKPART and DISM work, that's all you need.
- * Nothing stops you from using the remainder of your flash drive.
- * Make a folder called "Other files" and use it!
- D-### Install Windows Deployment Tools feature
- 1) Download Windows Assessment and Deployment Kit (ADK) for Windows 10
- - URL is in my downloads section
- - direct install is more time/data efficient (see note below)
- 2) Match the ADK version to your Windows version, e.g. use ADK 1703 for a Win 1703
- Perhaps unnecessary, but logical
- 3) Download and run the installer file
- Select download for use on another machine
- Opt out of Microsoft data collection
- Save toolkit (3.05 GB) to USB drive
- 4) Move USB drive to source computer
- 5) Run ADK setup file
- Click through screens, Opt out of data collection
- Select ONLY the necessary Deployment Tools feature (67.5 MB)
- Click Install
- - Windows may not find the .msi file:
- - Browse to /Windows Kits/10/ADK/Installers if asked
- 6) Restart laptop
- -Finalizes all of the changes made so far.
- ** Direct Install Note:
- If your custom.ISO source machine is allowed on the internet:
- a) Run the installer
- b) Unselect everything except for the Deployment Tools
- c) Directly install only the Deployment Tools feature
- d) Restart
- E-### Clean source machine partition using Extended Disk Cleanup
- -Clean up a little, a lot, or everything as you prefer.
- -follow below for the "new laptop ISO"
- 1) Open an elevated command prompt
- Press Win+X > Powershell (Admin)
- type "cmd", hit enter
- 2) Run the following command:
- "cmd.exe /c cleanmgr /sageset:1 & cleanmgr /sagerun:1"
- - the exact sage# isn't important as long as they match
- 3) Don't close the command window yet
- 4) Select everything in the cleanup options popup window EXCEPT:
- :the 'green arrow' Windows update/upgrade files
- (the 'green arrow' files should go into the custom.ISO)
- * Note: "sagesets" won't cleanup Windows setup files (e.g. ~BT, etc.)
- If you want to fully clean up after you upgrade, or install in the VM:
- type "cleanmgr /autoclean", hit enter
- 5) Clean recent files history
- In File Explorer:
- click File tab > select "Change folder and search options"
- click the "Clear" button under Privacy
- close File Explorer
- * STOP clicking things! Your system is ready for imaging!
- * Turn off your laptop.
- F-### Create custom install.wim file
- 1) Boot source machine using DISM-W10PE from step-B (or other WinPE)
- Plug in USB stick, reboot while hitting F7
- Choose USB drive from the options
- 2) Press Shift+F10 at Language/Time/Currency Screen to open command prompt
- type "diskpart", hit enter
- type "list vol", hit enter
- Inspect the list and note volume letters:
- -letters ~may vary, but labels are static
- -use the volume letters showing labels for:
- Windows = source drive to copy from
- Data = drive location to save .wim file
- type "exit", hit enter to exit diskpart (but not cmd)
- 3) Enter the following command to create the .wim file:
- Exact characters and spacing! no brackets!
- [dism /capture-image /imagefile:D:\install.wim /CaptureDir:C:\ /ScratchDir:D:\scratch /name:"W10Pro-slimmolG" /Description:"EVOCp650,W10P plus user, noMods" /compress:maximum /checkintegrity /verify /bootable]
- -The Deployment Tool information displays
- -The cursor blinks for 30 seconds
- -The Saving Image information displays
- **custom install.wim (~10GB) is created in 9.5-10.0 minutes
- 4) After .wim file creation, exit cmd window
- 5) Close Install Media window
- click Yes to cancel install and allow reboot
- 6) Verify your captured source system info:
- Press Win+X > Powershell (Admin)
- Enter the below command, no brackets!
- [dism /get-wiminfo /wimfile:"d:\install.wim" /Index:1]
- Capture Command Notes:
- /imagefile:D:\install.wim = save location drive letter and file info
- /capturedir:C:\ = Windows source drive letter info
- /ScratchDir:D:\Scratch = drive\folder location to let dism find Scratch space
- /name:"Anyname" = Necessary argument, but the actual name isn't important. It labels the image created in .wim
- /Description:"YourChoice" = Optional argument; can omit whole segment, but adding a descriptive comment helps identify the final ISO.
- G-### Replace downloaded ISO install.wim with custom version
- 1) Browse to your custom install.wim on Data(D:)
- 2) Copy your custom install.wim to the Sources folder in ISO_files (D:\Iso_files\Sources)
- - This will replace the original install.wim from the downloaded ISO
- 3) Rename your backup copy of D:\install.wim to "FactoryFresh-install.wim"
- - Note that it must be changed back to install.wim to reuse
- H-### Create the bootable custom.ISO
- 1) Run Deployment and Imaging Tools from ADK as an administrator
- On the start menu, find Windows Kits/Deployment and Imaging Tools
- Right-click>More>Run as Administrator
- 2) Type "cd\" and hit enter to shorten the long path
- 3) Run the following command:
- Exact characters and spacing! no brackets!
- [oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bd:\iso_files\boot\etfsboot.com#pEF,e,bd:\iso_files\efi\microsoft\boot\efisys.bin d:\iso_files d:\sweetnewfile.iso]
- *sweetnewfile.ISO is made in ~1 minute
- -BIOS bootable via the [etfsboot.com] bootdata.
- -UEFI bootable via the [efisys.bin] bootdata.
- Note:
- d:\iso_files = REPLACE all three instances if your copied official ISO files are elsewhere.
- d:\sweetnewfile.iso = REPLACE this with your preferred save location+name
- You now have:
- A) custom.ISO file on D:\
- B) custom.wim file on D:\
- C) extracted official ISO files in D:\Iso_files
- D) an empty folder at D:\Scratch
- E) a still empty folder at D:\Hyper-V
- Check your custom.ISO in a virtual machine
- Test your custom.ISO for functionality
- I-### Enable Hyper-V virtual machine manager
- -perform after step-B to include Hyper-V in your ISO
- 1) Run Powershell as administrator
- Press Win+X, click on the admin link
- 2) Type the following command at the prompt:
- "Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All"
- A few, then more circles appear, then it finishes
- 3) Enter Y to allow reboot
- Windows integrates Hyper-V, updates settings, auto-reboots
- *Note: Win10-Home does not include Hyper-V. Use 3rd-party hypervisor.
- J-### Create/start virtual machine running custom.ISO
- 1) Open Hyper-V Manager via start menu
- 2) Adjust Server settings:
- Select 'desktop' under Manager in left panel
- Click Hyper-V Settings in upper right Actions panel
- Ensure Enhanced Session Modes are enabled:
- :in the new upper Server panel
- :in the new lower User panel
- 3) Add new virtual machine
- Right-click the server node (the little 'desktop' again)
- Select New>Virtual Machine
- Name=VirtMach1,
- Store location change to D:\Hyper-V
- Generation=2
- Assign startup memory= 4,096 MB (8,192 MB is better, if laptop has 16GB)
- **Unselect Dynamic memory option**
- Networking=not connected
- Create VHDx, size=45 GB
- *~10 GB ISO expands to ~27 GB in VHDx
- * WinSetup balks at 35 GB and recommends 44 GB
- (Enhanced Sessions Mode has some virtual bulk)
- Install OS from ISO:
- Browse to your sweetnewfile.ISO
- Click Finish.
- 4) Adjust VM settings
- Right-click VirtMach01, select Settings
- In Security panel, uncheck Secure Boot option
- In Integration Services panel, add check to Guest Services
- In Checkpoints panel, set to Standard
- click Apply, and OK to close window
- 5) Run virtual machine
- Double-click VirtMach01 to open VMconnect window
- click "Start" within window
- When asked, press a KEY to boot.
- If text is a little fuzzy, adjust VMconnect View>Zoom
- 6) Install Windows (this will install your custom version)
- Select languages, etc., hit next, hit Install Now
- Select "I don't have a product key"
- Select CustomInstall, Next, etc.
- ~5 minutes of installation until restart notice appears
- customized Win10 starts in a 4:3 VMconnect window
- The VMconnect resolution+resources dialogue box now appears...
- DO NOT immediately click the Connect button.
- Let installation initialize devices>get ready>Login screen.
- or simply let the installation auto-signin>desktop.
- NOW select Show Options at the bottom of the connect dialogue
- check "Save my settings..."
- click CONNECT
- VMconnect flashes>resizes>restarts>login screen.
- Sign-in to your new prepared virtual machine
- VM install notes:
- * If you forgot to uncheck Dynamic memory, auto-restart will fail.
- If you allocated a tiny amount of memory, the same...
- but, you can manually Turn off VMconnect at blue screen and Restart VM.
- * If you immediately Connect when you see the 'resolution' dialogue
- you will have blue screen Remote Desktop Services problems
- * After ~0-1.5 minutes a Control Center Application dialogue pops up
- Just okay it, and ignore. It's an irrelevant "HotKey in VM" issue.
- 7) Create a checkpoint for your virtual machine
- Click Action>Checkpoint on the VMconnect toolbar
- - a checkpoint will appear in the Hyper-V manager
- Why are checkpoints useful?
- 1st: Checkpoint>make changes>install programs>etc.>Checkpoint2
- 2nd: Now Right-click>Apply to switch between two checkpoints in seconds (yes, seconds)
- Notes:
- * If you StartMenu>Restart your guest OS (i.e "in the window"), you will see RDS error upon restart
- * If you Shut Down via the VMconnect menu it will be fine:
- The initial "good resolution" VMconnect shuts down.
- VMconnect flashes.
- 4:3 VMconnect window shuts down OS, goes to black.
- You now have:
- A version of your new laptop, running on your new laptop!
- [img]https://i.imgur.com/nihjkeu.jpg[/img]
- Feel free to poke around in the guest OS (i.e. the custom.ISO installed in Hyper-V), your physical laptop system is safe from all your poking. The worst that can happen is you revert to an earlier checkpoint or reinstall in a new VM. Enable/disable whatever you like, surf the registry, finally get around to deleting that pesky system32 folder...
- Check your ISO directly on a physical drive
- K-### Install your custom.ISO on your source machine SSD
- * Warning for partitioned drives:
- * If you imaged C=full disk, and then decided to partition, reinstall still restores C=full disk.
- * Therefore, ensure novel partitions are backed up externally.
- 1) Your custom.ISO is already bootable!
- Grab and quick-format a flash drive
- Right-click, select format
- default=NTFS, 4,096 bytes, Quick Format
- Double-click sweetnewfile.ISO on (D:) to mount it
- Copy all of the contents to the USB drive
- = Finished.
- Reboot while hitting F7
- Install your custom Windows10 with preset users/software
- * Alternate method using Rufus:
- Download Rufus onto a flash drive, transfer it to Data(D:)
- Open Rufus, point it to your sweetnewfile.ISO
- -See the Rufus guide by @Phoenix for more info
- Teleport back to factory fresh with Macrium Reflect
- Phase 3:
- L-### Use your MR rescue disk to run MR in WinPE
- * Warning for partitioned drives,
- * your pre-partioning MRIMG of C=full disk, will restore C=full disk
- * therefore, ensure any novel partitions are backed up externally
- 1) Pop in your Macrium Reflect rescue disk from Phase 1
- Follow the guide by @Phoenix to refresh your memory
- 2) Browse to your MRIMG file
- 3) Bam! Experiment over! Back to the start!
- Lather, rinse, repeat as desired...
- ============================================================
- Additional notes/info/links for some steps:
- The Info and Download links are at the end (line 540), following the guide notes.
- * Skip these notes if you can partition without trouble, and already have a Win10 ISO and WinPE USB drive.
- Notes.A-###
- My primary drive initially couldn't be split due to a system restore file sitting right in the middle of C:
- -Resolved by disabling Restore
- -Remove hibernation now too if you don't use it.
- 1) Disable System Restore:
- Control Panel>System>System Protection
- click "Configure" button
- click radio button to Disable sys prot.
- 2) Disable Hibernation
- Press Win+R for command prompt
- type "powercfg /h OFF", hit enter
- Note: no confirmation is given.
- 3) Trim SSD
- Press Win+X > PowerShell (Admin)
- type "Optimize-Volume -DriveLetter C -ReTrim -Verbose"
- Notes.B-###
- There are a couple ways to get your Win10 ISO from Microsoft:
- The user agent change method stopped working (at least for me, on the Windows site);
- I didn't investigate further, but I'll leave the method here anyway.
- 1) Option 1- Use the ISO downloading tool from HeiDoc.net
- Download the tool and run the .exe, install isn't needed.
- Select your ISO from many download options.
- 2) Option 2- Download directly from Microsoft
- Your download choice will be selected by Microsoft
- Go to the Windows ISO download page
- Download what Microsoft lets you, i.e. 1709 right now
- 3) Option 3- Download preferred ISO from a list of choices
- Go to the Windows ISO download page
- *Change the User Agent String in Chrome/Opera by:
- opening developer tools = ctrl+shift+i
- click "3-dot" drop down box within developer tools
- select More Tools>Network Conditions
- uncheck Select Automatically
- Select a "custom" non-windows choice like Linux, Mac
- refresh browser to reload current webpage
- Current page reloads as a Linux/Mac/etc machine page
- Choose from new options on webpage and download
- *Closing the webpage restores automatic detection.
- *Calculate/record/check the hashes if you like
- 4) Save downloaded ISO to USB, move to the source laptop
- Copy to Data(D:)
- 5) Mount the downloaded ISO by double clicking
- 6) Copy all of the files to D:\Iso_files
- 7) Unmount the ISO by Right-click>Eject
- The official ISO isn't used later, but keep it handy.
- Notes.C-###
- There are several alternative methods to obtain an "official" WinPE via:
- -Use your full ADK download from step-D
- -Direct download of Windows Install Media
- -Use WinPE implemented in a Macrium Reflect rescue disk
- >If you download the full ADK suite you can make an "official" WinPE10"
- 1) Open ADK setup as in step-D and install WinPE feature
- 2) Quick-format a USB drive
- Right-click, select format>Quick-format>start
- 3) Run Deployment and Imaging Tools from ADK as an administrator
- On the start menu, find Windows Kits/Deployment and Imaging Tools
- Right-click>More>Run as Administrator
- type "copype amd64 D:\WinPE_amd64", hit enter
- 4) Identify your USB drive letter
- type "diskpart", hit enter
- type "list vol", hit enter
- -note the letter of your USB drive
- type exit
- 5) Create the WinPE USB drive
- * Replace "F:" with your USB drive volume letter if different!
- type "MakeWinPEMedia /UFD D:\WinPE_amd64 F:"
- hit enter
- Type "Y" to proceed with format.
- Program displays:
- Setting the boot code on F:
- Copying files to F:...
- Success
- 6) Your flash drive is now:
- :labeled as WinPE
- :populated with 266 MB of files
- >Re-download the entire WinPE dataset from Microsoft:
- 1) Download the Windows 10 media creation tool
- 2) Right-click, Run As Administrator
- Choose 64-bit
- Create installation media for another PC
- 3) Insert USB flash drive
- 4) Select media choice of "USB Flash Drive"
- Flash drive now has lots of files (3.55 GB)...
- >Make and use a Macrium Reflect rescue disk
- 1) Click "Other Tasks" on the file menu
- select "Rescue Disk"
- follow wizard...
- 2) While booting to the MR rescue disk you MUST:
- - NOT CLOSE the MR application, or your computer restarts!
- - minimize the MR application
- - use the command prompt for DISKPART/DISM
- Download links, further info/refs:
- Links current as of 01/2018
- (*) This guide:
- https://pastebin.com/edit/9SPSRBRU
- (*) Download the free version of Macrium Reflect 7
- https://www.macrium.com/reflectfree
- (B) Download Windows Assessment and Deployment Kit (ADK) for Windows 10
- https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit
- (C) Download Win10 1703
- http://windowsiso.net/windows-10-iso/windows-10-creators-update-1703-download-build-15063/windows-10-creators-update-1703-iso-download-standard/
- (C) Download HashCalc
- http://www.slavasoft.com/hashcalc/
- (C) Win10 ISO CRC/MD5/SHA1/256 checksum dump:
- https://pastebin.com/fgqtG3mJ
- (D) Download Windows 10 Media Creation tool
- https://www.microsoft.com/en-us/software-download/windows10
- Microsoft's DISM command-line options/explanations
- https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-image-management-command-line-options-s14#capture-image
- Microsoft's Oscdimg command-line options/explanations
- https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/oscdimg-command-line-options
- The following two tutorials provide in-depth coverage of specific aspects of this guide, with additional info for actually building the ISO within a VM. Both tutorials contain DISM/Ocsdimg command line examples for comparison.
- EchoRelay's Final Thoughts from IT tutorial:
- https://finalthought.org/2017/04/12/creating-customized-windows-10-version-1703-media-iso-wim-flash-drive/
- Kari Finn's TenForums tutorial:
- https://www.tenforums.com/tutorials/72031-create-windows-10-iso-image-existing-installation.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement