📄 memdisk.doc
字号:
$Id: memdisk.doc,v 1.10 2004/04/27 06:49:36 hpa Exp $[This documentation is rather crufty at the moment.]MEMDISK is meant to allow booting legacy operating systems via PXE,and as a workaround for BIOSes where ISOLINUX image support doesn'twork.MEMDISK simulates a disk by claiming a chunk of high memory for thedisk and a (very small - 2K typical) chunk of low (DOS) memory for thedriver itself, then hooking the INT 13h (disk driver) and INT 15h(memory query) BIOS interrupts.To use it, type on the SYSLINUX command line:memdisk initrd=diskimg.img... where diskimg.img is the disk image you want to boot from.[Obviously, the memdisk binary as well as your disk image file need tobe present in the boot image directory.]... or add to your syslinux.cfg/pxelinux.cfg/isolinux.cfg something like:label dos kernel memdisk append initrd=dosboot.imgNote the following:a) The disk image can be uncompressed or compressed with gzip or zip.b) If the disk image is one of the following sizes, it's assumed to be afloppy image: 368,640 bytes - 360K floppy 737,280 bytes - 720K floppy 1,222,800 bytes - 1200K floppy 1,474,560 bytes - 1440K floppy 1,720,320 bytes - 1680K floppy (common extended format) 1,763,328 bytes - 1722K floppy (common extended format) 2,949,120 bytes - 2880K floppyFor any other size, the image is assumed to be a hard disk image, andshould typically have an MBR and a partition table. It may optionallyhave a DOSEMU geometry header; in which case the header is used todetermine the C/H/S geometry of the disk. Otherwise, the geometry isdetermined by examining the partition table, so the entire imageshould be partitioned for proper operation (it may be divided betweenmultiple partitions, however.)You can also specify the geometry manually with the following commandline options (currently untested): c=<number> Specify number of cylinders (max 1024[*]) h=<number> Specify number of heads (max 256[*]) s=<number> Specify number of sectors (max 63) floppy The image is a floppy image harddisk The image is a hard disk image[*] MS-DOS only allows max 255 heads, and only allows 255 cylinders on floppy disks.If you want to recompile it from sources, you will need to make sure thatyou have a fairly recent binutils installed. I have been using thebinutils-2.11.90.0.8-9 RPM from RedHat.Some interesting things to note:If you're using MEMDISK to boot DOS from a CD-ROM (using ISOLINUX),you might find the generic El Torito CD-ROM driver by Gary Tong andBart Lagerweij useful: http://www.nu2.nu/eltorito/Similarly, if you're booting DOS over the network using PXELINUX, youcan use the "keeppxe" option and use the generic PXE (UNDI) NDISnetwork driver, which is part of the PROBOOT.EXE distribution fromIntel: http://www.intel.com/support/network/adapter/1000/software.htmAdditional technical information:Starting with version 2.08, MEMDISK now supports an installation checkAPI. This works as follows: EAX = 454D08xxh ("ME") (08h = parameter query) ECX = 444Dxxxxh ("MD") EDX = 5349xxnnh ("IS") (nn = drive #) EBX = 3F4Bxxxxh ("K?") INT 13hIf drive nn is a MEMDISK, the registers will contain: EAX = 4D21xxxxh ("!M") ECX = 4D45xxxxh ("EM") EDX = 4944xxxxh ("DI") EBX = 4B53xxxxh ("SK") ES:DI -> MEMDISK info structuresThe low parts of EAX/ECX/EDX/EBX have the normal return values for INT13h, AH=08h, i.e. information of the disk geometry etc.See Ralf Brown's interrupt list,http://www.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/WWW/files.html orhttp://www.ctyme.com/rbrown.htm, for a detailed description.The MEMDISK info structure currently contains: [ES:DI] word Total size of structure (currently 26 bytes) [ES:DI+2] byte MEMDISK minor version [ES:DI+3] byte MEMDISK major version [ES:DI+4] dword Pointer to MEMDISK data in high memory [ES:DI+8] dword Size of MEMDISK data in 512-byte sectors [ES:DI+12] 16:16 Far pointer to command line [ES:DI+16] 16:16 Old INT 13h pointer [ES:DI+20] 16:16 Old INT 15h pointer [ES:DI+24] word Amount of DOS memory before MEMDISK loadedThe program mdiskchk.c in the sample directory is an example on howthis API can be used.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -