Grub MBR edit?

Barra

New Member
#1
Hi folks, new to the forum and recently new to EasyBCD. I am currently undertaking a very large project, for me anyways. My goal is to be able to put a windows image on a partition, have a bootloader (currently using EasyBCD 2.0) in a third partition with various scripts and WinRE ISO, and the main OS partition. Thus 3 total partitions.

Then using RSync, the image partition will be checked against a network image. Network image is newer, it is downloaded.

At end of a certain period of time, the machine will then automatically run a script to reboot the machine to the Recovery ISO (WinRE). Attempting an unattended file to run Restore from Image/install it to system OS partition.

So far, I've been chugging along with a lot of trial and error to get as far as I have. So far, I have:

1. EasyBCD Boot options created on startup for Windows 7 Enterprise and Recovery ISO (WinRE). Using bcdedit /bootsequence {ID} to target Recovery ISO on reboot.

2. The image of the machine for testing purposes is in place in the ImagePartition.
The partition with WinRE and scripts is in place as ImageHandler.
The OS is of course, at C: in its own seperate partition.

Where I'm getting stuck currently is trying to find out how to edit the neosmart grub loader, which is telling the ISO of Windows Recovery to be used. I want it to STOP asking me to press any key to boot from the ISO.

Big goal, but I'm making a lot of head way. Any help or suggestions on getting that NST\AutoNeoGrub0.mbr edited to remove Press any key to Boot From CD/DVD in my approach would be GREATLY appreciated.
 

mqudsi

Mostly Harmless
Staff member
#2
Hi,

You're going about it the wrong way. That message is not from EasyBCD or GRUB, it's from the ISO itself - Microsoft hard-coded that message into their RE CDs.

The solution is easy enough though! Instead of adding an *ISO* entry for the RE, add a WinPE 2.0 entry instead. Just extract the contents of the ISO to the partition, and using EasyBCD | Add Entry | WinPE, browse to the .WIM file and add the entry that way instead. That should let you boot into the RE directly without any message :smile:

Let us know how this goes, sounds like a very interesting project! Good luck.
 

Barra

New Member
#3
Thank you

Thanks,

I had a feeling I was close but not quite right on what method to use. That did the trick, and now the system auto boots to the WinRE directory on startup.

Now all that is left is the unattended setup to make Windows use the Recovery Disk and target the local image.

Shouldn't be hard, just have to learn how to use Windows AIK. :huh:

At least, this has been a valuable learning experience.
 

mqudsi

Mostly Harmless
Staff member
#4
Awesome... Keep us posted :smile:
 
#5
Status update on my findings.

Converting the Windows Automated Install Kit to function as if an Extracted Install CD is actually a partition, is what I suspect is my current limitation.

The error is: The boot selection failed bceause a required device is inaccessible.
This is immediately after the Windows is loading files (Black and White) screen with the progress bar.

As a standard DVD install method, the WAIK AutoUnattend.xml file is working. However, not with the Recovery Disk, nor with either media set as a partition space. As of yet, I'm still mindlessly walking through the automated process part as a complete newbie to the experience.

Bypassed runas /user:Administrator /savecred I:/Restore.bat shutdown /r, limitation by setting up a task event which actually does save the administrator credentials every time the task runs.
The Restore.bat file handles the bcdedit /bootsequence commands that target the ImageHandler partition.

So far many, many aggravations, but I'm hoping to get a viable stand alone self imaging machine working relatively soon.
 
#7
Time for a "DARN YOU MICROSOFT!" moment. The command that would actually do everything I want is wbadmin.

However, the recovery support is ONLY built into Windows 2008 server. Thanks a lot Microsoft. NTBackup replacement my butt. Doesn't work like NTBackup, doesn't provide the functionality of NTBackup, and doesn't do nearly the amount we need it to do on the station side of things. Whoop de freaking do.

Sorry, just needed to vent / rant.
 

mqudsi

Mostly Harmless
Staff member
#8
Oh, you're more than free to rant whenever you like. I experience moments like this on an hourly basis myself :wink:
 
#9
Well, major tweaks and direction advance toward completion of the project.

1. Easy BCD made it much easier to setup the Boot targets, as well as create the custom list of what was needed and when. Still needed the BCDedit /bootsequence command as a batch file for the scheduled restarts to the ImageHandler partition.

2. Several Batch files in for automation we can see the light at the end of the tunnel. Now we are set on using ImageX as part of the WinPE environment, and automating the commands to be used via said batch files. Wonderful thing about the WinPE environment, it uses StartNet.cmd as if it was an AutoExec.bat file. Editing this file to create Call Command.bat lines made the steps work in sequence as needed.

3. Learning the image mount procedures for .wim files has been most interesting as it creates various situations of use built into the Microsoft Image Deployment method. However, since we are avoiding use of servers we had to configure things as mentioned in step 2.

Well, thats the update. Scheduled task for Restore.bat, to force a restart to ImageHandler partition which holds the contents of a custom automated WinPE. This grabs the Win7.wim file and applies it to the OS partition from WinBackup partition. While this seem s a bit over the top having three HDD partitions, it actually makes things much easier to navigate. Next steps will be creating a task scheduler event to verify the WinBackup partition actually stores the latest .wim backup file, xcopy command with a date check comparison in another batch file should work. Setting this up only to run with the machine on idle, should take care of not overloading bandwidth requirements.

Since hardware fails and network bandwidth is limited, it doesn't make sense to network image 40 something machines at once, even over night. Doing it this way makes the machine entirely stand alone so it can image C: (OS) from F: (WinBackup).