It was some time ago, and here is the fomular i used.
To make grub floppy:
# cd /usr/share/grub/i386-pc
# dd if=stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out
# dd if=stage2 of=/dev/fd0 bs=512 seek=1
153+1 records in
153+1 records out
#
To make a bootable CD-ROM image, first, make a top directory for the bootable image, say, `iso': $ mkdir iso
Make a directory for GRUB: $ mkdir -p iso/boot/grub
Copy the file `stage2_eltorito': $ cp /usr/lib/grub/i386-pc/stage2_eltorito iso/boot/grub
If desired, make the config file `menu.lst' under `iso/boot/grub' (*note Configuration:

, and copy any files and directories for the disc to the directory `iso/'.
Finally, make a ISO9660 image file like this: $ mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \ -boot-load-size 4 -boot-info-table -o grub.iso iso
There must be a better way to make the CD now(?).