[syslinux] Planning a 2.08 release

H. Peter Anvin hpa at zytor.com
Tue Dec 2 10:52:15 PST 2003


Murali Krishnan Ganapathy wrote:
> OK. So booting from a hard disk image is a no go if one is trying to 
> install windows :-(
> Can one still "mount" two floppy images with MEMDISK (or have this 
> feature in MEMDISK)? I guess I am asking this only out of curiousity, 
> since as you said I can have one larger floppy image. To create such an 
> image I do the following right?

Two floppy images would pretty much mean two instantiations of MEMDISK. 
  It's a bit messy to do, and I'd rather not.

> 1. Create an empty file of appropriate size
> 2. Mount as loop back device.
> 3. Use mkdosfs to format the filesystem passing it the appropriate C,H,S 
> parameters.
> 4. Mount this loop back device, and put the appropriate files there.

That should work, except I don't think mkdosfs allows entering CHS 
parameters.  However, you can let mkdosfs pick its own parameters and 
just specify them to memdisk when the time comes, for example, to make 
an 8 MB image:

: smyrno 2 ; mkdosfs -v -C testimage 8192
mkdosfs 2.8 (28 Feb 2001)
testimage has 64 heads and 32 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 16384 sectors;
file system has 2 16-bit FATs and 4 sectors per cluster.
FAT size is 16 sectors, and provides 4079 clusters.
Root directory contains 512 slots.
Volume ID is 3fccde5b, no volume label.

So you'd use the command line options "floppy h=64 s=32".

If you want to specify your own geometry, use mformat instead.

> Only question is that if there is a utility to copy the boot sector off 
> a working image (possibly different size) and put it into this 
> non-standard floppy image? As I read on this list, a sector based dd 
> wont help, as the boot sector also has the geomety encoded?

That is unfortunately correct, but there are two ways to do it:

"Correct way":
You need to copy bytes 11 to 61 inclusive from the "new" (mkdosfs) disk 
boot sector on top of the "old" (working image) disk boot sector.

"Ugly hack that works":
Use syslinux, and have the "old" (working image) disk boot sector as a 
.bss file.

	-hpa




More information about the Syslinux mailing list