bomzzz
Platinum Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору ****************************************************************************** *** New options for map were added *** ****************************************************************************** Along with 0.4.2 final, there are two new options for the map command. They are --safe-mbr-hook=SMH and --int13-scheme=SCH. Both are related with disk emulation for use(as smoothly as possible) in the Win9x environment. SMH can take either of the two values 0 and 1. By default, SMH is 1. If you encountered problems of disk emulation under Win9x, you may insert a line of map --safe-mbr-hook=0 before the `boot' command and try again. Also SCH may take either 0 or 1 at present. By default, SCH is 1. If you encountered disk emulation problems under Win9x, you may insert a line of map --int13-scheme=0 before the `boot' command and try again. Note by the way. Like --safe-mbr-hook and --int13-scheme, the MAP command has a few other options that are used for setting global variables. They are here: map --floppies=M M can be 0, 1, or 2. MAP will set a proper value at 0040:0010 by using M. map --harddrives=N N can be between 0 and 127(inclusive). MAP will set 0040:0075 to N. map --memdisk-raw=RAW RAW default to 1. If RAW=0, `int15/ah=87h' will be used to access memdrives. map --ram-drive=RD RD default to 0x7F which is a floppy. If the RAM DRIVE is a hard drive image (with partition table in the first sector), you should set RD >= 0x80 and RD < 0xA0.If the RAM DRIVE is a cdrom image, you should set 0xA0<= RD <= 0xff. map --rd-base=ADDR map --rd-size=SIZE ADDR specifies the physical base address of the ramdisk image. SIZE specifies the size in bytes of the ramdisk image. ADDR default to 0. SIZE is also default to 0, but a size of 0 means 4GB, not a zero-long disk. The RAM DRIVE can be accessed in the GRUB environment using the (rd) device. ****************************************************************************** *** About the DOS utility `hmload' *** ****************************************************************************** This program was written by John Cobb (Queen Mary, University of London). John Cobb's note: To make use of the ram drive feature I wrote a program `hmload' to load an arbitrary file to an arbitrary address in high memory. The program is not very sophisticated and relies on XMS to turn on the A20 line. (Also one must be very careful to steer clear of any areas of memory already in use). Under Linux we generated a disk image `dskimg' (with the kernel and Initrd and a partition table). Using this our boot procedure looked something like this: hmload -fdskimg -a128 fixrb <unload network drivers> grub map --ram-drive=0x81 map --rd-base=0x8000000 map --rd-size=0x400000 root (rd,0) kernel /kernel root=/dev/ram0 rw ip=bootp ramdisk_size=32768 ... initrd /initrd boot See http://sysdocs.stu.qmul.ac.uk/sysdocs/Comment/GrubForDOS/ for details. Update 2007-12-05: Now the MAP command can handle gzipped (rd) image. One can use this feature with the hmload utility. For example, step 1. Load the gzipped image under DOS at a relatively low address: hmload -fdskimg.gz -a16 step 2. Unload network drivers. step 3. Run GRUB.EXE. step 4. At the grub prompt, run these commands: map --rd-base=0x1000000 # set rd-base address to be 16M map --rd-size=<the accurate size of dskimg.gz in bytes> map (rd)+1 (hd0) # This will decompress (rd) and place # the decompressed image at the top end # of the extended memory. The (rd)+1 # here has special meaning and stands # for the whole (rd) device. You must # use (rd)+1 instead of (rd). map --hook root (hd0,0) kernel /kernel root=/dev/ram0 rw ip=bootp ramdisk_size=32768 ... initrd /initrd map --unhook map (hd0) (hd0) # Delete the map; this is needed. boot |