[NTLUG:Discuss] Re: Lost boot Loader -- mapping BIOS to Linux devices at boot ...
Bryan J. Smith
b.j.smith at ieee.org
Wed Nov 3 12:42:19 CST 2004
[ Why are we talking off-list? ]
On Wed, 2004-11-03 at 10:59, Terry Henderson wrote:
> Correct me if I'm wrong here, but just because you boot from a
> different boot disk from a different distro, it's not going to
> re-write any files that already exist on the Hard Drive.
> (We're not installing grub here, we're only wanting to re-write the
> master boot record.)
Correct. But the MBR relies on proper BIOS-device mapping.
GRUB normally assumes /dev/hda is hd0 (BIOS disk 80h).
If /dev/hda does not exist, it assumes /dev/sda is hd0.
If you're using an off-chipset ATA controller, then /dev/hde might
be hd0.
Not sure if GRUB will assume this if /dev/hda doesn't exist.
And if you have hard drives attached to both/all /dev/hda, /dev/hde
and/or /dev/sda, then it most certainly needs that mapping file.
Running "grub-install" from the Linux installation will read the mapping
file. The distro itself knows where this is.
But if you run "grub-install" from a CD, floppy or other distro that
does _not_ know what the local distros "mapping" file is (again, it is
/boot/grub/device.map on Fedora -- it _varies_wildly_ between distros),
then it will not look up that device.
That's why you should _always_ use the distro's own "rescue" method.
> If the above sentence has any relevance, please advise.
I just explained it above. No offense, but boot issues this is why I
make "the big bucks" when it comes to complex SAN, cluster and other
storage configurations. ;-ppp
GRUB must know what Linux device is hd0 (BIOS disk 80h) so
it installs the MBR on the proper disk.
BIOS disk 80h is the first fixed disk discovered by the BIOS at boot.
It is the disk where the code at FFFFh page (FFFF:0000h segment:offset)
in the BIOS when a processor in Real86 mode (8086) boots knows to get
the MBR from.
Additionally, GRUB aligns disk mappings as appropriate for various boot
images. It may not be able to read this file either.
You'll notice the _first_ entry in any GRUB line has a "hd#,#" portion.
It is those mappings that are _key_ to booting.
Here's an example /boot/grub/device.map on my system:
(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/hde
(hd3) /dev/hda
I must tell GRUB _how_ the BIOS assigns my disks _in_order_ (especially
hd0 / BIOS disk 80h). In my system, this is:
1. 3Ware Escalade 6410 RAID Volumes 1 and 2 (sda and sdb)
2. High Point Technologies HPT368 ATA Disk 1 (hde)
3. On-chipset AMD766 ATA Disk 1 (hda)
The great thing about Linux is that it can boot from _more_ than just
one storage device at boot, and map all sorts of disks as you see fit.
NT can only load 1 storage device driver, and has all sorts of mapping
issues at boot.
<side note>
This is why it was not surprising when EMC Corporation bought out
VMWare. Because running NT virtualized under Linux allows far greater
and more complex access to SANs than NT's limitations (or for any guest
OS for that matter).
</side note>
> You're wrong about my intentions,
You weren't the only one who responded. Don't take it personally. I
have seen this repeatedly on other lists. That's why I gave my opinion.
> I could care less if anyone likes Slackware more than Fedora, or Mandrake
> more than SuSe, or Coke more than Pepsi. I could care less. (I think
> you confuse me with someone who has ulterior motives.)
The key is I rather tire of seeing responses not only where it's "use
this distro," but following that answer could _damage_ the installation
already in use!
> If I've mislead or lead someone astray, I'm truly sorry and assure you
> it was not my intention. ... cut ...
And I'm not singling you out. I didn't even respond to you.
> If I've caused a disaster, I'm sorry.
Just _never_ recommend someone use another distro to fix a boot-time
issue when the vendor offers a "rescue" disk.
_Only_ consider it _when_ the "rescue" disk doesn't work.
There is a reason why I push this viewpoint _hard_.
Someone massively screwed up a server on me once.
Don't take personal offense.
> Thanks for your opinions, you've made a good point, [but it's not me
> your talking about].
I know. Why did you assume such?
--
Bryan J. Smith b.j.smith at ieee.org
------------------------------------------------------------------
"Communities don't have rights. Only individuals in the community
have rights. ... That idea of community rights is firmly rooted
in the 'Communist Manifesto.'" -- Michael Badnarik
More information about the Discuss
mailing list