Re: [9fans] Grub Boot Problem



On 3/28/06, Russ Cox <rsc@xxxxxxxxx> wrote:
I think I get what you mean, but why would it swap the drive letters ?
I mean if grub already found the right partition and started it, why
would it then mess up while calling 9load ?

PCs are only meant to boot from the first hard drive.
Grub does some kind of magic that I don't fully understand
to convince the BIOS to pretend that the second hard drive
is the first and vice versa. If that doesn't get through to
pbs/pbslba or gets through the wrong way, then pbs/pbslba
could easily end up looking at the wrong disk for the 9fat
partition.

Russ


It's really not that magical. The BIOS itself has to map interrupt
0x13 (which is originally the floppy controller from way back before
hard disks were available in PCs) to 0x40. Then 0x13 has to deal with
things that are really floppy requests and subsequently call 0x40.
(bit 7 being high in the DL register meant it was a hard disk...
anything else was a floppy drive)

Replacing interrupt handlers in DOS was very commonplace. It should
be possible to remap which disk is being booted from (CMOS parameters
do this, and so can GRUB, just like you could in DOS.)

0x80 is typically C:
0x81 is typically D:

Machines (and BIOSes) after 1995 typically could support 4 drives.

Hmmm, that semester of 16bit PC assembly in college just came in handy
I guess.... (I admit, I had to look at my notes :-)

It used to be fun to rewrite the keyboard interrupt (0x9 IIRC) such
that it would dork around with the vga panning registers everytime
someone hit spacebar. DOS was so hackable.

Dave
.



Relevant Pages

  • Re: Mehr als eine primaere Partition (FAT16 und FAT32)
    ... >>Ich hatte auf der zuerst angelegtem primären Partition PC DOS FAT16, ... >>Mir wurde zwischenzeitlich Grub empfohlen. ... > XP kennt sowohl DOS als auch W98 bzw. deren Partitionstypen. ... Next by Date: ...
    (de.comp.os.msdos)
  • Re: [opensuse] can I add dos 6.22 to grub without using a separate partition
    ... can I add dos 6.22 to grub without using a separate partition ... I know I can create a small partition and install the floppy contents thee and add the requisite entry to grub. ...
    (SuSE)
  • Re: [9fans] Grub Boot Problem
    ... I mean if grub already found the right partition and started it, ... PCs are only meant to boot from the first hard drive. ... pbs/pbslba or gets through the wrong way, ...
    (comp.os.plan9)
  • Getting to DOS with Grub -- is my linux box fried?!
    ... I have an older machine that has win98 on one partition and mandrake ... partitions other than the dos partition from dos using dos fdisk and ... I load into the grub shell (mandrake used grub as its ...
    (comp.os.linux.setup)
  • Re: Getting to DOS with Grub -- is my linux box fried?!
    ... > Partition Magic or a similar program available, ... > and put linux back on one and make the other a common data partition ... > partitions other than the dos partition from dos using dos fdisk and ... I load into the grub shell (mandrake used grub as its ...
    (comp.os.linux.setup)