Mark Minasi's Tech Forum
Register Calendar Latest Topics Chat
 
 
 


Reply
  Author   Comment   Page 1 of 2      1   2   Next
Ken Demer

Still Checking the Forum Out
Registered:
Posts: 6
Reply with quote  #1 
Hi all,

SS works great!I was wondering if this scenario is possible: 

1. Every time computer starts or reboots, SS automatically initiates a rollback
2. After the rollback, computer starts up the rolled back Windows

Thank you for your support!

Ken

0
Ken Demer

Still Checking the Forum Out
Registered:
Posts: 6
Reply with quote  #2 
If anyone has an idea how to implement an automated rollback I would greatly appreciate it!

Thank you!

Ken
0
donoli

Senior Member
Registered:
Posts: 505
Reply with quote  #3 
http://www.msfn.org/board/topic/171608-opinion-on-windows-steadystate-and-other-roll-back-tools/

It's an old link but it might be what you want. Scroll down to where is says 

Features
0
Ken Demer

Still Checking the Forum Out
Registered:
Posts: 6
Reply with quote  #4 
Thank you donoli for your response.

I took a look at the link and it appears to be related to Microsoft's Steady State. I have a Windows 7 system, that's why I'm using the new "Steadier State" solution. I'm hoping that there is a way to get Steadier State to do the same thing that Microsoft's Steady State did in the "Discard mode" (the cache is cleared upon every reboot, thus returning the system to its previous state).

If anyone has an idea or knows a solution I will greatly appreciate your feedback.

Thank you!

Ken
0
Mafervus

Grumpy Old Men
Registered:
Posts: 31
Reply with quote  #5 
faronics deep freeze comes to mind
__________________
The problem with troubleshooting is that trouble shoots back. ~Author Unknown
0
gjcooper

Still Checking the Forum Out
Registered:
Posts: 3
Reply with quote  #6 
2 ways I've done it in the past. (both require server)
1. Boot from server image each time without updating the image.
2. Ghost the machine on startup.

__________________
People make mistakes, but to really stuff things up...you need a computer
0
Ken Demer

Still Checking the Forum Out
Registered:
Posts: 6
Reply with quote  #7 
Thank you Mafervus and gjcooper for your responses.

Ken
0
Mark Minasi

Avatar / Picture

Humble Proprietor
Registered:
Posts: 175
Reply with quote  #8 
Quote:
Originally Posted by Ken Demer
Thank you donoli for your response.

I took a look at the link and it appears to be related to Microsoft's Steady State. I have a Windows 7 system, that's why I'm using the new "Steadier State" solution. I'm hoping that there is a way to get Steadier State to do the same thing that Microsoft's Steady State did in the "Discard mode" (the cache is cleared upon every reboot, thus returning the system to its previous state).

If anyone has an idea or knows a solution I will greatly appreciate your feedback.

Thank you!

Ken

Ken, let me understand -- you want Steadier State to rollback by default on every reboot?

That wouldn't be hard.  Just modify the startnet.cmd to look for a file with some magic name.  If the name's there, force a rollback and reboot.
0
Ken Demer

Still Checking the Forum Out
Registered:
Posts: 6
Reply with quote  #9 
Thank you Mark. If I modify the startnet.cmd to look for, let's say, xyz.txt, would it look for that also after I forced the rollback and reboot? I want to make sure I'm not creating an infinite rollback loop.

my modification would look like this:

REM this goes in the line before invoking WinPE - goto :showshell (so that I can still merge using the noauto.txt)

if exists d:\xyz.txt goto :rollback

:rollback
call rollback.cmd
exit
goto :eof


Thank you for your help!

Ken
0
Mark

Hacked Mark's Facebook Account
Registered:
Posts: 273
Reply with quote  #10 
Hi Ken --

That looks roughly like how it'd work.  Apologies, I'd have to sit down with big pieces of paper to sketch it all out. [smile]

Thanks!

__________________
May I ask that everyone please populate the first name and last name in your user account profile.  Thanks!
0
Ken Demer

Still Checking the Forum Out
Registered:
Posts: 6
Reply with quote  #11 
Thank you Mark.

I now have a modified version of startnethd.cmd

I tried to put it in the X: drive after selecting rollback with the noauto.txt in place

For some reason none of the changes seem to be executed.

Where is the startnethd.cmd file located that gets executed when you select rollback?

Thank you for your help!

Ken
0
Mark

Hacked Mark's Facebook Account
Registered:
Posts: 273
Reply with quote  #12 
Hi Ken --

I haven't looked at it for a bit, sorry, but basically IIRC when you create a Steadier State PC, the batch file
  • Wipes the C: drive
  • Creates a small partition and installs a copy of WinPE on it containing two *.cmd files
  • Copies one of them to startnet.cmd (it's a magic name, like autoexec.bat, and gets automatically run at WinPE startup)
  • Formats the rest of the drive to a big data drive
  • Copies the big VHD file to the big data drive
  • Creates two bootloader options -- "run Win 7," which directly boots the big VHD, or "roll back," which boots the WinPE partition.  Booting the WinPE partition kicks off the delete-the-child-vhd part and restarts the computer.  There's a 

I'm able to modify the contents of the on-hard-disk copy of WinPE, and you can see the commands in "Step Five" in PrepNewPC.cmd... see if that helps.


__________________
May I ask that everyone please populate the first name and last name in your user account profile.  Thanks!
0
lady_mcse

Avatar / Picture

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 83
Reply with quote  #13 
Quote:
Originally Posted by Mafervus
faronics deep freeze comes to mind


^^ agreed, I thought of it too ... it's an absolute necessity in an environment like schools, prisons, and for seniors with dementia ^^
0
tagert-galt

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 11
Reply with quote  #14 
Yes, this is the same issue I am trying to resolve, how to get SS to run a "rolled back" version on every reboot, unless noauto.txt is found.

I don't believe SS is designed to do that "out of the box", despite the logic in startnet related to the :automatic label. I haven't explored this in great depth yet, but the only way I can see this working is to create a script to be executed on system shutdown (within Windows 7 running from vhd) that changes the default boot from the current "Windows 7" (snapshot.vhd) back to WinPE.

When WinPE runs after rebooting it will do an automatic rollback if both vhd files are present AND noauto.txt is NOT present. Rollback deletes then recreates the snapshot.vhd differencing file and changes the default boot option back to snapshot.vhd, so the next reboot will be from the baseline (rolled back) version of the OS running on the virtual file system.

The system shutdown script cannot execute rollback.cmd directly, because snapshot.vhd will be in use and cannot be deleted. That's why WinPE is necessary and why an additional reboot cycle is required.

Wioski eliminated the need for WinPE using some clever magic in an unattend.xml file he applies when his sysprepped Wim is installed onto the VHD using setup.exe. He also makes use of the "Microsoft Deployment Toolkit". I am not very familiar with using MDT or unattend.xml files, but I can see the bcdedit commands (in wioski's unattend_x64_7.xml file) which is in the "Microsoft-Windows-Deployment" section under "specialize". Further, he includes a section of the "oobeSystem" to alter the boot parameters.

I had no luck using wioski for customized WIM files. Setup.exe always errors out and fails to complete, providing cryptic errors that don't help. Sysprepping that image also produces errors, but I found a workaround (msoobe.exe) for that. I can get wioski to work if I use the standard install.wim from the official Microsoft Windows 7 DVD, but none that I have customized. By "customized" I don't mean anything special or fancy, just the installation of standard programs, accounts and files. The WIM image I am trying to use with wioski is between 9 and 10GB. If it weren't for that, the wioski approach provides for faster rollback performance and is a cleaner design IMO.

As a tutorial and instructional aid, SS is superior to wioski. What Mark has done with SS is very generous and valuable and we all should be very grateful he has published SS.

__________________
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.
0
tagert-galt

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 11
Reply with quote  #15 
I figured out a way to have every reboot be a rolled back version of the OS. It's pretty much as I described in my earlier post.

I created a script (and put it in place with gpedit.msc) that runs When Windows 7 is shutdown which does nothing more than change the default boot entry to be WinPE. When the system restarts, WinPE sees that image.vhd and snapshot.vhd are present so it just calls rollback (i.e. the :automatic label) which recreates the snapshot, changes the default boot to Windows 7 and exits.

I could not find a way to programmatically obtain the guids for each boot item, which is a required parameter to the bcdedit /default command. bcdedit is definitely a PITA to work with. Why the hell M$ provides a /set command but no /get parameter is totally ridiculous IMO. If you have 2 boot entries how can you obtain the guid for a specific boot entry? I couldn't figure out how to do that and I couldn't find anyone else that described how to do it after more than an hour of searching online.

Instead I just dumped the entire BCD, copied the guids for the WinPE and Windows 7 boot entries as constants in the Windows 7 shutdown and rollback scripts. I don't assign a drive letter to the System Reserved partition, but I do have it mounted in a restricted folder under the Windows 7 C: virtual drive. It's restricted so that the Patron account can't access or even list the folder it's mounted in.

The Windows 7 shutdown script is nothing more than:

Code:

REM System Shutdown Script will change the default boot option back to WinPE which will
REM   do an automatic rollback and reset the default OS back to Windows 7 VHD.
REM OS Shutdown script lives here: C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown
REM
REM set boot7={76c86810-5b98-1a28-1710-c415640d8851}
REM set bootPE={f6c84810-2b98-1ae8-1911-d485640d8851}
REM Change default boot entry to WinPE
C:\windows\System32\bcdedit /store C:\Downloads\ssDrive\boot\BcD /default %bootPE%


Don't know if the WinPE startnet script can be terminated to gain access to the WinPE command prompt or not. I kindof don't think you can, b/c as soon as you terminate the startnet script WinPE reboots.

As for a lighter weight "supervisor" than WinPE how does this approach sound:

1) After getting SS installed and working with WinPE as currently designed, and after you have tweaked image.vhd to be as you want it, dump the bcd and obtain the guids for each boot entry.

2) Instead of WinPE (or better, in addition to WinPE) you boot into DOS, which does nothing more than delete snapshot.vhd and copies a saved version of it into place. It could do the same with the entire BCD file to switch the boot between "Supervisor" and "Windows 7"; No need to run diskpart on every boot to generate a "blank" new version. Just save a copy right after diskpart generates it. Doing the rollback is under a DOS supervisor would simply be a matter of checking for the existence of noauto.txt, image.vhd and snapshot.vhd and copying the correct files into place and then doing a reboot. Using DOS as a supervisor to evaluate what to boot and to toggle the boot code reduces the boot time and overhead for rollback, though it does NOT eliminate the need for 2 reboots. It's just much faster to load DOS than WinPE for the rollback use case. WinPE is still required to perform updates, merges and other maintenance.

Also, does anybody know if the WinRE (repair environment) is faster to boot than WinPE? Would that make a better "supervisor" than WinPE?





__________________
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.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.