• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

How do I fix/remove the bootloader after accidently installing intosecond drive/partition?

A

Ant

Flightless Bird
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. :)
--
"I'm not afraid of insects taking over the world, and you know why? It
would take about a million ants just to aim a gun at me, let alone fire
it. And you know what I'm doing while they're aiming it at me? I just
sort of slip off to the side, and then suddenly run up and kick the gun
out of their hands." --Jack Handy from Saturday Night Live
/\___/\ 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.
 
P

Paul

Flightless Bird
Re: How do I fix/remove the bootloader after accidently installinginto second drive/partition?

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

Pegasus [MVP]

Flightless Bird
Re: How do I fix/remove the bootloader after accidently installing into second drive/partition?

"Ant" <ant@zimage.comANT> wrote in message
news:2radncSywNqEmcjRnZ2dnUVZ_qIAAAAA@earthlink.com...
> 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. :)
> --
> "I'm not afraid of insects taking over the world, and you know why? It
> would take about a million ants just to aim a gun at me, let alone fire
> it. And you know what I'm doing while they're aiming it at me? I just sort
> of slip off to the side, and then suddenly run up and kick the gun out of
> their hands." --Jack Handy from Saturday Night Live
> /\___/\ 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.


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!
 
A

a@b.c

Flightless Bird
Re: How do I fix/remove the bootloader after accidently installing into second drive/partition?

On Sat, 31 Jul 2010 22:20:25 -0700, Ant <ant@zimage.comANT> 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. :)



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
 
A

Ant

Flightless Bird
Re: How do I fix/remove the bootloader after accidently installinginto second drive/partition?

On 8/1/2010 2:53 AM PT, 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.
 
A

Ant

Flightless Bird
Re: How do I fix/remove the bootloader after accidently installinginto second drive/partition?

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

Ant

Flightless Bird
Re: How do I fix/remove the bootloader after accidently installinginto second drive/partition?

Thanks Paul. That reminds me...

I forgot to mention what I saw in multi-boot menus. It said "previous
Windows" or "Windows 7". A funny thing is that even with specific
Windows restored from Ghost image backups, I still see "Windows 7"
mentioned even if Vista was restored. I cannot remember which is which
since I am not at the PC, but I think booting up a Windows resulted
either ANOTHER multi-boot or blank screen (nothing happens, not even a
blinkin cursor). I am sure I broke the bootup process badly. :(


On 7/31/2010 11:05 PM PT, Paul typed:

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

--
"Busy as ants hurrying orcs were digging, digging lines of deep trenches
in a huge ring, just out of bowshot from the walls;" --The Return of the
King (book)
/\___/\ 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.
 
A

Ant

Flightless Bird
Re: How do I fix/remove the bootloader after accidently installing into second drive/partition?

> 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.
--
"There are things in the Universe billions of years older than either of our races. They are vast, timeless, and if they are aware of us at all, it is as little more than ants and we have as much chance of communicating with them as an ant has with us. We know. We've tried and we've learned that we can either stay out from underfoot or be stepped on. They are a mystery and I am both terrified and reassured that to know that there are still wonders in the Universe, that we have not explained everything. Whatever they are, Miss Sakai, they walk near Sigma 957 and they must walk there alone." --G'Kar - Mind War
/\___/\ 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.
 
A

Ant

Flightless Bird
Re: How do I fix/remove the bootloader after accidently installinginto second drive/partition?

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