OK, here is some info.
I am assuming that you already can boot both DOS (the one from Windows 98 aka 7.1) and PE from USB without problem.
Version 1)
NORMAL DOS INSTALL.
Format the key as usual, including SYSTEM files IO.SYS MSDOS.SYS COMMAND.COM
Verify that it boots.
Add to the key the /I386 directory
Add to the key GRUB.EXE and the following MENU.LST:
QUOTE
# This is a basic menu.lst file for GRUB4DOS
# Following is the timeout for the default choice
# By not pressing any key during the timeout, the default will be chosen
timeout 10
# Following is the menu item that will default
default 0
# This reflects the "normal" behaviour of a PC
# i.e. booting the first partition of first harddisk
# By setting it as default with timeout 10 seconds (see above)
# We try to replicate somehow the "Press any key to boot from CD..." message
# of Microsoft Install CDs, this way if no key is pressed, as an example for
# unattended installs, the system will boot "normally" even if CD is inserted
# of course if the "any" you press is [ENTER]system will boot from this entry
title Boot Hard Disk MBR on (hd0,0)
chainloader (hd0,0)+1
rootnoverify (hd0)
title NTLDR
# This entry simply tries to load a NT/Win2K/XP/2003
# system ALREADY on your hard disk using the NTLDR/NTDETECT.COM
# and boot.ini on the CD
chainloader /NTLDR
If you have your SETUPLDR.BIN renamed as NTLDR in the root directory, it should work.
Alternatively, try adding the following to menu.lst:
QUOTE
title SETUPLDR.BIN
# This entry simply tries to directly load BartPE
# from SETUPLDR.BIN in the /I386 directory
chainloader /I386/SETUPLDR.BIN
version 2)
Through NTLDR
Format the key as usual, including SYSTEM files IO.SYS MSDOS.SYS COMMAND.COM
Verify that it boots.
Copy to the stick bootpart and use it to make a bootsector with DOS Win9x code, say C:\bootsect.dat
Use bootpart to rewrite the NT/2K/XP bootsector.
Copy to the stick NTLDR and this BOOT.INI:
QUOTE
[Boot Loader]
Timeout=5
Default=C:\Bootsect.dat
[Operating Systems]
C:\Bootsect.dat="Windows 98 Command Line" /win95
C:\GRLDR="GRUB"
Add to the stick GRLDR and menu.lst
version 3)
Direct GRUB4DOS+DOS (win9x).
Format as usual, as above.
Copy to the stick GRLDR, menu.lst and bootlace.com, use it to install GRLDR as the main bootmanager in the MBR.
use the options:
--force-backup-mbr
--boot-prevmbr-first
--time-out=5
--hot-key=3920
This way if the SPACEBAR is not pressed within 5 seconds, GRLDR will boot, otherwise the normal DOS will.
The above are just examples, another way is using simply a Floppy image for the DOS booting, in this
case you need an entry in menu.lst along these lines:
QUOTE
title Win98SE (Win98SE.ima)
# This image has been set to boot using directly the GRUB bootloader
# You might also want to experiment with compressed images and memdisk
# The image is first mapped to memory as first floppy
# then Int13h is hooked
# finally the 1st sector of floppy is chainloaded and booted
map --mem /IMAGES/Win98SE.ima (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title Win98SE (Win98SE.ima.gz)
# This image has been set to boot using directly the GRUB bootloader
# This example uses a compressed image (gzipped)
# The image is first mapped to memory as first floppy
# then Int13h is hooked
# finally the 1st sector of floppy is chainloaded and booted
map --mem /IMAGES/Win98SE.ima.gz (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title Win98SE (Win98SE.imz) memdisk
# This image has been set to boot using memdisk
# Using memdisk instead of direct GRUB booting
# If the compressed image does not boot through memdisk you can always
# try to uncompress it and use it with direct GRUB booting
kernel /IMAGES/memdisk.gz
initrd /IMAGES/Win98SE.imz
Boot
Instead of the floppy image one can use a partition image, there are so many possibilities that it's impossible to list them all.
If on the stick there is also GRUB.EXE it is possible to re-start GRUB from the DOS command line without rebooting.
Please NOTE that GRUB paths/filenames are CaSe SeNsItIvE!
jaclaz