[syslinux] Disk images and syslinux (OT?)

Christian Marg christian.marg at tu-clausthal.de
Fri Mar 21 03:22:24 PST 2003


Karri Puumanen wrote:

>I have succesfully used bootable 1.44 and 2.88 images with syslinux/memdisk. No problemo there. The challenge is how to create a bootable 5-15 MB disk image with correct geometry, MBR, boot sector, active bit  etc.
> 
>Having instructions/tools to do such image would make possible for example intgrating all IBM ServeRAID firmware update disks (3 in total) into one image.
>  
>
Well, Just take your calculator:

5Mb*1024*1024/512=10240 Blocks each 512 bytes (the sectors)
Now lets go for the "Geometry"
10240Sectors /63 Sectors per Cylinder = 162+decimals
Round it up and  divide 163 by the number of  "Heads" you want the Image
to have.
You could take 1 or two, just remember the Cylinder count has to be < 1024
Now I've got the Geometry 82Cylinders/2Heads/63Sectors. Multiply all
Numbers together to get the Sector count you need for this geometry
(remember we rounded up)  and you get 10332 Sectors total.
Then you take your dd if=/dev/zero of=diskimage bs=512 count=10332 et
voila your diskimage.
Partitioning is next: I think I used cfdisk, which has an option to give
the drive geometry on the cmdline. You give it the Geometry and the path
to the file and partition your disk image.
If that doesn't work, you need to attach the file to a loop device via
"losetup" (I don't remember, if  fdisk was working on the file or only
on devices)

It gets tricky, if you want to have, eg. MSDOS on that "drive": I used
Dosemu to boot a floppy image of Msdos and somehow tricked Dosemu to
have my "Harddisk" by bypassing all configuration files, then using "sys
a: c:" to get the image bootable. Perhaps the process is easier for
freedos...

If there are any errors, please correct me, because I did this some time
ago and don't remember every step of it...
bye
Christian






More information about the Syslinux mailing list