Jump to content

Use Fdisk before the real installation? can do or not?


Recommended Posts

Hi, are there anyway or any script to use FDISK to format the Master Boot Record on C: before the real WinXP startup the installation??

if it can be done and the "Autopartition = 0" is set in winnt.sif, so the unattended installation will skip the format section.

Link to comment
Share on other sites


First of all Fdisk only creates and deletes partitions, it doesn't format them.

If you are after multiple partitions then you will need to boot from other media and usee fdisk, or if you boot from a Windows PE cd then you can create the partitions with diskpart and format then format them NTFS with the format command.

If you just want 1 partition the full size of the drive and don't care about what is on the drive then set

[Data]

AutoPartition=1

[unattended]

Repartition=Yes

Link to comment
Share on other sites

First of all Fdisk only creates and deletes partitions, it doesn't format them.

If you are after multiple partitions then you will need to boot from other media and usee fdisk, or if you boot from a Windows PE cd then you can create the partitions with diskpart and format then format them NTFS with the format command.

If you just want 1 partition the full size of the drive and don't care about what is on the drive then set

[Data]

AutoPartition=1

[unattended]

Repartition=Yes

So, there is no sollution if the C: is split to 2-3 partition???

Link to comment
Share on other sites

Vingren

I have the feeling that you have not a correct view of what the MBR and FDISK do, if I may, I'll try and clear some points.

1) there is no such thing as a "C: split into 2-3 partitions", C: is the latter assigned to ONE of the partitions (more precisely First Active Primary Partition) of First PHYSICAL Hard Drive

2) The MBR consists mainly of two parts:

2.1) Some boot code, that can vary depending of the OS installed or if any boot-manager is installed

2.2) The "partition Table", i.e. an "Address list" holding the data about partition(s) on the drive

3) There are 4 entries available in the partition table, thus there is a maximum of 4 possible partiions on the Drive, unless ONE of the entries, instead of being a Primary partition is an "Extended" one.

4) First sector of Primary partition is the bootsector

5) The Extended partition has NOT a bootsector as first sector, but rather a "Secondary MBR", where more place for "Addresses" is given, these are referred to as "Logical Volumes" inside Extended partition

6) FDISK simply does the following:

6.1) Writes the boot code

6.2) Writes the address of partitions, dividing the Physical Hard Drive into one or more partitions

6.3) DOS/Win9.x/ME has the limit of making only ONE Primary pasrtition and ONE extended one (in which you can make more than one Logical Volumes, Freedos FDISK allows for more than one Primary partitions, only ONE Extended partition is allowed anyway

6.4) Writes the TYPE of partition, i.e. the filesystem that will be used on it, DOS has ONLY FAT16 support, whilst Win9.x/Me has both FAT16 and FAT32 support

6.5) Sets the Primary partition as "Active" or "bootable"

7) Each of the partition which address has been defined by fdisk needs later to be formatted by the FORMAT command or other similar utility, the FORMAT will create the bootsector and the filesystem structures

8) When the computer boots up the "boot code" of the MBR seeks into the "Partition table" for Active partition and passes control to its bootsector

You might be interested in this thread:

http://www.911cd.net/forums//index.php?showtopic=16713

An alternative could be using DISKPART from, as suggested, a PE build:

http://www.msfn.org/board/index.php?showtopic=80363

Or using a third party tool.

Another possibility is to use Grub4Dos grldr as the no-emulation bootsector of the CD, loading a floppy image containing FreeDos/DOS/Win9.x/ME, FreeFdisk and grub.exe.

Grub.exe has the possibility to chainload Windows NT/XP/2003 setupldr.bin without re-booting, so that you can have a "main" menu.lst, accessed by grldr, that automatically boots the floppy image, in the floppy image in autoexec.bat you put:

a.) the free fdisk script you want

b.) a call to grub.exe that loads another menu.lst that by default calls the SETUPLDR.BIN and starts the install

Please note that you will have to experiment a bit with the above, since "normally" FDISK NEEDS a re-boot in order to update through BIOS the Partition Table.

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Quite simple actually. This is assuming that you have an absolutely new unpartitioned hard disk.

Following steps should see you through.

First of all set the bios boot order to ide-0, ide-cdrom, whatever.

Create a multiboot cdrom with something like BCDW. This should have 2 boot options. Default should be Windows installation & the other being a dos bootable image with gdisk paritioning utility. You can add suitable time delay like 10 seconds.

When the system first boots it will automatically boot the cdrom. At this point you have to manually select gdisk partitining boot image. This is the only time user intervention is required. With gdisk you can predefine and create all kinds of partitioning options from command line or batch file such as primary or logical, as percent of the hard disk or actual size, formatted/unformatted, etc . If you use the free 4dos.com as your command shell you can also create checking functions & reboot when gdisk is finished with its task.

You can leave the c: drive partitioned but unformatted & set as active.

When the system reboots it will once again boot from the CD. The default option would be XP installation. So it will boot & start installing windows as defined in your winnt.sif unattended.

You have to make sure that bootfix file is removed from the custom cd compilation otherwise it will try to boot from HDD.

You can run a runonce.cmd which will format your other partitions to whatever you want like ntfs or fat32. You can also use diskpart in runonce to assign a different drive letter to your cd rom as well as other volumes. The runonce file run from the startup folder can end with a delayed shutdown /reboot instruction & be a self deleting one with the last line being "del %0".

You can copy another self deleting .cmd file to the startup folder which will run a utility which would ask you to change the owner and organisation details as well as change the xp registration number after the next boot.

You have essentially created an installation cd which is completely automatic except for initial bios setup & 1 keystroke at first cdboot.

Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...