Jump to content











Photo
- - - - -

Booting a USB HDD to Win98 DOS for Wipe&Ghost


  • Please log in to reply
6 replies to this topic

#1 stevenhicks

stevenhicks
  • Members
  • 4 posts
  •  
    Afghanistan

Posted 23 April 2007 - 09:03 PM

Hey all, i'm new here, but i've done some searching and I can't seem to find any help. I'm sure i'm just missing something, but i'm not sure what.

I'm trying to create a bootable USB Hard Drive that I can use to wipe the local fixed disks and then install one of three ghost images stored on that USB HD. This is an automated process started by a config.sys menu that I created which lets you pick the specific image you need to install on that system. The script then boots, wipes all hard drives and installs that image without stopping or taking input from the user. I used the HP format utility to copy system files from a win98 bootdisk to make the USBHD bootable.

[EDIT]Minor detail! As you can imagine 3 full system images weighs in at 9.5 gigs, so most of the strategies of booting with 512Mb flash drives are out because I can't format in FAT(16) which seems to be a requirement of some of these programs.

The problems i ran into with this were: I have to wipe ALL hard drives in the system and since the USB HD was showing up as C: and a hard drive, it tries and succeeds in wiping itself :cheers:
Also, Ghost wants to copy the image to C: and make that the booting drive, but since I'm running Ghost from C: AND trying to copy the image to C:, it blows up.

So, now my questions. I've been thinking that if i could get the USB HD to boot up as any other letter than C:, i could at least get ghost to work properly. I could specify in the Wiping program to only wipe the primary Hard Drive, which isnt optimal, but those two together could solve my problems.

What would be optimal is to not only boot as something other than C: but to also make the USB HD look like a removable disk or a floppy so that the wiping program doesnt pay any attention to it (but would also wipe any secondary HDs in the system)

So, my question to you all is, is this possible? By the way, i tried out WinBuilder today to see if that would help and i think the file is corrupted. I get blank (white) pages in every pane of the application (Scripts, Web, etc) The tutorial screenshots don't look anything like what i'm seeing. :cheers:

#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 23 April 2007 - 09:59 PM

Hey all, i'm new here, but i've done some searching and I can't seem to find any help. I'm sure i'm just missing something, but i'm not sure what.

I'm trying to create a bootable USB Hard Drive that I can use to wipe the local fixed disks and then install one of three ghost images stored on that USB HD. This is an automated process started by a config.sys menu that I created which lets you pick the specific image you need to install on that system. The script then boots, wipes all hard drives and installs that image without stopping or taking input from the user. I used the HP format utility to copy system files from a win98 bootdisk to make the USBHD bootable.

[EDIT]Minor detail! As you can imagine 3 full system images weighs in at 9.5 gigs, so most of the strategies of booting with 512Mb flash drives are out because I can't format in FAT(16) which seems to be a requirement of some of these programs.

The problems i ran into with this were: I have to wipe ALL hard drives in the system and since the USB HD was showing up as C: and a hard drive, it tries and succeeds in wiping itself :cheers:
Also, Ghost wants to copy the image to C: and make that the booting drive, but since I'm running Ghost from C: AND trying to copy the image to C:, it blows up.

So, now my questions. I've been thinking that if i could get the USB HD to boot up as any other letter than C:, i could at least get ghost to work properly. I could specify in the Wiping program to only wipe the primary Hard Drive, which isnt optimal, but those two together could solve my problems.

What would be optimal is to not only boot as something other than C: but to also make the USB HD look like a removable disk or a floppy so that the wiping program doesnt pay any attention to it (but would also wipe any secondary HDs in the system)

So, my question to you all is, is this possible? By the way, i tried out WinBuilder today to see if that would help and i think the file is corrupted. I get blank (white) pages in every pane of the application (Scripts, Web, etc) The tutorial screenshots don't look anything like what i'm seeing. :cheers:

No, there's no way i know of, to tell Win98 or DOS what drive letter to use. (Why don't you tell your wiping program to start with drive letter D instead of C?)
But you can do so with WinPe, it's by default drive letter X.

#3 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 24 April 2007 - 09:12 AM

Let's clear up some "misconceptions". :cheers:
1) FAT16 is NOT actually a requisite of a program or another, but rather a requisite of SOME BIOSes that won't boot from USB with FAT32 or NTFS, if your motherboard(s) support booting from FAT32 or NTFS, that isn't a problem, on the other hand, NOTHING prevents from multipartitioning the stick, with a small FAT16 partition active as first one.
UNLIKE NT based systems, DOS manages a multipartitioned USB "removable" device just like a normal HD.

2) the problem with DOS/Win9x is that the OS needs to be booted from First Active Partition of First hard disk. The OS later assigns letter C: to that partition.
It should be possible to workaround in three ways:
a) by using grub4dos to map the hd partition to a floppy, something along the lines of:
Emulates HD partition C: as floppy drive A: and boot win98 from A:



		map --read-only (hd0,0)+1 (fd0)

		map --hook

		chainloader (fd0)+1

		rootnoverify (fd0)

		map --floppies=1

		boot
:cheers: by using grub4dos with map --mem or hmload to create a RAMdisk at boot, copy to it the files and boot from it
(use grub4dos 0.4.2) here:
http://grub4dos.jot.com/WikiHome
http://grub4dos.jot....r_dos-0.4.2.zip
IF it doesn't work, do try LATEST "nightbuild", currently:
http://grub4dos.jot....-2007-04-21.zip

c) by using Letter Assigner:
http://www.v72735.f2s.com/LetAssig/
Please find here an example on how this can be used:
http://www.geocities...eedatarecovery/

It mostly depends on how GHOST sees drives, I am not really familiar with it, but I guess that it accesses them at a lower level than DOS does, so I cannot say if changing letters will be useful, most probably you will have to combine at least two of the above hints.

I am quite sure, however, that GHOST has commands to selectively wipe drives and partitions, so maybe you are using a "too drastical" set of commands.
Can you post your config.sys or whatever batch file you are using, maybe it is possible to "improve" it.

jaclaz

#4 stevenhicks

stevenhicks
  • Members
  • 4 posts
  •  
    Afghanistan

Posted 24 April 2007 - 01:47 PM

Wow! Thanks for the help people. I appreciate the clarifications. I'll spend the morning sorting through the above posts, but i'll post my autoexec and config to show you what i'm doing. The suggestion of making Grub show my HD as a floppy sounds very promising. Again, thanks for the assistance. :cheers:

Config.sys
[codebox] [MENU] menuitem=WIPE,Wipe Drive menuitem=DESKTOP,Install Desktop Image menuitem=LAPTOP1,Install Single Core Laptop Image menuitem=LAPTOP2,Install Dual Core Laptop Image menuitem=WIPEDESK,Wipe and install Desktop Image menuitem=WIPELAP1,Wipe and install Single Core Laptop Image menuitem=WIPELAP2,Wipe and install dual core laptop image menuitem=QUIT,Quit menudefault=QUIT menucolor=15,1 [COMMON] [WIPE] [DESKTOP] [LAPTOP1] [LAPTOP2] [WIPEDESK] [WIPELAP1] [WIPELAP2] [QUIT][/codebox] And the Autoexec [codebox] @ECHO OFF CTMOUSE.EXE if %CONFIG%==WIPEDESK goto WIPE if %CONFIG%==WIPELAP1 goto WIPE if %CONFIG%==WIPELAP2 goto WIPE goto %CONFIG% :WIPE bcwipepd wSILENT -d* -p3 if %CONFIG%==WIPEDESK goto DESKTOP if %CONFIG%==WIPELAP1 goto LAPTOP1 if %CONFIG%==WIPELAP2 goto LAPTOP2
goto END

:DESKTOP
ghost -clone,mode=load,src=desktop.gho,dst=0 -sure
goto END

:LAPTOP1
ghost -clone,mode=load,src=laptop.gho,dst=0 -sure
goto END

:LAPTOP2
ghost -clone,mode=load,src=dclaptop.gho,dst=0 -sure
goto END

:QUIT
goto END

:END[/codebox]

#5 stevenhicks

stevenhicks
  • Members
  • 4 posts
  •  
    Afghanistan

Posted 01 May 2007 - 07:24 PM

Ok i must be doing something wrong here. I took the code that jaclaz provided and put it in a file called media.lst but every time i run grub either in config.sys or straight from the command line like...

install=c:\grub\grub.exe --config-file="#@c:\grub\menu.lst"

...I get a blank screen with a cursor blinking in the top left and nothing happens. I searched for that on the forum but i have yet to find a doc that really explains what each switch is. *Not complaining* I just am trying to explain the cause of my ignorance :confused1:

Anyway, some insight would be appreciated.

#6 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 02 May 2007 - 08:43 AM

Well, you might want to start a step by step approach.
1) make a DOS boot disk and copy to it grub.exe and a menu.lst
2) once booted from it, simply type grub [ENTER]
3) grub will should start
4) press c, you will enter command mode
5) input command lines one by one, pressing [ENTER] at the end of it each time
6) in most cases grub4dos will return a message (either of success or failure)
7) once you have given all needed commands input
boot
and [ENTER]

This way you have more control on each command and it's results.

Anyway, hoping that

I took the code that jaclaz provided and put it in a file called media.lst
....
install=c:\grub\grub.exe --config-file="#@c:\grub\menu.lst"

is just a typo :confused1:
the "snippet" I posted misses a fundamental pre-requisite, a title.
A proper "full" menu.lst appears something like:

# This is a basic menu.lst file for GRUB4DOS, in the version for ezG4DOS.
# You can make changes to it.

# Following lines load a splashimage and set text foreground/background colour
# splashimage /GRUB4DOS/ezG4DOS.xpm.gz
foreground = 69ed4e
background = 337326

# Following line is the choice for colours when background image is NOT SET
# (see above) they are commented out as a splashimage is SET
# color black/cyan yellow/cyan

# Following is the timeout for the default choice
# By not pressing any key during the timeout, the default will be chosen
timeout 10
# Following is the menu item that will default
default 0

# This reflects the "normal" behaviour of a PC
# i.e. booting the first partition of first harddisk
# By setting it as default with timeout 10 seconds (see above)
# We try to replicate somehow the "Press any key to boot from CD..." message
# of Microsoft Install CDs, this way if no key is pressed, as an example for
# unattended installs, the system will boot "normally" even if CD is inserted
# of course if the "any" you press is [ENTER] system will boot from this entry
title Boot Hard Disk MBR on (hd0,0)
chainloader (hd0,0)+1
rootnoverify (hd0)

title Win98 Boot
find --set-root /grldr
kernel /memdisk.gz
initrd /win98.ima


title Win98.ima
find --set-root /win98.ima
map --mem /win98.ima (fd0)
map --hook
root (fd0)
chainloader (fd0)+1


title Win98.ima
find --set-root /win98.ima
map --mem /win98.ima (fd0)
map --hook
root (fd0)
chainloader (fd0)/IO.SYS

title exchange HD with floppy
map --read-only (hd0,0)+1 (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
map --floppies=1


Lines beginning with # are just comments.

The command "boot" is implied and executed as last command of an entry in menu.lst even if not present.

There is no "real" help file and docimentation about the commands, you can refer to the more general GRUB docs, but as most Linux man pages, it describes single commands and gives no examples of the sequence in which commands are executed.

The readme.txt that comes inside grub4dos gives some examples, but your best bet to find some more ones is to search on the 911CD forum for posts by me (jaclaz) and diddy with keyword "grub4dos".

jaclaz

#7 stevenhicks

stevenhicks
  • Members
  • 4 posts
  •  
    Afghanistan

Posted 03 May 2007 - 08:40 PM

jaclaz, thanks for the further clarification. I actually did get grub to work after following your idea to simplify.

A few things though. First that script only mirrors a hard drive onto A:. I can still go to C: and see and delete the files, which not only removes them from view on A: but actually deletes them from the drive. Did I do something wrong? I did "hide" (hd0,0) which kept my bootable usb drive from showing up as C:, but wouldn't that keep my local fixed disk from becoming C:?

Also, if i run grub, do what i need to do and shut down, it appears to corrupt my command.com or my bootfiles. If i need to use the drive again, i get "Bad or missing command interpreter" or something to that effect. I dont see a "shutdown" command for grub...




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users