Welcome, Guest. Please Login
 
  HomeHelpSearchLogin FAQ Radified Ghost.Classic Ghost.New Bootable CD Blog  
 
Pages: 1 2 3 4 5 
Send Topic Print
Unattended image restore (Read 94355 times)
NightOwl
Radministrator
*****
Offline


"I tought I saw a puddy
tat..."

Posts: 5826
Olympia, WA--Puget Sound--USA


Back to top
Re: Unattended image restore
Reply #45 - Mar 1st, 2008 at 9:17am
 
Brian

Quote:
bootndos 2 performs the reboot to the restored WinXP partition

I assume *bootndos* must come with the *Image for DOS* program.  

Interesting command line!

Here's my most recent *automated* files I created for a friend:

[config.sys]

Quote:
[menu]

menuitem=auto, Automatic Ghost Backup of Primary HDD
menuitem=ghost, Run Ghost Interactively (Manually)
submenu=dos_prompt, DOS Prompt Only--Select the DOS Configuration of Choice
menuitem=bkup_usb, Backup the Primary HDD to an External USB HDD
menuitem=restore, Restore the Most Recent Backup of the WinXP OS Partition
menuitem=bootxp, Re-Boot to Windows Now!

menudefault=auto,30
menucolor=15,1

[common]

[auto]

lastdrive=z

[ghost]

device=oakcdrom.sys /d:nightowl
lastdrive=z

[dos_prompt]

menuitem=basic, Basic DOS--No Memory Managers Will Be Loaded
menuitem=himem, DOS + Himem.sys Loaded--Some Systems Require Himem.sys
menuitem=emm386, DOS + Himem.sys + Emm386.exe Loaded
submenu=usb_support, Add USB Support to the above DOS Configurations
submenu=menu, Return to the Main Menu

[basic]

device=oakcdrom.sys /d:nightowl
lastdrive=z

[himem]

device=himem.sys
dos=high
device=oakcdrom.sys /d:nightowl
lastdrive=z

[emm386]

device=himem.sys
device=emm386.exe Ram
dos=high,umb
devicehigh=oakcdrom.sys /d:nightowl
lastdrive=z

[usb_support]

menuitem=usb_basic, Basic DOS, No Mem Mgrs + DOS USB Support
menuitem=usb_himem, DOS + Himem.sys + DOS USB Support
menuitem=usb_emm386, DOS + Himem.sys + Emm386.exe + DOS USB Support
submenu=dos_prompt, Return to Previous Menu

[usb_basic]

device=oakcdrom.sys /d:nightowl
device=usbaspi.sys /v
device=di1000dd.sys /dU
lastdrive=z

[usb_himem]

device=himem.sys
dos=high
device=oakcdrom.sys /d:nightowl
device=usbaspi.sys /v
device=di1000dd.sys /dU
lastdrive=z

[usb_emm386]

device=himem.sys
device=emm386.exe Ram
dos=high,umb
devicehigh=oakcdrom.sys /d:nightowl
devicehigh=usbaspi.sys /v
devicehigh=di1000dd.sys /dU
lastdrive=z

[bkup_usb]

device=himem.sys
dos=high
device=oakcdrom.sys /d:nightowl
device=usbaspi.sys /v
device=di1000dd.sys /dU
lastdrive=z


[restore]

[bootxp]


[autoexec.bat]

Quote:
@echo off
cls
SET TZ=GHO+08:00
set path=c:\

goto %config%

:auto

if exist g:\bkup3\nul deltree /y g:\bkup3
if exist g:\bkup2\nul move g:\bkup2 g:\bkup3
if exist g:\bkup1\nul move g:\bkup1 g:\bkup2
if not exist g:\bkup1\nul md g:\bkup1
c:\ghost.exe -script=c:\script1.txt -z
if errorlevel 1 goto Problem
goto bootxp

:Problem

echo.
echo There has been an error reported by Ghost.
echo Contact your local, friendly support person!
echo.
pause
goto bootxp

:ghost

MOUSE.COM
mscdex.exe /d:nightowl /l:x /m:16
c:\ghost.exe
goto end

:basic

MOUSE.COM
mscdex.exe /d:nightowl /l:x /m:16
goto end

:himem

MOUSE.COM
mscdex.exe /d:nightowl /l:x /m:16
goto end

:emm386

loadhigh c:\MOUSE.COM
loadhigh c:\mscdex.exe /d:nightowl /l:x /m:16 /v
goto end

:usb_basic

MOUSE.COM
mscdex.exe /d:nightowl /l:x /m:16 /v
goto end

:usb_himem

MOUSE.COM
mscdex.exe /d:nightowl /l:x /m:16
goto end

:usb_emm386

loadhigh c:\MOUSE.COM
loadhigh c:\mscdex.exe /d:nightowl /l:x /m:16
goto end

:bkup_usb

if exist u:\bkup3\nul deltree /y u:\bkup3
if exist u:\bkup2\nul move u:\bkup2 u:\bkup3
if exist u:\bkup1\nul move u:\bkup1 u:\bkup2
if not exist u:\bkup1\nul md u:\bkup1
mscdex.exe /d:nightowl /l:x /m:16
c:\ghost.exe -script=c:\script3.txt -z
if not errorlevel 0 goto Problem
goto  usb_bootxp

:restore

echo.
echo This procedure will first backup your
echo current non-working WinXP OS Partition.
echo.
echo Then it will verify that image.
echo.
echo Then the most recent backup of your
echo WinXP OS Partition will be restored.
echo.
echo Then you will boot back to WinXP.
echo.
echo If you have previously used this function,
echo the previous bad OS backup will be deleted,
echo and be replaced by this new backup of the
echo current bad OS Partition.
echo.
echo Do you wish to continue?  A "No" response
echo will cause a reboot, and loading of the
echo first Main Menu.  You can then
echo choose to reboot to Windows or make other choices.
pause
choice /c:yn Do you wish to continue?
if errorlevel 2 goto reboot
if exist g:\bad_os\nul deltree /y g:\bad_os
if not exist g:\bad_os\nul md g:\bad_os
c:\ghost.exe -script=c:\script2.txt -z
if errorlevel 1 goto Problem
goto bootxp

:reboot

reboot.com

:bootxp

mbrwizd /hide=2
mbrwizd /inactive=2
mbrwizd /active=0
reboot.com

:usb_bootxp

pqboot.exe /p:1

:end


[script1.txt]

Quote:
-clone,mode=create,src=1,dst=g:\bkup1\dsk1.gho
-chkimg,g:\bkup1\dsk1.gho
-fx


[script2.txt]

Quote:
-clone,mode=pcreate,src=1:1,dst=g:\bad_os\bad.gho
-chkimg,g:\bad_os\bad.gho
-clone,mode=prestore,src=g:\bakup1\dsk1.gho:1,dst=1:1
-fx


[script3.txt]

Quote:
-clone,mode=create,src=1,dst=u:\bkup1\dsk1.gho
-chkimg,u:\bkup1\dsk1.gho
-fx


Using *script* files with Ghost allows multiple commands to be carried out by Ghost without having Ghost unload and then reload for each command in a batch file--which could be done also--just speeds things up a bit.
 

____________________________________________________________________________________________

No question is stupid ... but, possibly the answers are ;) !
 
IP Logged
 

Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #46 - Mar 1st, 2008 at 2:07pm
 
NightOwl, impressive. A work of art. It makes my couple of lines look puny.

Bootndos (and bootnow) are free downloads from TeraByte but BING has to be installed for anything to happen.

bootndos 2 makes BING boot the second item in the boot menu. (The Dell diagnostic partition is item 1 in my menu. WinXP is item 2)
 
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #47 - Mar 1st, 2008 at 11:54pm
 
NightOwl wrote on Mar 1st, 2008 at 12:28am:
I don't currently boot from a DOS partition on the HDD because I'm using my primary slots for test OSs.

Then BING is worth considering. You can have 5, 6 or even 200 primary partitions. I've been reluctant to accept unlimited primary partitions but I've tested it so many times that I'm now comfortable with the concept. But it took time.

When you set up a boot item in BING you have to choose which 4 primary partitions will take up the partition slots for that item and BING puts them into LBA-0 for that session. (The full primary partition information is stored in the EMBR). When you look in Disk Management, all partitions that aren't in the four slots show as unallocated space. It's ingenious. However, all partitioning must be done with BING when you have unlimited primaries enabled.
 
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #48 - Mar 5th, 2008 at 10:20pm
 
NightOwl,

This is exciting. You and I can run our DOS restores without a DOS partition on the computer. I'm just running my second IFD restore on my test computer after having deleted the DOS partition. The restore was started from a batch file.

It's done with TeraByte OS Deployment Tool Suite (Free for personal use).

http://www.terabyteunlimited.com/tbosdt.htm

Basically you create an "image" of your DOS partition and boot from this file.

Quote:
Example 1: Start with a partition already containing a bootable copy of DOS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In this example, it's assumed we already have a partition containing a
bootable copy of DOS. The goal is to copy the DOS partition to a file,
and then boot from that file using BOOTFILE. The steps below will list
and explain the TBOSDT and BOOTFILE commands required to accomplish this.

1. Use TBOSDT to copy the DOS partition into a file:

copy partition 0 0x1 d:\partcopy.bin /b

The command line above runs the "copy partition" function to copy the
partition with ID 0x1 on hard drive 0 into the file d:\partcopy.bin.
The /b option adds 1 sector to the file in preparation for using it with
the BOOTFILE utility. That extra sector is used by BOOTFILE to save the
original MBR when the file is booted from. Note that partition ID numbers
can be determined for a given hard drive by using the LIST HD command in
TBOSDT. Example: list hd 0

2. Use TBOSDT to mount the file created in step 1 as drive 0:

mount 0: d:\partcopy.bin

3. Use TBOSDT to copy the *DOS/TBOS* version of bootfile.exe to the
mounted file system:

copy file bootfile.exe 0:

4. Use TBOSDT to create or modify the autoexec.bat file:

set textline 0:\autoexec.bat "bootfile.exe" /b

In the above command, the SET TEXTLINE command is used to insert the line
"bootfile.exe" in the autoexec.bat file. That line is necessary in order
to restore the original MBR after the file is booted from - so that the
next reboot will boot the system normally again.

If autoexec.bat already exists, the command will add the quoted text as the
first line in the file. If autoexec.bat does not already exist, the command
will create the file, and then write the quoted text to it. If desired, the
SET TEXTLINE command can be used to add/delete other lines in autoexec.bat at
this time.

5. Be sure to EXIT from TBOSDT at this point so that drive 0: is unmounted.
Exiting TBOSDT automatically unmounts the drive.

6. Run the *Windows* version of BOOTFILE to boot the system from the file:

bootfile d:\partcopy.bin  (full path to partcopy.bin must be given)

The command above updates the MBR to boot from d:\partcopy.bin, and then
initiates a system reboot. Because of the way d:\partcopy.bin was updated
in steps 3 and 4, bootfile.exe and autoexec.bat will be in place, and booting
the file should be successful. On the next reboot, the system should boot
normally, the same as before.


Make sure partcopy.bin is created on the first HD so you have a first HD boot.
partcopy.bin can be edited with UltraISO etc if you need to change paths or batch files. Other TeraByte software isn't needed.
 
 
IP Logged
 
NightOwl
Radministrator
*****
Offline


"I tought I saw a puddy
tat..."

Posts: 5826
Olympia, WA--Puget Sound--USA


Back to top
Re: Unattended image restore
Reply #49 - Mar 6th, 2008 at 9:04am
 
Brain

Very interesting--so to make sure I'm following the above--this procedure creates a file that the boot sequence can read so as to create a *virtual boot partition* -- so no floppy boot disk or bootable CD/DVD--and when the system re-boots--you're back in your regular Windows partition.

Sounds like a similar solution that Ghost 2003 uses in its Windows interface.  

Does this procedure require that you leave an open Master Boot Partition primary slot, unused and free--like Ghost 2003--I would imagine that must be the case!
 

____________________________________________________________________________________________

No question is stupid ... but, possibly the answers are ;) !
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #50 - Mar 6th, 2008 at 12:51pm
 
Quote:
so no floppy boot disk or bootable CD/DVD--and when the system re-boots--you're back in your regular Windows partition.

Yes.

Quote:
Does this procedure require that you leave an open Master Boot Partition primary slot,

Definitely not. My test computer has no DOS partition (now) and all 4 slots are in use. The computer boots from the file.

As a test I tried the partcopy.bin file in another computer and it worked fine. No other TeraByte software was in that computer, apart from bootfile.

I'm going to try to "copy" a 3 GB WinXP partition today.

Quote:
BootFile is a utility that enables to you boot an OS from a raw file (up to 4GB) containing a FAT/FAT32/NTFS file system .
 
 
IP Logged
 

Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #51 - Mar 6th, 2008 at 1:52pm
 
My WinXP was 2 GB, not 3 GB. The partcopy.bin file boots to WinXP, programs work and everything looks normal. I can see the partitions on the second HD but I can't see the other partitions on the first HD. In Disk Management the active WinXP partition is in the position of the data drive (a logical volume) that contains partcopy.bin. Other areas of Disk 0 are shown as Unallocated Space.

Overwhelming at present but I'm slowly understanding what it does.
 
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #52 - Mar 6th, 2008 at 4:06pm
 
When I rebooted, it went back to the partcopy.bin WinXP. A little concerning at first until I discovered that unlike DOS, you have to manually reset the MBR with "bootfile /restore". A one second job.
 
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #53 - Mar 9th, 2008 at 12:43am
 
With a few batch files you can do an unattended IFW restore using this "copied" Win XP and your real WinXP. You don't need a second physical partition.
 
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #54 - Mar 15th, 2008 at 2:32pm
 
The easiest way yet to do an unattended restore. You don't need a DOS partition at any stage or a dual boot or to copy the OS partition. All that's needed is a 1 MB bootable file created with the TeraByte OS Deployment Tool Suite. This file contains the IFD exe, the IFD command line and bootndos.exe.

From Windows you run the bootable file and your computer shuts down, runs the restore and boots into the restored Windows.

Creating the bootable file only takes a few minutes.
 
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #55 - Mar 19th, 2008 at 12:39am
 
Correction to above post. Bootndos.exe isn't needed.

 
 
IP Logged
 

Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #56 - Mar 29th, 2008 at 2:26am
 
NightOwl,

You back yet? I've done a few unattended restores with Ghost 2003. One using a DOS partition and the other using the bootable "image" of the DOS partition.

I had an interesting experience along the way. I didn't understand the Ghost command line adequately and overwrote 4 partitions with a restore. So I went from having two WinXPs, a data partition and a DOS partition to having a single WinXP taking up the whole HD. Fortunately I had a first track backup in BING which gave me my partitions back and all I had to do was restore a WinXP image to the first partition as that OS wouldn't boot.

I just wanted to report that Ghost 2003 joins IFD and Drive SnapShot as definite unattended restore apps.

PS For Drive SnapShot you need ntfsdos.exe in DOS to access your image in a NTFS partition.
 
 
IP Logged
 
NightOwl
Radministrator
*****
Offline


"I tought I saw a puddy
tat..."

Posts: 5826
Olympia, WA--Puget Sound--USA


Back to top
Re: Unattended image restore
Reply #57 - Apr 1st, 2008 at 12:33am
 
Brian

Yes...I'm back....!

I'm impressed--you have been working hard there!

Quote:
Definitely not. My test computer has no DOS partition (now) and all 4 slots are in use. The computer boots from the file.

That's certainly a plus--if you are testing out multiple OS's and want them on their own primary, hidden partition!

How big are the image files--does the program leave out unnecessary files like the hibernation file and the swap file--and empty space--but restores everything needed in its proper place?

Are partitions restored as the same size--or can they be changed to fill a larger HDD space?

 

____________________________________________________________________________________________

No question is stupid ... but, possibly the answers are ;) !
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #58 - Apr 1st, 2008 at 1:23am
 
NightOwl,

I hope you enjoyed the break.

Quote:
How big are the image files--does the program leave out unnecessary files like the hibernation file and the swap file--and empty space--but restores everything needed in its proper place?

I guess you are asking about IFD. File size is about the same as Ghost, pagefile and hibernation file aren't included. Partition restore can be resized to fill unallocated space if needed.

I mentioned a 1 MB bootable file. Great to use with IFD but unfortunately Snapshot and Ghost can't run from this file. All three apps can run from the "copy" of the DOS partition. This is a .BIN file the same size as the DOS partition. So if DOS is 100 MB, you have a 100 MB .BIN file. The .BIN can be edited in UltraISO so can be extensively changed after its creation. Files can be added or deleted. Typically your image/ restore batch files.  When the .BIN is run from Windows it causes a shutdown, a boot to DOS (the DOS in the .BIN), the appropriate batch file runs and then Windows boots.

I know your interest is Ghost so here is my rough effort in batch files for restore and image. They work in the test computer.

Quote:
ghost -chkimg,2:2\winxp.gho -fx -sure
if not errorlevel 0 goto fail

ghost -clone,mode=prestore,src=2:2\winxp.gho:1,dst=1:1 -fx -sure

pqboot /p:1

:fail
echo.
echo Verify failed


Quote:
ghost -clone,mode=pcreate,src=1:1,dst=2:2\winxp.gho -z1 -fx -sure

ghost -chkimg,2:2\winxp.gho -fx -sure
if not errorlevel 0 goto fail

pqboot /p:1

:fail
echo.
echo Verify failed


I'm not sure about the errorlevel. What do you think?
 
 
IP Logged
 
Brian
Demigod
******
Offline



Posts: 6345
NSW, Australia


Back to top
Re: Unattended image restore
Reply #59 - Apr 10th, 2008 at 1:34am
 
Update:

Unattended image restores can be done from Windows, DOS or the TeraByte bootable files.

Windows....                      Image for Windows, Drive SnapShot, Ghost32.exe

DOS.....                           Image for DOS, Drive SnapShot, Ghost 2003

TeraByte bootable files....   Image for DOS
 
 
IP Logged
 
Pages: 1 2 3 4 5 
Send Topic Print