Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi,
I am trying to make a recovery cd for my computer.
Is there any program which will format a hard drive (already partitioned) automatically without human control during the recovery.

somewhere on this site, I recall reading about all the fdisk command switches including hidden ones that the setup program can use... so all you have to do is call fdisk with the proper command line and it will do it automatically!
http://members.aol.com/axcel216/95.htm
the info is in there somewhere but it is long site so look around.

FDISK isn't for formatting... it's for partitioning. You could: hack up a version of Norton Ghost, put a version of Linux on the CD and use "dd" commands to copy a hard drive from an image, or use a pipe to automatically hit "y" and enter. Not sure if that always works right... I don't automate a format unless I'm REALLY mad at someone... but "FORMAT whatever |y" might work.

I'm sorry, I read the word partition and went the wrong direction...
if your recovery cd is going to be bootable maybe you could just put "format c: /y" in the autoexec.bat?

That might work... but I don't see the /y command line option on the help files. Maybe it's undocumented.
The |y at the end will pipe a Y to the running FORMAT program when it is asking if you are SURE... or at least I'm told it will.You sure you don't want to hear more from the Linux or Norton Ghost idea, both which use images that save boot sector, free space, FAT, just about everything?

Even though you cannot boot, you do not want to format C: automatically. Format should never be automatic.
But from a point of view of the mechanics, why not:
Format C:
Y
I mean why not use a separate line for Y instad of a switch /Y? Y is not a documented FORMAT switch.

I tried both FORMAT H: /Y and Format H: with Y on another line while I was offling, and neither one of them will work in a batch file.
Maybe someone can post batch file lines that will do a format?

You probably want
echo y | format c:
;-)
plus there's the volume name prompt to consider at the successful (?) end of the format ( /V switch), plus the possibility of problems - some sort of error handling routine would be required (errorlevel ?)
Still, it's not the kind of program I'd want to totally automate.

Are there ways to automatically fdisk
hard drives. I see some post saying
some fdisk hidden parameters like
fdisk /pri:xx
But never have luck to do it.
For example if I want to partition
my whole disk into one drive
what command should I use?
fdisk /pri:100% doesn't work.Thanks

There isn't a way without third party tools. Symantec's Norton Ghost comes with a DOS program called GDISK which let's you kill partitions, create partitions, make them active, etc - all from batch files.
We use it when we are going to creat a new Ghost load. First, GDISK runs and kills all of the partitions on the drive, then it runs again and creates a primary active partition using 100% of the available space. Then the batch file formats the drive, dumps the Windows 2000 Pro SP2 files, and starts and unattended install. Makes it much easier than manually doing it, and it ensures that every machine is identical.

I need help please...
I need to create a batch file that will automate the following task:
- Format the har disk drive (unconditional and bootable).
- Place a CONFIG.SYS file on the hard drive that enables use of the CDROM drive.
- Place an AUTOEXEC.BAT file on the hard disk drive that sets the PROMPT, PATH and enables use of the CD-ROM drive.
- Copy DOS utilities to an appropriate location on the hard disk drive.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |