Using MEMDISK to etherboot a diskless DOS

Please, read also the general memdisk introduction.

This page is about using memdisk to run DOS, plus a virtual harddrive in RAM.

Diskless DOS (big ram disk)

Cloning a harddisk, in its simplest form, is just like cloning a floppy. Assumptions:

Then here's what we do to clone this harddisk in our diskless xterm:

Of course, you could also disconnect the harddrive from the client and connect it to a linux box, read it out there.

Things get a bit tricky if we want our ram disk to contain only a small partition of a big harddisk. In theory, we can choose any partition of any size as long as we have enough ram to cover every sector of the harddisk from the start (MBR) upto the end of our target partition. In practice however, we prefer partition 1 starting from cylinder 1 to cylinder n because memdisk does not like fractional cylinders in partitions and space between MBR and our target partition will likely be a waste of RAM. Here's what we'll tell dd to copy (instead of the whole disk as before):

[root@xterm root]# dd if=/dev/hda of=/tftpdir/bigdos bs=512 count=S 

where S is the total number of sectors from sector 0 (MBR) upto the end of our target partition. We use the -l option in fdisk (linux) to determine the harddisk's geometry and partition information then get S by:

S = number of sectors/track(s) x number of heads(h) x ending cylinder number(n)

Alternatively, some people prefer copying the MBR track and the partition separately like this: