T
Timothy Daniels
iforone said:Read the info in the URL I posted above - very informative
The only URL posted "above" in this thread leads to an
inaccessible .gif file. Did you post it under another name?
*TimDaniels*
iforone said:Read the info in the URL I posted above - very informative
iforone said:Read the info in the URL I posted above - very informative
Yes - that's the one (GNU.org) that I'm talking about ;-)Timothy said:If you're referring to the gnu.org site that you posted
further along in the thread, that *does* look informative.
Thanks for that one.
*TimDaniels*
It's all at that URL - but here's another with some info;
http://en.wikipedia.org/wiki/GNU_GRUB
** GRUB boot process **
The BIOS finds a bootable device (hard disk) and moves control to the
master boot record (MBR, the first 512 bytes of the hard disk).
The MBR contains GRUB stage 1. Given the small size of the MBR, Stage 1
does little more than load the next stage of GRUB (which may reside
physically elsewhere on the disk). Stage 1 can either load stage 1.5,
or it can load Stage 2 directly.
GRUB Stage 1.5 is located in the first 30 kilobytes of hard disk
immediately following the MBR. Stage 1.5 loads Stage 2.
GRUB Stage 2 (loaded by Stage 1 or 1.5) receives control, and displays
to the user the GRUB boot menu.
ntldr is right where it normally is, on C:\. The Windows install
on my machine is completely usual. The ONLY differences
are that I've copied the Linux boot-sector (it's just a 512-byte
file, no need for it to "understand" NTFS) onto C:, and I've
edited boot.ini to give the option of passing control to that
Linux boot-sector ("Grub stage one" as iforone more
accurately describes it).
"Normal", yes, but edited.
If I choose Windows, ntldr loads Windows. If I choose Linux,
ntldr passes control to Grub stage one (those 512 bytes in
a file on C, which then passes control to "the real" Grub,
which is residing on an ext3 partition along with the rest of
GNU/Linux. Grub can then load and boot Linux, or pass
control back to ntldr.
Arno Wagner said:Caution! The MBR that "looks for the "active" partition" is
already an MS MBR. Others may do something else as, e.g.,
the Grub MBR does.
OK, what is the boot process up to the point that
grub is started, beginning with the selection of the MBR
by the BIOS?
In comp.sys.ibm.pc.hardware.storage Timothy Daniels said:"chrisv" responded:
For that edited boot.ini file (with its entries
"default=c:\bootsect.lnx" and "c:\bootsect.lnx="Linux")
to be understood, it must be read by software other
than ntldr since that is not part of the normal boot.ini
syntax. Could that software be grub?
What is an "ext3" partition? Is it a kind of Extended
partition? If so, why was an Extended partition chosen
over a Primary partition?
In comp.sys.ibm.pc.hardware.storage Timothy Daniels said:So grub/Linux has has its own type of MBR?
In comp.sys.ibm.pc.hardware.storage iforone said:A Further Synopsis...
The MBR/MPT does /not/ have to have an Active/Boot flag set for GRUB
(Linux)--
but AFAICT
windoze WILL overwrite it as soon as you try to boot from it. I have
disabled the Boot flag from hda1(win98 Primary) and rebooted into it,
and what do you know - it's back - set as "Boot" when I check it with
cfdisk after rebooting to linux.
With Linux, the boot flag could be active or not - it doesn't matter
AFAICT.
No. It is loaded by the NT loader and it does understand
the boot.ini syntax above. Grub comes later. Actually Grub is
in bootsect.lnx in this configuration.
Arno Wagner said:It has its own executable code in the MBR. Apart
from that the MBR is the standard DOS type, listing
the disk geometry and the 4 primary pattitions, so
I would say it is the standard MBR with boot-code
by Grub and not Microdift. A matter of interpretation ;-)
Arno said:I think it is the other way round: Windows will not boot if its
boot partition is not set active. Therefore the ususl Grub configuration
will set it active before booting with the chainloader. Example
from my Grub menue file:
title Trash-OS /dev/hda1
root (hd0,1) <== The Partition that is c:\ under Windows
makeactive <== Set active flag
chainloader +1 <== boot from partition
The kernel does not care. It gets told on the kernel command line
which partition contains the root filesystem ("/", "aquivalent to
"c:\" an Windows). Alternatively the root partition specification
can be hard-coded into the kernel binary.
Example from my Grub menue file:
title Linux 2.6.15.4 /dev/md1
kernel (hd0,0)/2_6_15_4 root=/dev/md1
This loads the file named "2_6_16_4" from the first disk,
first partition, as kernel and tells it to use /dev/md1 as its
root partition.
The thing is that Grub is filesystem aware and
can load regular files.
Arno
Timothy said:"Arno Wagner" replied:
Well, that "c:\bootsect.lnx" is understood by ntldr makes sense
because "x:\" in a pathname is only understood (AFAIK) by
Windows/DOS. But that implies that grub need not be part of the MBR
or of the "active" partition's boot sector since those are
encountered prior to ntldr getting control.
And it sounds that up to the point of ntldr getting control, the
MS-supplied MBR and boot sector can be used in the boot process for
both Windows and Linux, and that the Linux-specific code (i.e. grub)
can be handed control by ntldr according to the user's selection of
entries from boot.ini . If that is true - that ntldr can be told
to hand off control to grub - it can also be told to hand off
control to any Linux OS in the system as long as its startup file
can be designated by boot.ini . In other words, Windows' multi-boot
manager, ntldr can do multi-booting of Windows OSes as well as Linux
OSes,
and grub is not
even needed if you have Microsoft's MBR and boot sector (which I
suspect are generic PC items) and Microsoft's boot files.
I'm reaching a bit - and my brain is starting to hurt - but I have
those exact same entries in GRUB for win98 (except mine's --> root
(hd0,0)) -- I guess it's because of my GRUB 'chainloader +1' entry for
windoze that causes that small bit of grub code in the MBR to seek out
it's 1.5 and 2.0 stages - which then passes control to the DOS IO.sys
file in 98 (located at hda1, offset by 63 heads(?), which also contains
an 'active' flag -- I guess in essence, an Extended boot record or
EBR)....BTW - this can get very complicated once you start looking at
the Assembly language, offsets, and jump code -- note; FAT32 uses a
larger BPB than FAT16, and NTFS uses some 'reserved' bytes (4-6 bytes)
between the 440bytes of the MBR code and the 64bytes of the MPTs.
Has anyone been looking into the way the newer EFI (Extensible Firmware
Interface) interacts, since it will shortly replace our typical BIOSes
and also even a mini kernel image;
title Debian GNU/Linux, kernel 2.6.8-2-386 (recovery mode)
root (hd0,6)
kernel /boot/vmlinuz-2.6.8-2-386 root=/dev/hda7 ro single
initrd /boot/initrd.img-2.6.8-2-386
savedefault
boot
I haven't yet looked into the standard Legacy GRUB vs GRUB 2.0
differences yet.....I only mention to avoid confusion - and to clarify
just what we are discussing (note; That's why I'm sure to mention the
98 vs NT diffs too).
In comp.sys.ibm.pc.hardware.storage Timothy Daniels said:"Arno Wagner" replied:
Well, that "c:\bootsect.lnx" is understood by ntldr makes
sense because "x:\" in a pathname is only understood
(AFAIK) by Windows/DOS. But that implies that grub
need not be part of the MBR or of the "active" partition's
boot sector since those are encountered prior to ntldr
getting control. And it sounds that up to the point of ntldr
getting control, the MS-supplied MBR and boot sector
can be used in the boot process for both Windows and
Linux, and that the Linux-specific code (i.e. grub) can be
handed control by ntldr according to the user's selection
of entries from boot.ini .
If that is true - that ntldr can be
told to hand off control to grub - it can also be told to hand
off control to any Linux OS in the system as long as its
startup file can be designated by boot.ini .
In other words,
Windows' multi-boot manager, ntldr can do multi-booting
of Windows OSes as well as Linux OSes, and grub is not
even needed if you have Microsoft's MBR and boot sector
(which I suspect are generic PC items) and Microsoft's
boot files.
In comp.sys.ibm.pc.hardware.storage Timothy Daniels said:Why would there need to be grub-specific code in
the MBR?
All that the MBR has to do is to read the
partition table and find the "active" partition and pass
control to the boot sector there.
Previous postings in
this thread claim that ntldr then gets control, just as it
would for Microsoft booting, so there must not be
anything in the MBR or the boot sector that *has* to be
Linux-specific.
It sounds as if the Linux-specificity can
be put off until ntldr hands control to grub/lilo or
whatever loads Linux.
Arno said:Unfortunately untrue. ntldr cannot boot windows, only
another boot-manager.
In comp.sys.ibm.pc.hardware.storage chrisv said:Arno Wagner wrote:
Of course, you meant to say "ntldr cannot boot Linux"
chrisv said:I tell ntldr to use the Linux boot-sector that I've copied to my C:
partition. It then passes control to Grub, which has been installed
on my / Linux partition. Only the C: partition is active.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.