No subject


Tue Sep 22 08:47:19 PDT 2009


First post of Tinybit:
http://www.boot-land.net/forums/index.php?showtopic=8457

Post #4 (Tinybit)
========
The lower word of install_partition should be 0xFFFF, so you need not
touch it. The highest byte(8-bit) of install_partition should be 0. The
less significant byte is the actual partition number and should be
adjusted, i.e., for 0x00PPFFFF, the PP should be adjusted. Some
devices(floppy, cdrom) use the "whole drive"(read "unpartitioned"), so the
PP should be FF.
========

You shouldn't set the install_partition variable yourself. It won't work,
or at least not for grub4dos (grldr).

Post #22
========
Before jumping to the entry point at the very beginning of GRLDR, you
should setup DL=(BIOS drive) and DH=(partition number). For partition
numbers, 0 - 3 are primary, 4 - 0xFE are logical. (DH=0xFF) stands for
whole drive(unpartitioned). DH will later be passed to
install_partition(the third byte, from bit 16 to bit 23).
========

Setting DL (BIOS drive) and DH (partition number) let grub4dos search for
its menu.lst file on that partition first.

Setting DL (used by almost all bootsectors to know the boot drive) is
already implemented in chain.c32

Setting DH is also added in recent versions of chain.c32:
/*
* grldr of Grub4dos wants the partition number in DH:
* -1:   whole drive (default)
* 0-3:  primary partitions
* 4-*:  logical partitions
*/
regs.edx.b[1] = whichpart-1;


So you can try if Grub Legacy uses DH to sets its root partition or not:

  # Set root partition to third primary partition
  chain.c32 hd0 3 grub=/boot/grub/stage2

I hope this info is useful.

- Gert Hulselmans



More information about the Syslinux mailing list