[syslinux] Problem with memdisk and DOS on USB

Ferenc Wagner wferi at niif.hu
Fri Jan 11 02:40:30 PST 2008

"H. Peter Anvin" <hpa at zytor.com> writes:

> H. Peter Anvin wrote:
>> Jérôme Poulin wrote:
>>> I would like to add that for every image I tried, I tried to use
>>> safeint, raw and bigraw, and after hours of trying, I'm giving up. I
>>> also tried loading it from GRUB Legacy, with the same results. Is it
>>> my Laptop's BIOS (HP NX6310), USB boot, any idea?
>> Have you tried using syslinux?  I really don't have time to second-guess 
>> all the bugs in Grub.
> That being said, I think what you're seeing is an interaction between 
> your laptop's USB BIOS and memdisk, but I don't know for sure.

I guess it may be the same problem I hit recently and posted to the
list with subject 'memdisk boot failure'.  I still have this problem
and started to suspect it's some kind of geometry problem.  Booting in
QEMU gives me a couple of warnings in the FreeDOS (1.1.35, build
2035b-cvs) InitDisk phase:

 - InitDiskWARNING: using suspect partition Pri:1 FS 06: with calculated values
   0-0-50 instead of    0-1-1
WARNING: using suspect partition Pri:1 FS 06: with calculated values  990-31-63
instead of 1023-23-49
C: HD1, Pri[ 1], CHS=    0-0-50, start=     0 MB, size=  1950 MB

fdisk on the pendrive gives:

    Disk /dev/sda: 2045 MB, 2045247488 bytes
    24 heads, 49 sectors/track, 3396 cylinders
    Units = cylinders of 1176 * 512 = 602112 bytes
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        3396     1996823+   6  FAT16

I tried changing the partition Id to 0e, but that didn't help.

minfo from mtools prints this:

    device information:
    sectors per track: 49
    heads: 24
    cylinders: 3396
    mformat command line: mformat -t 3396 -h 24 -s 49 -H 49 u:
    bootsector information
    sector size: 512 bytes
    cluster size: 64 sectors
    reserved (boot) sectors: 1
    fats: 2
    max available root directory slots: 512
    small size: 0 sectors
    media descriptor byte: 0xf8
    sectors per fat: 244
    sectors per track: 49
    heads: 24
    hidden sectors: 49
    big size: 3993647 sectors
    physical drive id: 0x0
    serial number: 6766C6CC
    disk label="NO NAME    "
    disk type="FAT16   "

I booted Finnix (small live Linux distro) from the same pendrive,
modprobed edd and checked the int13 info under /sys/firmware/edd.  The
default values were 1024/16/63 and the legacy maximums 1023/15/63.
This last piece is the only info which is specific to my BIOS, which
simply freezes booting FreeDOS after printing InitDisk.

I will try booting under other BIOSes as I get to it, but maybe you
can find something in the haystack above.  Perhaps it's not even a
memdisk but a DOS bug, which loops encountering some strange artifical
geometry...  I don't know.

More information about the Syslinux mailing list