[syslinux] Creating HD Boot Images

SysLinux User syslinux at lifeimagesphoto.com
Tue May 13 08:00:51 PDT 2003


I have been trying to track down information on building HD boot images for 
ISOLINUX and MEMDISK, and so far, haven't had a whole lot of luck.

I've found a number of sources describing the process of setting up 
ISOLINUX and MEMDISK, and how to configure the boot CD to boot various 
OS's.  I've also read through Bart Lagerweij's BootCD/ModBoot pages, and 
Mikhail Kupchick's EBCD pages.  (The image files I'm trying to duplicate 
are from the EBCD site.)  What I can't find is a good tutorial on how to 
build the image file from scratch.  WinImage will build an empty image, but 
is limited to floppy sizes.  I tried simply building a MEMDISK of 15M and 
loading a floppy image into that, but then I get a message indicating that 
the image is truncated, and the system won't boot.

I've tried building a blank image from Linux using the following procedure 
(where bootsect.w98 is a copy of the bootsector from a bootable Win98 
partition using a standard DOS MBR):
   dd if=/dev/zero of=/tmp/15m.img bs=1M count=15
   losetup /dev/loop0 /tmp/15m.img
   mkdosfs /dev/loop0   (no parms.  Since this is too big for a floppy, it 
automatically makes it hd.)
   dd if=/tmp/bootsect.w98 of=/dev/loop0
At this point, fdisk shows a rather strange looking partition table, but it 
matches the partition table that I see with a pre-built DOS image file.

I've tried this several times varying the bs and count values in the 
initial dd, setting up the sector/head/cylinder manually in fdisk, omitting 
the bootsect copy step, etc.  I routinely wind up with an image that I can 
read with WinImage, and by mounting it on Linux, but I can't boot from.  I 
get an Invalid system disk message when I attempt to load that image.

I've also tried building the blank image in Linux, and using WinImage to 
install to boot sector, but that doesn't work either.

My ultimate goal is to have a 15M Ramdisk that is initially loaded with a 
fairly small amount of data.  I'm planning to load the absolute minimum 
from the image file, and once the system comes up, copy everything else I 
need from the CD.  In this way, I expect to make this versatile enough that 
I can use basically the same setup from CD or from a floppy/CD combination 
for those systems that can't boot from CD.  I expect to build the image 
file and compress it so that even though it fits a 15M Ramdisk, it will 
still fit on a floppy, since most of the image will be empty anyway.

One thing I haven't tried is to create a true bootable HD partition of 15M 
and directly image that.  There's got to be an easier way.

Since I don't see a way to resize MEMDISK after boot, I'm assuming that the 
image needs to fit perfectly into my final size Ramdisk.

What am I missing here, and where can I find a good tutorial on this stuff?

Thanks.





More information about the Syslinux mailing list