Re: bootsect.bak

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




..bak is the standard extension - and has been since DOS days (and before) -
for a backup file, which is the original file with only its extension
changed. This is done prior to saving the modified copy of the original.

There is no doubt of the above...

On Wed, 25 Nov 2009 12:30:15 -0000, Mikoyan wrote:

Thank you for your time in answering this.

Any further ideas would be really appreciated

Regards, Mikoyan


"Massaro. Antonio M" <antoniommassaro@xxxxxxx> wrote in message
news:D9B87086-18D3-4EEC-AF48-5C00093A0618@xxxxxxxxxxxxxxxx
"R. C. White" <rc@xxxxxxxxxxxxx> wrote in message
news:uYWrJ1VbKHA.1652@xxxxxxxxxxxxxxxxxxxxxxx
Hi, Mikoyan.

The exact function of this file has changed with successive generations
of Windows, so this answer may not be correct for all versions. (Also, I
am not a techie, so, even if my explanation is correct, there probably
are others who can explain it better than I can.)

When the computer is first powered on, it knows nothing. But there is an
EEPROM (Electrically Erasable Programmable Read Only Memory) chip on the
motherboard that holds the Basic Input/Output System (BIOS). These are
the most basic, most primitive instructions that make the system start to
"pull itself up by its bootstraps" - that is, to "boot" itself by
starting from zero. These first instructions can't do much but tell the
hardware to find the first internal hard disk drive, transfer the
contents of the first physical sector on that disk into memory, and then
start executing the instructions found there. This first sector on each
HDD is the MBR - the Master Boot Record. A sector is only 512 bytes
long; there is just enough room to hold the 64-byte Partition Table plus
about 400 bytes of still-primitive instructions. The Partition Table has
room for four 16-byte entries; each of these tells where one partition
starts and ends, plus a few bits of information about that partition,
including whether it is the one Active (bootable) partition on that HDD.
The MBR code finds the start of that Active partition and loads the first
physical sector of that partition into RAM and starts executing those
instructions. This first physical sector of the Active partition is the
"boot sector". This partition is the "System Volume" for this boot
session; it is often referred to as the "System Partition" since it must
be a primary partition, not a logical drive in an extended partition.

The contents of the boot sector vary, depending on which operating system
wrote it onto the hard drive. The Win9x boot sector had instructions to
look for the files IO.SYS and MS-DOS.SYS. Win2K/XP boot sectors are
based on Windows NT, so they look for NTLDR, the NT loader. Vista and
Windows 7 boot sectors look for bootmgr, the boot manager.

No matter which code is in the boot sector, it must find a file with no
extension in the Root of that Active partition. At this very early boot
stage, the computer doesn't yet know how to deal with extensions or
folders or multiple partitions, much less multiple hard drives. So those
first startup files must be in the Root of that partition and the correct
boot sector code must be on the first physical sector. This sector is
OUTSIDE the file system, so it can't be copied or backed up or otherwise
handled by normal Windows programs or utilities. Only special
system-level utilities, such as Windows Setup, can deal with the boot
sector.

When we install WinXP, Setup writes the XP-style boot sector code, which
will look for NTLDR - which will then find the files NTDETECT.COM and
Boot.ini, also in the root of the System Partition, and use those to find
the file ntoskrnl.exe in the Boot Folder (typically C:\Windows - but not
necessarily) to load WinXP.

But Vista and Win7 write different code into the boot sector. This looks
for the file "bootmgr" - no extension - in the Root of the System
Partition. Bootmgr reads the files in the hidden \Boot folder on that
partition; this folder holds the Boot Configuration Data (BCD) which
Vista/Win7 uses to find the file winload.exe in the Boot Folder (also
often - but not always - C:\Windows, the same filename as for WinXP) and
use that to boot Vista or Win7.

When Vista/Win7 Setup discovers an existing WinXP boot sector in the
System Partition, it saves a copy of that sector in a new file in the
Root of the System Partition; this file is typically C:\bootsect.dos.
This is a part of the process of updating the BCD to provide for a
multi-boot system, which will present an operating system menu at each
subsequent reboot.

Later, at each boot, if the user selects to boot Vista/Win7, bootsect.dos
will be ignored, along with NTLDR, etc. But if the user chooses to boot
an "Earlier version of Windows", then bootmgr will step back out of the
way and load the WinXP-style boot code from bootsect.dos, which will find
NTLDR, etc., and load WinXP. After this initial selection, the computer
will see only WinXP code or only Vista/Win7 code; neither will interfere
with the other.


After all that, I still haven't mentioned bootsect.bak. I have both the
.dos and .bak versions of bootsect in my System Partition. Each is
exactly 512 bytes, one sector, with no apparent differences. I'm not
sure how .bak came to be created, but it is dated later than the .dos
file.

Now, let's hope a true techie will fill in the missing links. ;<)

RC
--
R. C. White, CPA
San Marcos, TX
rc@xxxxxxxxxxxxx
Microsoft Windows MVP
Windows Live Mail 2009 (14.0.8089.0726) in Win7 Ultimate x64

"Mikoyan" <Mikoyan@xxxxxxxxxxx> wrote in message
news:eLBlkVUbKHA.1592@xxxxxxxxxxxxxxxxxxxxxxx
Can anyone tell me what bootsect.bak does?




R. C.,

Sounds like something I used to remember back in the old Windows 95/98
days. How I came up with the simple back up wording was because, for kicks
and fun, I am always looking through the files and directories via the DOS
shell. At one point I was installing a program (so long time ago), it
created a back up of the main file names like autoexec.bat with this file
autoexec.bak, preserving the settings while it overwrites the main file in
use with the new settings. This way, should something happens, it can be
reverted back to the old settings via the bak extension.

It's been a long line since that time and this time as I do not install
much programs on my Vista machine that requires such. I can only speculate
until a real techie gets wind of this that any thing with a bak extension
is strictly backed up while the original file is overwritten. Now a days,
you got programs and OS's with that nifty roll-back feature that it can
automatically roll-back anything should it goes wrong.

Since this file in question is "bootsect" I am thinking it has something
to do with backing up partition data. But as I say, I am just only
speculating until a techie comes along and deciphers this.

Thanks R.C. for bringing back something to my memory about backups a
detail further.


--
Gene E. Bloch letters0x40blochg0x2Ecom
.



Relevant Pages

  • Re: bootsect.bak
    ... of Windows, so this answer may not be correct for all versions. ... This first sector on each ... HDD is the MBR - the Master Boot Record. ... there is just enough room to hold the 64-byte Partition Table plus ...
    (microsoft.public.windows.vista.general)
  • Re: OT File recovery Software
    ... > I guess some of you never used the fix MBR command? ... > The Master Boot Record will be created when you create the first ... > partition on the hard disk. ... > first sector on the disk. ...
    (alt.med.fibromyalgia)
  • Re: usb hp floppy drive recognition fedora 4 installation
    ... >> Boot into Linux and copy the boot image from the first sector of your ... You'll want to take 512 bytes of this partition once, ... floppy device may be the SCSI device of 'sdc' or something else. ...
    (linux.redhat)
  • Re: COFF
    ... >>> partition in its partition table. ... >>> system has its own boot sector format. ... disk access is typically done via the BIOS Int 13 functions, ...
    (comp.programming)
  • Re: BootIt NG high level steps - best approach??
    ... backup boot strategy. ... As far as BING, I should tell you I've been using this software ... make managing your bootable options and partition management so much easier. ... drives) and the DATA partition on a mirrored array. ...
    (comp.sys.ibm.pc.hardware.storage)