Computing.Net > Forums > Windows 2000 > Boot sector and partition

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Boot sector and partition

Reply to Message Icon

Original Message
Name: softcrypt
Date: December 25, 2002 at 20:36:54 Pacific
Subject: Boot sector and partition
OS: 2k
CPU/Ram: intel
Comment:

if i installed win2k at D: partition, with existing 98 or NT on C: partition,
win2k will overwrite to boot sector in C:, correct(both 98 and NT??)? but, is there any win2K boot sector in D?? so far to my knowledge, every primary or extended partition, if i installed OS on it, there must be a boot sector in the partition.


Report Offensive Message For Removal


Response Number 1
Name: seat6
Date: December 25, 2002 at 21:04:45 Pacific
Reply: (edit)

If you install to C: first, the boot sector will be in C: 2000 will ammend it and give you the dual boot option.


Report Offensive Follow Up For Removal

Response Number 2
Name: softcrypt
Date: December 25, 2002 at 21:25:33 Pacific
Reply: (edit)

well what i wanted to know is, for multiple OS on different partition, there must have a bootsector on each partition. For win98/ME/95/DOS to coexist with winNT or 2K, there is a bootsect image in C:\. but for win2000 or NT to coexists, you won;t find any boot image in the root directory.
so my belief is that the orginal boot sector will call to its boot loader to boot the different boot sector located at different partition as choosen from the boot menu.
so my question is that, does every OS write to the bootsector at which partition it is installed?



Report Offensive Follow Up For Removal

Response Number 3
Name: trvlr
Date: December 26, 2002 at 04:45:30 Pacific
Reply: (edit)

It would seem that each OS writes its own boot sector (to the partition/logical-drive to which the/each OS is installed)...?

If I understand it all correctly... the mbr is on the first HD (start of); this detects the active partition, then transfers control of the boot sequence to the active partition (containing the OS boot sector), thus booting to that OS...

The M$ KB below explains it all?

http://support.microsoft.com/default.aspx?scid=KB;en-us;q140418

Also perhaps:

http://www.nondot.org/sabre/os/articles

And checkout the various resources there; particularly: The Boot Process - and then onto:

Master Boot Record Tut - by Hale Landis

(i.e.)
http://www.nondot.org/sabre/os/files/Booting/mbr.txt)

details the how/why?

A trawl/search via google.com for:

boot sector

will bring up both the above links, and numerous others too.

Possibly Michael (#1???) will come in on this one. I think he's pretty clued up on the boot sector/boot-sequence/process...? (At the least more so than I).

As to how NT (NT/W2K/XP) family involve themselves in single/dual/multi-boots..., and switching around between boot sectors... check out:

http://www.computing.net/windows95/wwwboard/forum/116456.html

- initial posting; and the other reference added in by Tom.


Report Offensive Follow Up For Removal

Response Number 4
Name: wanderer
Date: December 26, 2002 at 09:12:54 Pacific
Reply: (edit)

In answer to your question of "does every OS write to the bootsector at which partition it is installed?" the answer is NO. Your confusion is in that every partition contains a boot sector which is not true. Only the beginning of the disk contains the master boot record.


Report Offensive Follow Up For Removal

Response Number 5
Name: trvlr
Date: December 26, 2002 at 13:41:31 Pacific
Reply: (edit)

Surely...

The mbr contains the data indicating which partition is bootable; that partition contains the bootsector relevant to the OS installed there.?

The MS KB would seem to indicate thus?


Report Offensive Follow Up For Removal


Response Number 6
Name: softcrypt
Date: December 26, 2002 at 21:03:57 Pacific
Reply: (edit)

it is no doubt that every partition "by right" has its own boot sector if an OS is installed there. The MBR only contains master boot code which is to load the OS boot boot sector in, plus a partition table. and MBR is OS independent and shouldn't be overwritten by any OS!, unless there is a change in the partition table, but the MBC(Master boot code) portion should REMAIN INTACT anyway.
So i just wanted to verify if my claims following here are correct:-
1. Installing win98 along side windows2K or the other way around, there is no change in the MBR, unless there is a change (which is often the case???)in the partition table., or the active partition flag which is also part of the partition table. I wanted to know, what are the changes if any to the MBR if i try to install win98 along side win2K.,and the other way around(win2k along side win98), and what is/are that changes for?
2. Obviously, win2k overwrite the boot sector of win98 no matter you install win2k to the same partition of win98 or on a new partition. Otherwise, win2k won't go and create the bootsect.dos image in the root directory. I don understand why the win2k or even NT behave this way., except that it has to do with the 1024 cylinder limit., i.e the active boot sector should always reside below the 1024 cylinder limit.

3. To those familiar with Linux, the statement "install LILO at MBR" is wrong totally or very confusing at best. Why should LILO go to MBR?? it is a boot manager like ntldr, how can a boot manager reside in MBR?? unless it is trying to mean modifying the partition table of the MBR, which the only thing it supposed to do is setting the active partition to the linux partition!



Report Offensive Follow Up For Removal

Response Number 7
Name: softcrypt
Date: December 26, 2002 at 21:09:27 Pacific
Reply: (edit)

refer to my post above..


Report Offensive Follow Up For Removal

Response Number 8
Name: Michael
Date: December 27, 2002 at 00:33:07 Pacific
Reply: (edit)

Looks like you get your wish trvlr.

I'd stayed out of this as what the actual code is (and does) in the 1st Sector of a drive is still partly a mystery to me. The MS MBR does only look for an ACTIVE partition's boot sector. The boot sector actually locates the boot loader file/s within the file system (some how - it is extremely difficult to try and compare MS sector counts with the drive's geometry, and the BIOS LBA handling, and the INT13 calls and the little endian notation screws this around also) . Yes, there is only one NTLDR used to boot and it is located in the Active partition. What NTLDR actually does, in detail, is not publicly known (or not widely).

What follows is from using Microsoft's DiskProbe.

One of my HDD's has 2 partitions, primary and extended. There are 6 drive letters, only one of which contains an OS. That drive's (the OS drive) Sector 0 starts out with the EB 5B and sure enough, there is a FA instruction at 5B bytes from there (offset 5D). And the text at the end would seem to indicate that it is a boot sector:

A disk read error occurred...A kernel file is missing from the disk...A kernel file is too discontiguous... Insert a system diskette and restart the system... NTLDR is compressed.

Format is NTFS, not that it matters. A FAT data drive has the same messages. While another FAT data drive has:

BOOT: Couldn't find NTLDR. BOOT: I/O error reading disk...Please insert another disk.NTLDR

Another drive has:

Invalid system disk...Disk I/O error... Replace the disk, and then press any key IOSYSMSDOS SYS...WINBOOT SYS. This is a FAT32 data drive.

All the drives have the 55 AA End of Sector marker, of course. I am fairly sure that I am reading the correct sectors as the BPB (Bios Paramater Block) does change.

To see if there was a correlation between OS and boot sectors. I moved one of my W2k OS's from drive to drive. Formatted the old drive, installed XP on it. The drive Sector 0 didn't look to have changed. Which only proves that all NT type OS's MAY have the same boot sector (although I remember reading about some change MS had made). It could also be that the MS formating programs automatically put a boot sector down on Sector 0 during the format process. I don't know.

NOW, the reason I did respond: softcrypt

Re your #3: Don't confuse the Microsoft MBR code with anything else that uses physical disk sector 0 to boot an OS. A net search will provide lots of "build your own boot loader code". Linux's LILO is actually part one of the kernel. It does rewrite the MBR. So the statement that you and I both read somewhere "the MBR is OS independent" is only correct for the Microsoft OSs. Here is a cut and paste from one of the things I have on the LILO boot loader:

This MBR code is only the 'first stage' of the complete LILO program. You can find documented sources by LILO's author, Werner Almesberger, on most Linux archive sites. Try looking here first: sunsite.unc.edu/pub/Linux/system/boot/lilo/ for the archive, lilo-21.tar.gz or higher. The code for the MBR is found in the file, first.S, whereas the much larger portion of the Assembly code is found in the file, second.S.

I have the file, just haven't reinstalled a real Linux that can uncompress it yet (one downfall of the Knoppix CD). I have a copy of a brief discussion on the actual code, but it is nothing to write home about.

For your #1: you are right, nothing is changed in the MBR. Take a look at the code on dougknox.com if you want the quickest way of making a bootsect.dos file.

For your #2: Take a look at the boot sequence and you will see why there is that difference between the 9x and NT boot sectors. 9x calls for the IO.SYS and MSDOS.SYS files. NT type OS's call for NTLDR. It is actually the BIOS and NTLDR that had the 1024 limitation - and the 7.8GB limitation.


Report Offensive Follow Up For Removal






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 2000 Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge
Poll History




Data Recovery Software