[vox-tech] rescuing winxp? (resolved)

Rick Moen rick at linuxmafia.com
Fri Sep 24 11:48:26 PDT 2004


Er, I forgot to make the point I was driving towards.  Quoting myself:

> Note that reinstalling a Microsoft OS always causes it to reassign the
> bootable flag to what _it_ wants, silently discarding whatever your own 
> policy dictated -- and also overwrites (without consulting you) the
> MBR sector's program space (initial 446 bytes).  For example:
> 
> Suppose your booting strategy is to allow the nameless Microsoft Corp.
> MBR program its preferred hegemony over your MBR's program space, and 
> use lilo in the /dev/hda2 superblock to select which OS to boot.  Before 
> Linux installation, you have:
> 
> /dev/hda1   bootable (aka active) flag    NTFS
> 
> After Linux installation, you have:
> 
> /dev/hda1                                 NTFS
> /dev/hda2   bootable (aka active) flag    ext3
> /dev/hda3                                 Linux swap

[snip gory details of bootstrapping]


Suppose, some while later, your NT/W2k/XP installation commits seppuku
in some fashion, and you decide to reinstall it, overwriting the same 
/dev/hda1 in order to make the thing operable again.  The MS installer,
in addition to loading a big load of stuff _into_ /dev/hda1, will
without asking your leave reassign the bootable flag:

/dev/hda1   bootable (aka active) flag    NTFS
/dev/hda2                                 ext3
/dev/hda3                                 Linux swap

(At the same time, it will, without asking your leave, overwrite the
446-byte program space at the beginning of the MBR.  But you don't mind
that:  All it's doing is replacing the nameless Microsoft MBR bootloader
with a fresh copy of the same -- at worst, a net NO-OP; at best, you'll
wipe out any MBR virus that anyone carelessly installed.)

That change having been made, the Int13h BIOS boot routine never loads
lilo from /dev/hda2's sector zero, but instead branches stratight to
/dev/hda1's sector zero contents, i.e., NT's OS Loader.  Ergo, your
ability to dual-boot gets silently obliterated (until you realise what
happened and fix it).

My point is that people whose living-with-Microsoft dual-boot strategy 
entails conceding the MBR to Redmond need to know about that nasty
habit, and be aware of the need to retweak the bootable flag after each
Microsoft OS reinstallation.

-- 
Virtual Regards,
Rick Moen
Sysimperator, dominus regis deusque machinarum.
rick at linuxmafia.com


More information about the vox-tech mailing list