DrEmpiricism / Optimize-Offline

Optimize-Offline is a Windows 10 offline image optimization framework.
MIT License
706 stars 65 forks source link

No bootable medium found! System halted! #108

Closed Alexusson closed 4 years ago

Alexusson commented 4 years ago

Hi DrEmpiricism,

First of all, I would like to thank you for this nifty piece of software. I am using this tool for some time and editing .wim files, and until now I did not have any issue. I like this tool a lot. I wish more power to your brain!

Today I tried to handle with the Windows 10 19H1 1903 iso file downloaded from the Microsoft webpage. Everything went smooth but when I want to test the new ISO via VirtualBox a fatal error appears. FATAL: No bootable medium found! System halted!

I hope you can help me with what I am doing wrong?

Cheers

Below is attached Optimize-Offline.log and WinFileInfo.txt:


Optimize-Offline v3.2.6.4 starting on [08/06/2019 at 03:43:23 PM]


"Optimizing image: Windows 10 Pro"


2019-08-06T15:43:23 [INFO]: Supported Image Build: [18362] 2019-08-06T15:43:26 [INFO]: Mounting Windows 10 Pro 2019-08-06T15:46:36 [INFO]: Pre-Optimization Image Health State: [Healthy] 2019-08-06T15:46:45 [INFO]: Removing Appx Provisioned Package: Microsoft.BingWeather 2019-08-06T15:46:52 [INFO]: Removing Appx Provisioned Package: Microsoft.GetHelp 2019-08-06T15:46:58 [INFO]: Removing Appx Provisioned Package: Microsoft.Getstarted 2019-08-06T15:47:03 [INFO]: Removing Appx Provisioned Package: Microsoft.Messaging 2019-08-06T15:47:09 [INFO]: Removing Appx Provisioned Package: Microsoft.Microsoft3DViewer 2019-08-06T15:47:15 [INFO]: Removing Appx Provisioned Package: Microsoft.MicrosoftOfficeHub 2019-08-06T15:47:21 [INFO]: Removing Appx Provisioned Package: Microsoft.MicrosoftSolitaireCollection 2019-08-06T15:47:26 [INFO]: Removing Appx Provisioned Package: Microsoft.MicrosoftStickyNotes 2019-08-06T15:47:32 [INFO]: Removing Appx Provisioned Package: Microsoft.Office.OneNote 2019-08-06T15:47:39 [INFO]: Removing Appx Provisioned Package: Microsoft.OneConnect 2019-08-06T15:47:45 [INFO]: Removing Appx Provisioned Package: Microsoft.People 2019-08-06T15:47:50 [INFO]: Removing Appx Provisioned Package: Microsoft.Print3D 2019-08-06T15:47:56 [INFO]: Removing Appx Provisioned Package: Microsoft.ScreenSketch 2019-08-06T15:48:03 [INFO]: Removing Appx Provisioned Package: Microsoft.SkypeApp 2019-08-06T15:48:09 [INFO]: Removing Appx Provisioned Package: Microsoft.Wallet 2019-08-06T15:48:15 [INFO]: Removing Appx Provisioned Package: Microsoft.Windows.Photos 2019-08-06T15:48:21 [INFO]: Removing Appx Provisioned Package: Microsoft.WindowsAlarms 2019-08-06T15:48:27 [INFO]: Removing Appx Provisioned Package: Microsoft.WindowsCalculator 2019-08-06T15:48:33 [INFO]: Removing Appx Provisioned Package: Microsoft.WindowsCamera 2019-08-06T15:48:39 [INFO]: Removing Appx Provisioned Package: microsoft.windowscommunicationsapps 2019-08-06T15:48:46 [INFO]: Removing Appx Provisioned Package: Microsoft.WindowsFeedbackHub 2019-08-06T15:48:52 [INFO]: Removing Appx Provisioned Package: Microsoft.WindowsMaps 2019-08-06T15:48:58 [INFO]: Removing Appx Provisioned Package: Microsoft.WindowsSoundRecorder 2019-08-06T15:49:04 [INFO]: Removing Appx Provisioned Package: Microsoft.Xbox.TCUI 2019-08-06T15:49:09 [INFO]: Removing Appx Provisioned Package: Microsoft.XboxApp 2019-08-06T15:49:15 [INFO]: Removing Appx Provisioned Package: Microsoft.XboxGameOverlay 2019-08-06T15:49:20 [INFO]: Removing Appx Provisioned Package: Microsoft.XboxGamingOverlay 2019-08-06T15:49:26 [INFO]: Removing Appx Provisioned Package: Microsoft.XboxIdentityProvider 2019-08-06T15:49:32 [INFO]: Removing Appx Provisioned Package: Microsoft.XboxSpeechToTextOverlay 2019-08-06T15:49:37 [INFO]: Removing Appx Provisioned Package: Microsoft.YourPhone 2019-08-06T15:49:44 [INFO]: Removing Appx Provisioned Package: Microsoft.ZuneMusic 2019-08-06T15:49:49 [INFO]: Removing Appx Provisioned Package: Microsoft.ZuneVideo 2019-08-06T15:50:04 [INFO]: Importing Custom App Associations. 2019-08-06T15:51:15 [INFO]: Removing System Application: Microsoft.BioEnrollment 2019-08-06T15:51:18 [INFO]: Removing System Application: Microsoft.MicrosoftEdgeDevToolsClient 2019-08-06T15:51:21 [INFO]: Removing System Application: Microsoft.MicrosoftEdge 2019-08-06T15:51:24 [INFO]: Removing System Application: Microsoft.PPIProjection 2019-08-06T15:51:27 [INFO]: Removing System Application: Microsoft.Windows.AssignedAccessLockApp 2019-08-06T15:51:30 [INFO]: Removing System Application: Microsoft.Windows.Cortana 2019-08-06T15:51:33 [INFO]: Removing System Application: Microsoft.Windows.NarratorQuickStart 2019-08-06T15:51:36 [INFO]: Removing System Application: Microsoft.Windows.PeopleExperienceHost 2019-08-06T15:51:39 [INFO]: Removing System Application: Microsoft.Windows.SecHealthUI 2019-08-06T15:51:42 [INFO]: Removing System Application: Microsoft.Windows.SecureAssessmentBrowser 2019-08-06T15:52:13 [INFO]: Removing Windows Capability Package: App.Support.QuickAssist 2019-08-06T15:52:35 [INFO]: Removing Windows Capability Package: Hello.Face.18330 2019-08-06T15:52:53 [INFO]: Removing Windows Capability Package: Hello.Face.Migration.18330 2019-08-06T15:53:18 [INFO]: Disabling Windows Defender Services, Drivers and SmartScreen Integration. 2019-08-06T15:53:34 [INFO]: Disabling Windows Feature: Windows-Defender-Default-Definitions 2019-08-06T15:53:52 [INFO]: Disabling Xbox Services and Drivers. 2019-08-06T15:54:35 [INFO]: Applying Optimizations to the Offline Registry Hives. 2019-08-06T15:54:54 [INFO]: Applying Setup Content to the Image. 2019-08-06T15:54:57 [INFO]: Applying System Logo to the Image. 2019-08-06T15:55:00 [INFO]: Applying Registry Templates to the Image. 2019-08-06T15:55:14 [INFO]: Cleaning-up the Start Menu Layout. 2019-08-06T15:55:22 [INFO]: Post-Optimization Image Health State: [Healthy] 2019-08-06T15:55:25 [INFO]: Saving and Dismounting Windows 10 Pro 2019-08-06T15:59:40 [INFO]: Exporting Windows 10 Pro using Maximum compression. 2019-08-06T16:03:11 [INFO]: Optimizing the Windows Media File Structure. 2019-08-06T16:21:11 [INFO]: Creating a Bootable Windows Installation Media ISO. 2019-08-06T16:23:26 [INFO]: Finalizing Optimizations. 2019-08-06T16:23:31 [INFO]: Optimize-Offline completed in [40] minutes with [0] errors.


Optimizations finalized on [08/06/2019 at 04:23:31 PM]


WimFileInfo.txt Name : Windows 10 Pro Description : Windows 10 Pro Size : 13 GB Edition : Professional Version : 10.0.18362.30 Build : 18362 SPBuild : 30 SPLevel : 0 InstallationType : Client DirectoryCount : 18867 FileCount : 88688 Created : 4/2/2019 1:11:29 AM Modified : 4/2/2019 1:47:29 AM Language : en-US Architecture : amd64

Alexusson commented 4 years ago

Independent whether I use .wim or .ISO file I cannot get content of Additional Setup folder to be integrated/applied. There is no script folder in C:\Windows\Setup\ I still see OneDrive in Task Manager! The same situation is with the Logo folder and .bmp files (120x120). There is no logo in System. I did not experiment with the Wallpapers but the RegistryTemplates are integrated successfully. Switches are set to TRUE for relevant folders in Configure.ini file (attached below)

One more question: Is it possible to add a folder/files to other locations, for example, to Desktop or Documents except to C:Windows\Setup\Scripts or C:Windows\Wallpaper?

Config.ini [Additional] Drivers = False RegistryTemplates = True Setup = True SystemLogo = True Unattend = False Wallpaper = False NetFx3 = False

DrEmpiricism commented 4 years ago

As for your first question - I do not use VirtualBox, but the ISO creation processes uses the default efisys.bin boot code located in the ISO media at 'efi\Microsoft\boot\efisys.bin' to make the ISO bootable, so this file must exist in the ISO media for a new bootable ISO to be created. However, had the efisys.bin not been located by the process to create the ISO, it would have returned an error. Moreover, I have not encountered any errors booting in Hyper-V on either my workstation, server or over my network but I am not familiar with VirtualBox but I am assuming it should also have no issues.

As far as your second question - the script does not remove OneDrive and instead includes the Remove-OneDrive.ps1 script for the administrator to run if they want to fully remove OneDrive. No default scripts in 'Additional\Setup' are applied automatically.

Your script is returning an error count of '0', so no errors are occurring when trying to copy content from the 'Additional directory so there's not a whole lot for me to go on as to why this content is not being copied without looking directly at your files.

DrEmpiricism commented 4 years ago

I ran this again using the same settings you did and booted a Hyper-V VM with it and content copied fine and the media was set as bootable:

ISO_Bootable

The only way I could get a boot error is if I did not press a key to boot from the ISO:

Boot_Screen

Boot_Error

However, it did boot fine when I did:

Boot_Success

Alexusson commented 4 years ago

I believe you and know that is something on my end! I just tried and finished with LTSC right now! efisys.bin is located in the ISO media at 'efi\Microsoft\boot\efisys.bin' as you said but I am still getting [img]https://i.imgur.com/b8wQ3IL.png[/img]

You give me one useful information: "no default scripts in 'Additional\Setup' are applied automatically" Now I can try to change that but still do not get it what is wrong with .bmp logo image. No integration... Reg files are integrated which is good.

I just want to master your tool and give you some useful feedback. I hope I doing right? Your tool is a real gem... I like it more and more each time I use it...

DrEmpiricism commented 4 years ago

I updated the script and functions just a minute ago.

The script does not check the dimensions of the .bmp and will copy over any sized .bmp; however, Windows will scale any .bmp over the default 120x120 dimensions requirement down to 120x120 when it's used as a system logo.

If registry templates are being applied properly then it is detecting the content in that directory just fine. When it copies wallpaper, it checks for full directories and then it checks for individual files in the following formats: .jpg, .png, .bmp and .gif so make sure the wallpaper is not in a different format else it will not be copied.

The script does not force copy content to the image to prevent the accidental overwriting of potential manufacturer content in these locations.

If you have a program like PowerISO, you can double-click the ISO and check its information and it will tell you if it contains a boot-code or not (just like my first picture above).

When you boot this in VirtualBox, does it give you the "Press any key to boot from CD or DVD..." screen?

Alexusson commented 4 years ago

VirtualBox: No, it gives me nothing. The first note is that fatal message from above! Wallpapers: I always using .jpg or .png for Wallpapers, I will try today to integrate them with your new codes. Never tried before to integrate wallpapers

I am using PowerISO and with them, I found efisys.bin at 'efi\Microsoft\boot\efisys.bin' yesterday. It is there. [img]https://i.imgur.com/X6OAewy.png[/img] I will report you after I try new version 3.2.6.5!

DrEmpiricism commented 4 years ago

You clearly are not reading what I am typing. I said use PowerISO to check the properties of the ISO and it will tell you if it's bootable, just like the first picture I posted shows. I did not say use PowerISO to see if the efisys.bin file is present, because again, had it not been found the efisys.bin it would have returned an error.

Alexusson commented 4 years ago

After extensive online research and so many given suggestions, I could not succeed to find the right solution for fatal error from a few days ago. However, when I "Enabled EFI (special OSes only)" option inside the VirtualBox (System tab) boot suddenly become available and installation went smooth. That is strange for me because I never need to use that before. A lot of people online experienced the same effect as I without any clue why that happens (with .wim files I do not have the problem). Before I figure this, I installed VMWare Workstation and yes the boot start immediately without any issue. So the problem was/is with the VB which I use because of the possibility to save as .vhd file and save my time. And, yes all ISO from the day before yesterday conversation was bootable (verified by PowerISO). Sorry, that was my bad. The boot and installation procedure works fine now.

REPORT: All content from RegistryTemplate and Logo folders are integrated successfully. After I made little changes, all scripts (.cmd, .bat, .ps1) are successfully integrated too. I even go further and integrated/preinstalled files/apps to another location like My Documents, Desktop, System32, etc... However, one small "issue" occurs during the integration of Wallpaper (log attached below), but did integrates all images successfully. I think some minor correction in code could fix that (if needed).

As I mentioned a couple of time already, this tool is a real gem, and everyone who cares about removing bloatware should use it. Speed, flexibility and gentle touch of trimming procedure are just some of the advantage this tool has. I wish you all the best Doctor you are indeed prolonged God's hand. ;)

Unfortunately, I could not succeed to trim and get stable LTSC, but this is not the tool problem, I guess??? It is the build problem which will stay to be a tricky quest for further time!

ErrorRecord.log I know the folder Windows exists, but I wanted to integrate wallpapers there so I could have a slideshow along with the default Windows image (img0).

Copy-Item : An item with the specified name C:\Optimize-Offline-master\OptimizeOfflineTemp_771279517\MountInstallOffline\Windows\Web\Wallpaper\Windows already exists. At C:\Optimize-Offline-master\Optimize-Offline.ps1:1646 char:100