Radified Community Forums
http://radified.com/cgi-bin/yabb2/YaBB.pl
Rad Community Technical Discussion Boards (Computer Hardware + PC Software) >> NightOwl's Bootable CD/DVD >> a question to the experts - boot cd with hard drive contents scan?
http://radified.com/cgi-bin/yabb2/YaBB.pl?num=1288980566

Message started by will von wizzlepig on Nov 5th, 2010 at 1:09pm

Title: a question to the experts - boot cd with hard drive contents scan?
Post by will von wizzlepig on Nov 5th, 2010 at 1:09pm
so, I suspect the thing I seek does not exist, but I thought I would ask the experts-

I would like to find a CD or usb - bootable solution which will scan the local system hard drives for drive images, and just pop up a dialogue prompting the user for which image they want to use.

I do hardware testing, so, I have about twelve ghost 11.5 system images in various configurations, and the current boot process of winPE, check for network, fire up ghost32... I wish I could change it myself, but, that's over my head.

The problem with just hard-coding the path into the boot CD (which I assume is possible) is the images leave behind different drive partitioning on drive 0, so, each time it boots, the list/location of all local drive contents in ghost is changed slightly.

If there were any other drive-imaging tool which had the capability to boot fast and just show a list of the locally-stored image files to use... boy, that would be neat. I suspect not, but it can't hurt to ask.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 5th, 2010 at 4:33pm
@ will von wizzlepig

Does this seem OK? You can use a BartPE or WinPE CD/USB that contains ghost32.exe. Search for .gho files, then start Ghost and restore your chosen .gho. All done from a single CD or USB flash drive.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by will von wizzlepig on Nov 5th, 2010 at 6:25pm
Well, if you mean that I would search for the files myself by clicking around in ghost's not so awesome interface (really touchy mouse button), that's pretty much what I do now.

I am curious if someone has already made something that will scan for ghost files and prompt you with which one to use. I guess I need to learn to program. too many things I want don't exist yet.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 5th, 2010 at 6:32pm

will von wizzlepig wrote on Nov 5th, 2010 at 6:25pm:
I would search for the files myself by clicking around in ghost's not so awesome interface (really touchy mouse button), that's pretty much what I do now.

No, not like that. Search "My Computer" for *.gho. After you have found the appropriate file you would then start Ghost.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 5th, 2010 at 8:12pm
Instead of using a WinPE CD you can use a DOS CD containing TeraByte Explorer and Ghost. TeraByte Explorer is part of TBOSDT Pro. It will find all your *.gho files and you can then start DOS Ghost for the restore. All from the one CD or USBFD.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by will von wizzlepig on Nov 8th, 2010 at 1:06pm
Ooo, now this TBOSDT Pro may be just the thing. thanks Brian!

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by OldCasper on Nov 8th, 2010 at 2:03pm
I'm confused.....again.  Sorry about that.

But if you made a Ghost backup, wouldn't you know where you put it?  I put Ghost backups in several different HD's and partitions, but it only takes a few seconds and a few mouse clicks to find the one I want.

I've been at this PC thing way too long, admittedly.  But I found out years ago, that some things just should never be done within Windows.   I've run all my backup software and my HD utilities including Partitioning software from DOS boot disks.  With the ever increasing size of the programs involved, I've reluctantly had to graduate from floppy disks to CD's and Flash Drives. 
But working with NTFS drives from DOS isn't easy, but, there a little program called NTSF4DOS that takes much of the sting out of it.
I've included that little APP on my Ghost backup CD and flash drive, so I can run batch files from DOS to clean up the junk on an NTFS drive before I run Ghost to back it up.

I know y'all have heard this before, but I'll say it again, "DOS Rules!"

Cheers Mates!
Old Casper  ;)

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 8th, 2010 at 2:12pm
You would put

tbosdt.exe
tbexplo.tbs
tbexplo.bat

in the same folder. Let's say it is A:\DOS then tbexplo.bat would contain

tbosdt.exe A:\DOS\tbexplo.tbs

You could call tbexplo.bat in your autoexec.bat and you are ready to go.

Mount a drive path, press F3 to start a search, enter *.gho


Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by will von wizzlepig on Nov 8th, 2010 at 5:56pm
Oh, Casper, yes, I can find all the images by clicking around, but let's say you have a PC with three hard drives, and you put win xp on it. now you re-image it with win 7, and then later win vista.

each time, when ghost comes up and you are selecting the ghost image to apply, the list it shows for your hard drives is different. because the partition and drive info each OS leaves behind is not the same.

what I was asking about was just some scripty way to pre-load the locations, prompt the user for which image to apply, and go. no fiddling around. It's a difference of not many seconds shaved off, but the truth is I just wanted to know if it had been done, or if it was possible.

TBOSDT Pro looks like the way.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by will von wizzlepig on Nov 11th, 2010 at 12:00pm
aaah... so, I figured out an easier solution, just took a little work putting a batch file together.

ghost.exe has pretty decent command prompt access, so, I made a bootable USB stick with PCDOS and ghost on it.

Then I moved all my ghost images to the root folder of the drives they are on.

I made an echo information list in the autoexec.bat,

echo enter 1 for win 7
echo enter 2 for win xp
(etc)

then I made batch files named 1, 2, etc, containing-

ghost.exe -clone,MODE=restore,SRC=3:1\win7.gho,DST=2

this fires up ghost with the parameters, and prompts you to verify them, and then it starts.

Once I know all of these work, I will edit it to use the "sure" command, and remove the prompts, so it just starts after you enter the number.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 11th, 2010 at 1:22pm
@ will von wizzlepig

That sounds good. I'll be interested to see your finalized batch file.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by will von wizzlepig on Nov 12th, 2010 at 12:08pm
Ok, here we go. Again, my project is to quickly get images stored on a local machine's secondary drive written onto its primary drive.

I have it down now to 25 seconds from Post screen to ghost starting to write the ghost image to primary drive.

I created a PCDOS boot USB stick using ghost boot wizard included with Ghost 11.5. My solution is a combination of three things:

Modification of autoexec.bat: adding "echo" text to inform the user of what number to enter and removing the default entry of "ghost.exe" created by ghost boot wizard.

addition of batch files named with those numbers, and containing the command prompt info, like-a-so:

filename is : 1.bat

ghost.exe -sure -clone,MODE=restore,SRC=4:1\732.GHO,DST=2

And finally, one extra bat file which will disk-to-file the current drive 0 to a file drive 2, compress it "high" and name it makenew.gho:

ghost.exe -sure -z2 -clone,MODE=create,SRC=2,DST=4:1\NewGhost.gho

something I noticed:

ghost's numbering of disks starts at 1, and when using ghost on a USB stick, the USB stick ends up as c:, and ends up numbered as disk 1, which makes what you would normally think of as disk 0 (probably your boot drive) actually numbered disk 2.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 12th, 2010 at 1:17pm
@ will von wizzlepig

That's really interesting as I'm doing the same thing on my test computer with Image for DOS rather than Ghost. I have a big Choice menu and as you are doing, just press a number and the restore (or backup image) happens.


will von wizzlepig wrote on Nov 12th, 2010 at 12:08pm:
USB stick, the USB stick ends up as c:, and ends up numbered as disk 1, which makes what you would normally think of as disk 0 (probably your boot drive) actually numbered disk 2. 

Same with IFD.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by will von wizzlepig on Nov 12th, 2010 at 1:23pm
granted, I did not come up with a solution which searches the drives and prompts you, I ran with the solution I was currently capable of, which requires hard-coded file names and editing batch files. Luckily when you make these USB sticks, you can edit them all you want. handy.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by NightOwl on Nov 12th, 2010 at 1:37pm
@ will von wizzlepig


Quote:
Modification of autoexec.bat: adding "echo" text to inform the user of what number to enter and removing the default entry of "ghost.exe" created by ghost boot wizard.

addition of batch files named with those numbers, and containing the command prompt info, like-a-so:

filename is : 1.bat

ghost.exe -sure -clone,MODE=restore,SRC=4:1\732.GHO,DST=2

And finally, one extra bat file which will disk-to-file the current drive 0 to a file drive 2, compress it "high" and name it makenew.gho:

ghost.exe -sure -z2 -clone,MODE=create,SRC=2,DST=4:1\NewGhost.gho

Are you using the *menu* command that you setup using *config.sys* as well as *autoexec.bat* so you can select from a menu list?

How about posting the actual text in those two files to see the actual structure you are using?

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by will von wizzlepig on Nov 12th, 2010 at 2:36pm
sure...

config.sys just has "lastdrive=z"

autoexec is-

@echo off
SET TZ=GHO+08:00
if exist MOUSE.COM MOUSE.COM
echo Loading...
echo enter the number for the image you want:
echo (1) for Windows 7 32 bit, (11) for same with .net 4
echo (2) for Windows 7 64 bit, (22) for same with .net 4
echo (3) for Vista 32 bit,     (33) for same with .net 4
echo (4) for Vista 64 bit,     (44) for same with .net 4
echo (5) for XP 32 bit,        (55) for same with .net 4
echo (6) for XP 64 bit,        (66) for same with .net 4
echo (7) for Master (win7),    (77) for same with VIM
echo (makenew) Will create a new image named "NewGhost.gho"
echo if you use makenew, don't forgot to go rename the file.
CD \GHOST

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by NightOwl on Nov 12th, 2010 at 5:18pm
@ will von wizzlepig

Okay, I see what you've done--because you named each batch file a number that corresponds to the *echoed* list of options, then typing the number and pressing enter runs that named batch file.

Well, you showed me yours, so I'll show you one of mine:  NightOwl's *automated* files

It's complicated when looking at it at first....but, if broken down into it's components, you can see what different parts do.  It's designed to allow a user to make multiple backups, and have the backups saved until a certain limit is reached, then it starts deleting the oldest backup and saving the newest and keeping the designated number of backups around in a cycling rotation.  Backups have to be on a FAT partition for this to work in DOS.  If all partitions are NTFS, then a batch file that deletes the oldest image file and creates the necessary directory for the newest, and incrementing each of the other backups would have to be done while still in Windows first.  Then you could boot to DOS and run the necessary backup.

I have always found this reference a good place to get explanations and examples of DOS commands:  Vernon J Frazee's MS-DOS v6.22 Help: Command Reference

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 12th, 2010 at 9:50pm
@ will von wizzlepig

I don't know whether this will suit you but can restore Ghost images to your networked computers without leaving your desk. A boot disc isn't needed. It works with Ghost 2003 too. You just need the free TBOSDT to copy a bootable DOS partition (from any computer) to a file and boot from the file. Once you have made the file it can be copied and each copy personalized with a different command line for Ghost. (the file is editable with PowerISO etc) The method is described in bootfile.txt, Example 1. Psexec is used to start the restore on the remote computer.

I use this method to restore images to my kids' computers if they have made a mess of the OS. The backup image can be on my computer or their computer.

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 14th, 2010 at 4:12pm
@ NightOwl

Thanks for posting your menus. I've used your config.sys and autoexec.bat on one of my DOS CDs. After edits I have the menus showing my apps. I've learned a hell of a lot.

One question, can I get the A: prompt section to show coloured text and background?

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by NightOwl on Nov 15th, 2010 at 12:50am
@ Brian


Quote:
One question, can I get the A: prompt section to show coloured text and background?

Yes!  But, I'm not an expert at it--I haven't played around with the necessary *syntax* to know for sure what I'm doing.  But here's the steps involved (I just don't know exactly where you have to apply the steps--for instance if you use the *menucolor* command, do you add the prompt escape codes at the beginning of the individual menu item's list in *config.sys*, or *autoexec.bat*, or.....

So, you have to load the DOS driver called *ansi.sys* in the config.sys file.  And you have to have *ansi.sys* in the list of files on your boot disk or disc.  *Ansi.sys* is included in WinXP's Windows>system32 sub-directory, but I don't know if that's the same one used in old school DOS--probably is though!  So like this in config.sys:

device=ansi.sys

or

devicehigh=ansi.sys

Here's the help file for DOS 6.22:  MS-DOS v6.22 Help: ANSI.SYS

Scroll down a ways and you'll find the escape code #'s for text and background colors--as well as *text attributes* such as *bold*, blink on, etc..

At the bottom of the above is a sample of what the syntax is for the DOS prompt:


Quote:
prompt $e[1;32;40m$p$g

The *$e[* is the escape code beginning the ansi paramaters sequence.  Then, if I read that correctly, it's turning on text *bold* (the number *1*), and foreground (text) color *green* (the number *32*), and background color *black* (the number *40*).

The *m* ends the ansi escape codes for graphical codes.

The *$p$g* is just the *standard* DOS prompt appearance codes:


Quote:
PROMPT--Examples

The following example sets the command prompt to display the current drive
and path followed by the greater-than sign (>):

    prompt $p$g

Notice, you can make the DOS prompt much more interesting with the various codes as well!

Let me know how it turns out if you experiment with this!

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 15th, 2010 at 12:53pm
@ NightOwl

I suspect ansi.sys from the System32 folder is the wrong file. I saw this..


Code:
Incorrect DOS Version
There is an error in your config.sys on line 18


I searched Google but couldn't find a download. Except one site which was asking $10. I did find a free ansi138.zip which contained ansi.com. This is called from autoexec.bat and along with your prompt line, works perfectly. I like the green text on black. Thanks again.

http://www.simtel.net/search?q=ansi.sys

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Dan Goodell on Nov 15th, 2010 at 8:06pm

Brian wrote on Nov 15th, 2010 at 12:53pm:
I suspect ansi.sys from the System32 folder is the wrong file.


Brian,

Ansi.sys should be one of the files that came with your DOS distribution.

Here's a few more examples of what you can do with ansi.sys.  My own home-brew utility CD boots to a DOS menu enhanced by ansi.sys commands (fig.1).  When shelling out to the command prompt, my DOS prompt embeds a reminder how to get back to the menu (fig.2).  My widely downloaded Dsrfix CD similarly embeds reminder hints (fig.3).


ansisys-examples.gif (10 KB | 405 )

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 17th, 2010 at 3:59am
I've now have the DOS ansi.sys file and it loads without an error. However  prompt $e[1;32;40m$p$g  doesn't work. The prompt is still white on black. It did work with ansi.com from autoexec.bat.

I'm using
device=ansi.sys

Dan, how many items can you have in the Utility Menu?

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Dan Goodell on Nov 17th, 2010 at 6:44pm

Brian wrote on Nov 17th, 2010 at 3:59am:
However prompt $e[1;32;40m$p$g doesn't work. The prompt is still white on black.

Does it result in any strange characters?  Or does it just stay as  C:\> ?  Do other prompt commands work?  (e.g., "prompt $d $t ")



Brian wrote on Nov 17th, 2010 at 3:59am:
I'm using
device=ansi.sys

I assume that's declared in config.sys, and ansi.sys is in the root directory.  (When config.sys is being processed, there is no path variable yet so the path to ansi.sys must be explicitly specified if not in the root directory.)

Which DOS version are you using?  With MS-DOS 7.1 (aka, Win98se) the corresponding ansi.sys was 9719 bytes and had a datestamp of Apr 23, 1999.



Brian wrote on Nov 17th, 2010 at 3:59am:
how many items can you have in the Utility Menu? 

Visually, DOS screens are 80 chars by 25 lines, so if your menu design comprises more than 25 lines the top will scroll off the screen.  The design of my menu allows for 10 double-spaced menu items or 20 single-spaced items.

I use the DOS choice.com function to read alphanumeric keypresses plus [Esc], so programmatically I'm limited to 37 choices.

My configuration files are attached below for reference.


http://radified.com/cgi-bin/yabb2/YaBB.pl?action=downloadfile;file=DOSMENU.ZIP (2 KB | 301 )

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 17th, 2010 at 8:00pm

Dan Goodell wrote on Nov 17th, 2010 at 6:44pm:
Does it result in any strange characters? 

Yes. It is this...

←[1:32;40mA:\>

But the same prompt works with ansi.com. I get a green A:\>


Dan Goodell wrote on Nov 17th, 2010 at 6:44pm:
Do other prompt commands work?(e.g., "prompt $d $t ")

Yes, that gives day of week, date, time.


Dan Goodell wrote on Nov 17th, 2010 at 6:44pm:
I assume that's declared in config.sys, and ansi.sys is in the root directory. 

Yes and yes.


Dan Goodell wrote on Nov 17th, 2010 at 6:44pm:
Which DOS version are you using?

ansi.sys from DOS 6.22 (date 31 May 1994). But the other DOS files are Win98SE.

Thanks for the menu.





Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 18th, 2010 at 3:26am
It must have been my ansi.sys. I tried nansi.sys (dated 1991) and now I get a green A:\>

Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Dan Goodell on Nov 18th, 2010 at 7:38pm

Brian wrote on Nov 17th, 2010 at 8:00pm:
Does it result in any strange characters?

Yes. It is this...

←[1:32;40mA:\>

Okay, that would confirm the problem was with ansi.sys--I suppose probably because of the mismatched version (6.22 vs. 7.1).

Sounds like you've got it resolved, but FWIW, on your Win98se CD the ansi.sys file is inside the win98_52.cab cabinet file, and during installation it is extracted to the c:\windows\command folder.



Title: Re: a question to the experts - boot cd with hard drive contents scan?
Post by Brian on Nov 18th, 2010 at 9:23pm
Thanks. I copied ansi.sys from a Win98SE installation in Virtual PC and it works.

So three files work for me...

ansi.sys
nansi.sys
ansi.com

Radified Community Forums » Powered by YaBB 2.4!
YaBB © 2000-2009. All Rights Reserved.