[syslinux] Bug in mkdiskimage of syslinux-2.06?

H. Peter Anvin hpa at zytor.com
Sat Nov 8 17:24:53 PST 2003


johnson wrote:
 >
> $ehead   = $h;                             #--------------should be: $ehead=$h-1
> $esect   = $s + (($c & 0x300) >> 2);    
> $ecyl    = $c & 0xff;                      #--------------should be: $ecyl = ($c-1) & 0xff;
> if ( $psize > 65536 ) {
>     $fstype = 0x06;
> } else {
>     $fstype = 0x04;
> }
> print OUTPUT pack("CCCCCCCCVV", 0x80, $bhead, $bsect, $bcyl, $fstype,
>                   $ehead, $esect, $ecyl, $s, $psize);
> print OUTPUT "\0" x 48;
> print OUTPUT "\x55\xaa";
> 
> .......(end)
> 
> ///////////////////////////////code end////////////////////////////////////////////////////////
> 
> i think:
> if your command line is "mkdiskimage tmp.img 64 4 63"
> means that $c=64,$h=4,$s=63
> means that there are 64 cylindars ,4 heads and 63 sectors per track.
> so the cylindars number is from 0 to 63,and head from 0 to 3,but sector still from 1 to 63.
> 

Looks right.  I will fix this.  Thanks!

	-hpa




More information about the Syslinux mailing list