Hi! I assume ms-sys on Linux is something like sys-freedos-linux
(sys-freedos.pl) and makebootfat and bootlace, but for MS DOS?
What is the license, where can you find it, how flexible is it?

> GRUB4DOS can load the FreeDOS kernel.sys directly. I have used
> it to do so on USB drives.
> Another option would be just using ms-sys on Linux with the -p4
> or -p5 switches (depending on if the volume is FAT16 or FAT32.)

As there was so much talk about how "generic" GRUB4DOS can be,
I checked the internet and found some very interesting infos on:

grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial and
svn.gna.org/svn/grub4dos/trunk/README_GRUB4DOS.txt my notes are:

GRLDR can be loaded by MBR, boot sector, NT family boot menu
boot.ini (boot sector?) file and as eltorito boot file (!).

GRUB.EXE can be loaded from the DOS prompt AND as a DOS device
but also as if it were a Linux kernel file.

GRLDR.MBR can be loaded as boot.ini as if it were a boot sector: It
can scan FATnn/EXTn/NTFS partitions for GRLDR files and load the 1st
but seems to prefer non-NTFS and active/bootable primary partitions.

NOTE: MS DOS DEVICE allows 4k long command line options, interesting!

mkisofs -R -b grldr -no-emul-boot -boot-load-seg 0x1000 -o X.iso /Y/
loads the whole grldr, but some bioses only load the first 2k, bad

mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o grldr.iso /Y/
loads only one sector

NOTE: No-emulation-mode means the CD/DVD will be accessible via
int 13, and GRUB scans all drives 80-ff for such CD/DVD items.

You can even boot GRLDR via PXE over the network...


The filename GRLDR shouldn't be changed. If GRLDR is in a NTFS
partition, it should be copied to the root directory of another
non-NTFS partition(and likewise should the menu.lst file be).

...BIOS drive number must be passed in CPU register DL...
Boot Record Layout(s) for EXT2, EXT3, FAT1x, FAT32, NTFS
etc are explained on the README_GRUB4DOS page, too... :-)

NOTE: Offset 2 must be 90 for CHS, 0e for LBA, Win9x needs it.

The bootstrap code of GRLDR.MBR only finds GRLDR file in the
root dir of a partition. While the startup code of grldr might
fail to load GRLDR in NTFS partitions, it always successfully
loads GRLDR in FAT partitions (and even in ext2/ext3 partitions).

"Note that NTLDR only loads the startup code of grldr (i.e.,
the leading 16 sectors of grldr), not the whole grldr file."

> binary file  main source file  other files
> grldr        grldrstart.S      pre_stage2(binary)
> grldr.mbr    mbrstart.S        grldrstart.S
> grub.exe     dosstart.S        pre_stage2(binary)

(pre_stage2 is the main body of GNU GRUB... it also copies
a backup of the first 640k to 2 MB, and restores it to let
you return from GRUB to DOS without booting another OS...)


NOTE: GRLDR (as a no-emulation-mode bootable CDROM image) was adapted
to cope with some buggy BIOSes (e.g. VirtualPC). LBA-to-CHS geometry
translation was added in int13_handler to simulate LBA (EBIOS) on
CHS-only drives


... so you have:

GRLDR - header useable as MBR, normal or ElTorito boot sector.
  Scans for GRLDR file to load rest of itself. GRLDR.MBR is
  the same, but only the first sector of it, I would say...
GRUB.EXE - loadable as DOS EXE, DOS DEVICE and Linux kernel
  I probably forgot some other magic boot methods :-)


Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
Freedos-user mailing list

Reply via email to