New Friend (or an Old Friend who Built a New Account)
Registered: 1463601762 Posts: 11
Reply with quote #16
I could eliminate WinPE being in the reboot loop as the supervisor code if only the grub2 bootloader I use had the ability to copy files. grub2 does provide conditional tests and various other scripting, but unfortunately no native support to move or copy files.
There is a grub module that implements the lua programing language, but it isn't part of the mainstream grub2 distribution. It's difficult to obtain information about. What I found was out of date and didn't work for me. I located a PPA for grub2 which includes the lua module but zero documentation on how to use that package. If I the grub lua extension integrated well with grub such that I could execute a script to moves files around prior to booting Windows, I could copy the appropriate BCD and snapshot files into place before each boot, thereby starting Windows from its rolled back state with no second reboot required. For my dual boot library systems a lua extension for grub2 would be perfect. Hopefully at some point I can find a good source for the grub lua module and when I do I'll use it to eliminate on of the reboots the WinPE scheme requires and speed up the reboot cycle. __________________ Find a way to surround yourself with those you aspire to be like. Avoid those who are contrary to your own moral code. Embrace Love, reject Fear and always stay grounded in empirical reality.
Still Checking the Forum Out
Registered: 1475370212 Posts: 1
Reply with quote #17
I am not sure if anyone is still looking for a solution to automate the rollback process on every reboot but I have been using the following solution in a library that I support for almost three years now. It does take about 5 mins's to setup on each machine but once setup it works brilliantly. Deploy your VHD and get your computer all ready for public use. Once you are ready login to windows as an Administrator account and go to system properties. From hear go to advanced system settings. On this page there is option for settings under startup and repair and then from this page you can choose the default boot option. Change it to roll back and then apply. Open a CMD window with elevated permissions and type the following: bcdedit /export D:\rollback This will export the boot options with the default set as rollback. Now go and change the default boot option back to windows 7 and perform the same command in CMD only this time call the export windows 7 e.g: bcdedit /export D:\windows7 Now that we have the boot config files all we need to do is important them at the correct times. I use a method mentioned on this topic already GPEDIT (I have this part as part of my original VHD image) on the local machine to run a script on shutdown that imports the boot config. It's a one line script: bcdedit /import D:\rollback and just like that when the computer reboots or turns back on the default option is set to rollback. Now we need to get the WinPE environment to do the same. Boot back into windows 7 and open up Disk Manager. Assign a drive letter or a mount point for the system reserved drive and then navigate your way to the SDRstate folder (I might have the name wrong on that but I am sure you get the idea) on that now mounted drive. Open up the rollback batch file (I add the line to both the merge and the rollback batch files but it only need's to be done on the rollback file) and at the very top of the file add the following line: bcdedit /import C:\windows7 C is off cause the physical drive in the WinPE environment. Now when the roll back is complete the default boot option will be Windows 7. Don't forget to remove the drive mount when you have saved the batch file. I hope this help's someone out there and if you have any questions or I have not explained something well enough please send me a message and I will be more then happy to help.
Hacked Mark's Facebook Account
Registered: 1451567414 Posts: 261
Reply with quote #18
WinRE is just WinPE with some cabs added.
I had the same trouble with GUIDs IIRC. That's why I ended up so often just blowing up the BCD and rebuilding from scratch. When you say, "load DOS," what are you referring to? Your approach looks great -- thanks for extending SS. I hope it ends up fixing your problem. __________________ May I ask that everyone please populate the first name and last name in your user account profile. Thanks!
Still Checking the Forum Out
Registered: 1483210740 Posts: 1
Reply with quote #19
The Microsoft Enhanced Write Filter does exactly what your original post required.
It loads as a boot driver, (~75kb) typically after disk.sys and seamlessly traps ALL MODIFICATIONS to the filtered partition. If a partition isn't adulterated, then it will forever remain in state. Filtering your %systemdrive% ( C:\ ) and leaving it in that state, essentially provides you a worry free, guaranteed booting system to the level of reliability when you installed filtering. Frequently called "Kiosk Computing", a system impervious to damage that can be entrusted to remain reliable in a public free use scenario, it is one of the greatest features of Microsoft Windows you've never heard of because it is the most unique feature that borrows the best of common technologies without imitating an actual firewall, nor antivirus. Additional benefits are less apparent but we've realized across numerous client sites and our own systems such as tremendously boosted drive performance since the system writes to an allocated DDR block of RAM instead of the drive I/O controller. Every benchmark rates at least a 300% to 600% system boost regarding writes. SSD longevity is a reality if the cells remain unused while the system gains from the improved boot and read features of SSDs. Nothing is free in Waterworld, since you're seamlessly allocating RAM in lieu of drive space, your system's uptime won't extend for a week if you don't like rebooting. When the system has run out of RAM due to accumulated drive writes, it will slow down measurably ESPECIALLY when writing to the guarded drive. A personal computer user would be well served to relocate their special directories to a second conventional partition and or USB since all modifications are flushed afterwards. Our own systems have relocated the event logs, browser favorites to a separate "D" partition that can be created lately with just Windows Disk Manager diskmgmt.msc by splitting the current C: drive before EWF'ng it and saving important data and logs to a traditional writeable drive. The documentation around EWF is sparse, used widely by Windows Embedded resellers, it hasn't been extensively dissected by an industry accustomed to installing features similar to installing soda machines and with no incentive to deconstructing an embedded Windows appliance since the vending industry customarily prohibits it / it is a sector of the Windows OEM's that culturally isn't as curious as Windows developers and engineers of traditional Windows networks. It is installed as a service, we use the included sc.exe and I'm appending the lines of the shell script shortly.