From Newsgroup: comp.os.msdos.misc
On 9/26/20 3:26 PM, R.Wieser wrote:
Grant,
Hi Rudy,
And you're quite right in that. As JJ made clear to me, I (somehow)
threw the MBR and VBR steps together.
;-)
As far as I can tell, you don't. But as long as all your OSes are
put into primary partitions there simply is no space elsewhere.
No, I was asking why I have to install the Linux boot loader into the
MBR vs the PBR (a.k.a. VBR)
That makes me think that I've never tried to make a logical drive in
a secondary partition bootable ...
What do y ou mean by "/secondary/ partition"?
I'm used to "primary" / "extended" / "logical" partitions in the MS-DOS PC-BIOS nomenclature.
..... Thats not quite true. I once did put several DOS versions into logical volumes in an extended partition, but could not successfully
boot those DOS volumes, because the OS itself expected to be in the
first, primary partition. Bummer.
I think it only mattered that it was a /primary/ partition, not a
logical partition. At least as far as booting is concerned. (Things
other than io.sys, msdos.sys, command.com, config.sys, and autoexec.bat,
can tend to be anywhere and referenced, even in logical partitions on
other drives.)
Aside: Have you ever played with having more than 24 primary + logical partitions? MS-DOS gets unhappy and complains about running out of
drive letters.
Almost. It as easily could load the first sector of an extended
partition (which behaves as another MBR). Which than ofcourse goes
nowhere (no "active partition" flag set) and the machine simply fails
to boot.
I don't think so.
The testing that I did today, along with the recent reading, /really/
suggests that the boot code that MS-DOS puts in the MBR really does
search for the active partition and then loads the VBR / PBR (depending
on what you want to call it). ... Keep reading.
Hmmm... that sounds mighty strange. You didn't touch the MBR when installing LILO, but rewriting it afterwards (while not removing LILO)
made the problems go away ?
That's correct.
Thats odd.
No, it's not.
Take a blank (or first part zeroed) drive and:
1) Partition it into three partitions:
/dev/hda1 - 28 MB for DOS
/dev/hda2 - 2 GB for Linux
/dev/hda3 - 256 MB for swap.
2) Install Linux into the 2 GB partition.
3) Install LILO into the 2 GB partition.
The system won't boot. Here's why. There is no boot code in the MBR.
The only thing in the MBR is the partition table.
The only thing that partitioning did to the MBR was alter the partition
table. The rest of the MBR, specifically the boot code at the start of
thee MBR, is still zeros. Thus there is nothing for the system to boot.
Formatting (/s or otherwise) C: (/dev/hda1) and installing MS-DOS
doesn't even make the system bootable. Neither does SYSing C:.
Here's the kicker: Both LILO (as used in this case) and SYS (or format
/s) install the PBR (VBR) inside of their respective partitions
(volumes). As such, the actual boot code remains blank. Hence why the
system won't boot.
Enter "fdisk /mbr". fdisk /mbr installs the boot sector code inside of
the MBR. This boot sector code searches for the active partition and
chain loads the PBR (VBR) of the active partition.
Almost as if it would not have booted /before/ installing LILO
either ...
I hope you can tell that installing LILO into the partition puts it in
the PBR (VBR), which is not in and of itself enough to boot the system.
There /must/ be some boot code in the MBR.
Did you still have LILO pop up afterwards ?
Yes, LILO worked perfectly fine /after/ doing the fdisk /mbr.
Remember, LILO wasn't working at all /before/ doing the fdisk /mbr.
So ... you'll love this ... fdisk /mbr actually /fixed/ LILO.
Or was it gone ?
Nope. LILO was exactly like it had been left.
Remember:
1) LILO was in the PBR (VBR), not the MBR.
2) fdisk /mbr altered the MBR, not the PBR (VBR).
3) PBR (VBR) rea MBR. They are two completely different places.
If so, how ?
fdisk /mbr provided the boot code that goes into the MBR.
Said boot code chain loaded the PBR (VBR) of the active partition.
I can change what OS the system boots simply by twiddling which
partition is active.
It does when everything works and is configured correctly / as
expected.
Please clarify your statement. I can't tell if you are agreeing with my statement (copied below for convenience).
"It seems to me that the MBR does something other than searches for a
specific OS file to load and start."
Or if you are defending your original statement (copied below for convenience).
"MBR code which searches for a specific OS file, and than loads & starts
it."
But again, moving that "active" flag to another record ...
isn't difficult - especially not under DOS.
No it is not.
... (even if it /doesn't/ point to a primary partitions VBR) ...
I don't think it's possible to boot (as in load a PBR (VBR)) from an /extended/ partition.
Remember that an /extended/ partition is a special /primary/ partition
in that it contains additional partitions.
At least it's not possible with the tools that Microsoft has provided,
be it MS-DOS or subsequent OSs. This probably extends to the boot code
that Microsoft's fdisk installs with fdisk /mbr.
Perhaps other non-Microsoft boot code -- which can be installed in the
MBR -- does support this.
Aside: I've not tested getting LILO or GRUB to chain load things from /logical/ partitions as I personally try to avoid them. I feel that
/logical/ partitions are an unnecessary abstraction layer. If I don't
need it, I don't use it. Seeing as how I can use primary partitions
directly. Well, there haven't been very many /extended/ partitions
around me.
I'm not at all sure which question that was, but you're welcome. :-)
I think the question was "Why doesn't LILO (or GRUB) boot a system when
it's installed to a partition (PBR / VBR) and the partition is marked active?".
I've come to learn that the answer is that neither LILO nor GRUB install anything into the MBR when they are installed into the PBR (VBR), and
that the system requires boot code in the MBR to be able to boot.
--
Grant. . . .
unix || die
--- Synchronet 3.21d-Linux NewsLink 1.2