From: Paul on
Ant wrote:
> Hello.
>
> I think I screwed up my old HDD's bootup setup on an old Dell Optiplex
> GX280 test PC. I was trying to install three different 32-bit Windows
> onto this machine for testing purposes. It is a single boot setup and
> not dual/triple boots as well.
>
> IIRC, this is what happened... I had slipstreamed Windows XP Pro. SP2/3
> (forgot which one) installed in C: drive and made a Symantec Ghost image
> (use its boot CD-R) of it D: drive. Then, I accidently installed either
> Vista or Windows 7 into D: drive (was supposed to be in C: drive!) so my
> PC thinks I am dual booting which I did not want to do! I need to
> undo/fix this, but I think I made it worse as I tried to fix this!
>
> I tried to restore XP back to C: with my Ghost image backup, but the
> dual boot was still there! I tried restoring Vista/W7, but that didn't
> help either. I also tried clean reinstalling XP form its setup CD
> (booted from PC's bootup) into C: from scratch, but it didn't fix the
> problem. I tried booting up XP Pro. SP2 CD's recovery console to use
> fixmbr.exe \Device\HardDisk0 on the drive based on
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/bootcons_fixmbr.mspx
> instructions and rebooted, but that didn't work either (same problem).
> Maybe I did it wrong? I have never used it before, but then I never had
> to fix/undo multi-boot setup before.
>
> What am I missing and how do I have PC just boot to pure Windows that is
> installed on the current C: drive? I knew I should had been more careful
> with installation (C: and not D:). Do I have to do a full clean format
> on the computer? I don't want to lose Dell recovery partition/drive
> (don't have its original recovery discs for it either) too. :(
>
> Thank you in advance. :)

Start with a copy of PTEDIT32, to look at the partition table. In the picture
here, you can see the second partition is marked active (boot flag is 0x80).
I think what the fixmbr does, is rewrites 446 bytes of WinXP boot code in
the MBR. I doubt it would change the boot flag or modify the 64 bytes in
the MBR that define the four primary partition entries.

You might change the boot flag, to the partition you're currently trying
to single boot. (The boot flag can be changed with Partition Magic. The
boot flag could be changed with the "fdisk" program in some Linux distro.
It is possible PTEDIT32 supports that capability, but I don't make any
changes with this tool - I use this purely for a quick look.)

http://www.vistax64.com/attachments/vista-installation-setup/7308d1224108918-hidden-partiton-recovery-dell-xps-420-dell-tbl.gif

( ftp://ftp.symantec.com/public/english_us_canada/tools/pq/utilities/PTEDIT32.zip )

I'm a little foggy on the whole boot process, but it goes something like this.

Starts with MBR. OS specific boot loader is loaded in the MBR sector.
Some primary partition is marked active. In that partition, is a
"partition boot sector", containing more code. (When I look here,
it seems that code is 1536 bytes long.)

The OS itself, has a boot manager. It may have multiple entries in a
menu it presents, and you can vector from there, to whatever other OS
you were trying to load. In WinXP, the details are in boot.ini. If
Windows 7 boot manager was being used, then a different scheme is
used for holding that information (you can't fix it with Notepad there).

Since you say you're only trying to get WinXP running again, you'd
want the boot flag set for the WinXP partition, and do your repairs to
that partition. By doing so, your hope would be, to break your
dependency on the other partitions for aiding the boot process.
(Like using the Windows 7 boot manager to launch WinXP.)
So if currently, the boot manager in Windows 7 is running the
show, it probably wouldn't be that useful to try deleting Windows 7
entirely. At least, until WinXP is working on its own, and a
path that uses only WinXP components is at work.

fixmbr would put the WinXP version of the MBR boot code back.

fixboot writes a new partition boot sector (which is located just
in front of where the file system starts, on C:). At this point,
I don't think you need to do that (because you say Windows 7 is
on D:, WinXP is on C:, so if the Windows 7 installer wrote the
partition boot sector, is would have overwritten the 1536 bytes
of D:).

bootcfg seems to be involved with boot.ini, but I've never used
it. That would be used perhaps, if there was a problem with the
menu offered in WinXP (boot.ini), for its boot manager.

http://chara.epfl.ch/~fsalvi/Windows/ntfs_recovery/recconsole2.html

Now, I seem to remember some individual, making an awful mess.
They could have been using bootcfg /rebuild or something. You're less likely
to make a big mess, with the other two. You could certainly point
them at the wrong disk.

To make matters worse, in a search engine, I seem to be seeing a
bootcfg available right in Windows, and a different bootcfg in the
Recovery Console, with different command options. The /rebuild
option is available in the bootcfg in the Recovery Console.

Some day, I'm going to find a web page that documents all this
stuff in one article. It would sure save typing, if there
were such a web page.

Have fun,
Paul
From: Ant on
On 8/1/2010 2:53 AM PT, a(a)b.c typed:

> You need to use the BOOTSECT.EXE program which you should have in the
> BOOT directory of your Wind7 DVD. You do this from a command window:
>
> BOOTSECT /nt52 c:
>
> to restore the XP single boot up sector

Thanks. I hope that's all I will have to do on tomorrow (not at the test
machine right now). I assume you mean to try it in its recovery mode
like XP's.
--
"When you need a helpline for breakfast cereals, it's time to start
thinking about tearing down civilization and giving the ants a go."
--Chris King in a.s.r.
/\___/\ Phil./Ant @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
From: Ant on
> To force WinXP to boot off partition C:, you must launch diskmgmt.msc,
> then mark drive C: as active. You may then have to boot into Recovery
> Console mode and run these commands:
> - fixboot
> - fixmbr
> - bootcfg /rebuild
> A general remark. You write " I was trying to install three different
> 32-bit Windows onto this machine for testing purposes" and "I don't want
> to lose Dell recovery partition/drive (don't have its original recovery
> discs for it either)". When you wish to experiment you use a separate
> disk but never a disk that holds irreplaceable things. Disks are cheap!

Ooh, I forgot about Disk Management. I will try that if a(a)b.c.'s quick
fix doesn't work. I assume to use XP Pro. SP2's recovery console on its
setup CD.
--
"Maybe it's like an ant hive..." "Bees man, bees have hives." "You know
what I mean. It's like one female that runs the whole show." "Yes, the
queen." "Yeah the mamma. She is bad*ss, man. I mean big." "These things
ain't ants estupido." "I know that." --Aliens movie
/\___/\ Phil./Ant @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
From: Ant on
On 8/2/2010 1:30 PM PT, Ant typed:

>> You need to use the BOOTSECT.EXE program which you should have in the
>> BOOT directory of your Wind7 DVD. You do this from a command window:
>>
>> BOOTSECT /nt52 c:
>>
>> to restore the XP single boot up sector
>
> OK, I restored XP Pro. SP2 from its Ghost image to the drive (weird, it
> restores to D: [that doesn't seem right]). I rebooted to 32-bit W7 DVD's
> repair's cmd.exe and did "BOOTSECT /nt52 c:". I rebooted again and it
> worked. Although, the drive letters are wrong. I will have to fix that.
> I hope I don't screw it up more again (C: became D:, D: became C:). I
> have backup of Ghost images just in case. Hopefully, restoring all my
> images and booting each one up works correctly.

Nope! After flipping/swapping the drive/partition letters and restoring
each Ghost image to the correct C: drive showed missing nt. I tried
32-bit W7 DVD's "BOOTSECT /nt52 c:" and "fixmbr.exe" methods in XP Pro.
SP2's CD text mode cmd.exe, but both failed to fixed that one. :(

I gave up and just reinstalled all Windows from scratch. Oy!
--
"Ants are so much like human beings as to be an embarrassment. They farm
fungi, raise aphids as livestock, launch armies into wars, use chemical
sprays to alarm and confuse enemies, capture slaves. The families of
weaver ants engage in child labor, holding their larvae like shuttles to
spin out the thread that sews the leaves together for their fungus
gardens. They exchange information ceaselessly. They do everything but
watch television." --Lewis Thomas
/\___/\ Phil./Ant @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.