[syslinux] memdisk and harddisk image creation under Linux

christian Marg christian.marg at tu-clausthal.de
Thu Jul 25 16:21:10 PDT 2002


Stefan Sonnenberg-Carstens schrieb:

> I'd like to create a bootable cd, wich boots a linux and some other tools.
> While el-torito limits the space to 2,88MByte, I would apreciate to use
> memdisk.

Why not using an initrd? 2.88 Mbyte should be big enough to mount a cdrom as
readonly root or fitting somethings to a Ramdrive. That might be an easier
approach... If you create an image, you limit yourself again. If you use a
Initramdisk, you are only limited by either CD-Size or RAM size. And of course,
it could be loading faster... (if you use the CDrom as Readonly mounted Root...)
because you don't have to load an Image at first.

> The point is : How do I create a harddiskimage from scratch in a file, with
> MBR, partition table, filesystem on it etc. without using dd ?

Why not use dd for creating a file of the right size (fitting to CHS boundaries)
filled with zeros ?
I did this once and had much "fun" figuring the right CHS values for the
filesize I wanted. I finally ended up with 501/14/63 to have an image about
225Mb in size. I had to use my Calculator for some time to produce the values...

I used an Image of a Win98 ERD and DOSemu to finish the partition I wanted, but
you want linux. That should be easier to accomplish...

> I tried with loopback, ramdisk etc.

Well, try harder :) There is a tool named losetup that is used to setup a loop
device for pointing to a file. Tadaa - you have your special device...

> But, as expected a mke2fs /filename1 dows not work, clearly, because it is
> not a special device.

HiWi PC-Administration
Rechenzentrum TU-Clausthal
mailto:christian.marg at tu-clausthal.de

More information about the Syslinux mailing list