Jump to content

Using a PE partition as a repair option in boot.ini


Flintstone

Recommended Posts

I saw this at a corporation I worked for and would like to know how it is done. Basically, if you pressed F8 during startup and then from there chose OS choices menu you had these options:

  • Windows XP Professional
  • Reinstall Windows

A partition was mounted under system32\repair which contained a BartPE setup. This setup formats the Windows partition and reinstalls from scratch. Somehow they had a boot.ini option that allowed them to boot from the PE partition and reinstall Windows ... it saved them a fortune in Helpdesk calls and made local supports job a lot easier, any awkward problems and you just told the users how to restore their build.

The whole thing ran locally and there was no requirement for networking.

Does anybody have any idea how this should be done? I have searched and just can't find the information anywhere ... I guess because it is a fairly unique approach.

Link to comment
Share on other sites


I cannot say about the F8 access to it, and there is something not clear about

A partition was mounted under system32\repair which contained a BartPE setup.

(I cannot see why they should mount a partition under a filesystem that is going to be re-formatted :w00t:)

But the idea of having a "hidden" setup partition (being it a ghosted image, a BartPE or a setup partition) is not new, and it is usually achieved through a bootloader in the MBR, but it is also possible to have an entry in boot.ini.

Some related posts are here:

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

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

(and links therein)

I might add, if you want to follow the MBR bootloader way, that recently, besides Partita, there is another MBR bootloader that fits in 512 bytes, Open Source:

http://sourceforge.net/project/showfiles.php?group_id=162108

jaclaz

Link to comment
Share on other sites

Excellent, that is a great help.

The reason it was mounted when in Windows was so that they could update the Windows version using SMS when a user was logged on. I am not sure exactly how they updated the files, probably just copied accross the files that were changed after applying hotfixes.

Link to comment
Share on other sites

Okay, I am most of the way there ... none of the methods in the posts worked but they pointed me in the right direction.

This is my method but I would like to make it a little more efficient:

  1. Create a formatted and active partition (XPE, R:)
  2. Copy the contents of the BartPE folder to R:\
  3. Rename the copied R:\i386 folder to R:\minint.
  4. Copy Ntdetect.com from C: to the R:\
  5. Copy R:\minint\setupldr.bin to R:\ntldr
  6. Restart the computer. The computer starts up using WinPE.
  7. Install the Windows Recovery Console using an XP Install disk (winnt32.exe /CMDCONS)
  8. Copy X:\Cmdcons\Bootsect.dat to C:\XPE.dat
  9. Add this line to your boot.ini - C:\XPE.DAT="Microsoft Windows PE"
  10. Mark XP Partition as active
  11. Boot into XP
  12. Erase the contents of R:\Minint
  13. Copy C:\BartPE\i386 to C:\Minint

Although the method works it seems awkward to install the boot sector by installing the recovery console, there just has to be an easier way.

I have tried using mkbt (mkbt -x -c R: C:\PE.DAT from XP, mkbt -x -c X: C:\PE.DAT from PE) but that only succeeds in booting into the recovery console on the C: drive. The other tools I have tried only work from floppy and I have a RAID setup so they do not work.

If this is the only way that works for me then that is fine but if anybody knows a method of creating a BOOTSECT.BIN or equivalent without using the recovery console then that would be great.

Link to comment
Share on other sites

Flinstone,

just for the record, you are at the moment in the "wrong" place, this is Windows PE are, not the BartPE one. ;)

However, what you are trying to do is a different thing from the original question, this is simply a "Dual boot Windows X and BartPE from hard disk", only doing manually instead of using the already "established" methods and tools.

You might want to try the "standard" peinst (do READ Bart's page):

http://www.nu2.nu/pebuilder/faq/#9

or this one:

http://www.911cd.net/forums/index.php?show...c=11226&hl=

If it's allright to use a bootmanager, here is tutorial using Grub4Dos that also covers booting BartPE from ANOTHER (not first one) partition:

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

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

My problems are that I have a RAID setup and that the automatic method does not work ... the automatic method only works to install to the same partition as the system volume.

At least this way works but I am sure that there must be a more efficient method of creating the boot loader. My method will also work on WinPE so I will update the method if I find an easier way. I would enable the F10 button rather than using boot.ini but none of the utilities used for doing that seem to work on RAID setups.

I will be using the final system (with WinPE) when I ship PCs so the less licensing and more control I have the better.

Thanks for all your help.

Link to comment
Share on other sites

Well,

since you sound like "knowing what you are doing", why don't you simply make a copy of the "normal" XP bootsector of that partition, save it as "bootsect.bin" then hexedit it to invoke, instead of NTLDR, PELDR (which is SETUPLDR.BIN renamed as PELDR)?

Any hexeditor capable of direct disk access can do this, besides commercial ones, tinyhex:

http://www.mirkes.de/en/freeware/tinyhex.php

The full edition also have scripting support, so that you should be able to automeate the task.

jaclaz

Link to comment
Share on other sites

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...