summaryrefslogtreecommitdiff
path: root/memdisk/memdisk.doc
blob: 700ebece29834f518a27f68c39777867f16968d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
$Id$
[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't
work.

MEMDISK simulates a disk by claiming a chunk of high memory for the
disk and a (very small - 2K typical) chunk of low (DOS) memory for the
driver 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 to
be 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.img

Note the following:

a) The disk image can be uncompressed or compressed with gzip.

b) If the disk image is one of the following sizes, it's assumed to be a
floppy 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 floppy

For any other size, the image is assumed to be a hard disk image, and
should typically have an MBR and a partition table.  It may optionally
have a DOSEMU geometry header; in which case the header is used to
determine the C/H/S geometry of the disk.  Otherwise, the geometry is
determined by examining the partition table, so the entire image
should be partitioned for proper operation (it may be divided between
multiple partitions, however.)

You can also specify the geometry manually with the following command
line 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 that
you have a fairly recent binutils installed.  I have been using the
binutils-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 and
Bart Lagerweij useful:

	http://www.nu2.nu/eltorito/


Similarly, if you're booting DOS over the network using PXELINUX, you
can use the "keeppxe" option and use the generic PXE (UNDI) NDIS
network driver, which is part of the PROBOOT.EXE distribution from
Intel:

	http://www.intel.com/support/network/adapter/1000/software.htm