Hi, I'm doing a small hobby project writing some tools to put DOS boot images and Linux rescue images on a USB stick. For this I have partitioned my USB stick in 2 partitions, one 192MB partition with a VFAT filesystem (for the normal use) and a second partition with an ext3 filesystem. My aim was to provide a graphical menu (grub) to access the different images using memdisk. Since none of the DOS images would load using grub+memdisk (and I tried MSDOS, PCDOS and FreeDOS), I tried with lilo too and finally with syslinux (the intended usage). With both grub and lilo DOS just freezes without any output, FreeDOS and PCDOS with some output, but no output to why it crashes. Now that I added syslinux to my first VFAT partition, I get some more output, and that's why I'm doing this bugreport ;) I fear this is a bug in memdisk when booting from USB devices. It would be nice if this could work. The setup (for testing-purposes) is like this: /dev/sda -> lilo /dev/sda1 -> syslinux (vfat) /dev/sda2 -> grub (ext3) The software used is: syslinux 1.08 memdisk 1.08 grub 0.93 lilo 21.4.4 The DOS images: FreeDOS 1.1.32a boot disk IBM LanAID (PCDOS) boot disk IBM PCDOS 7.1 boot disk Windows 95 boot disk Windows 98 boot disk The output I get for the different DOS images is as follows: * FreeDOS: (what I have on the screen!): e820: 000000001ff80000 0000000000080000 2 e820: 00000000ff800000 0000000000400000 2 e820: 00000000ffc00000 0000000000400000 2 Ramdisk at 0x1fdf0000, length 0x00168000 command line: initrd=freedos.img BOOT_IMAGE=memdisk.zi Disk is floppy, 1440 K, C/H/S = 80/2/18 Total size needed = 1494 bytes, allocating 2K Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 1588: 0xffff 15E801: 0x3c00 0x1edf INT 13 08: Success, count = 1, BPT = f000:8ccd old: int13 = f00066ea int15 = f00066ef new: int13 = 9e800008 int15 = 9e800272 Loading boot sector... booting... FreeDOS kernel version 1.1.32a (Building 2032a) [Sep 24 2003 21:58:48] Kernel compatibility 7.10 - WATCOMC - FAT32 support (C) Copyright 1995-2003 Pasquale J. Villani and The FreeDOS Project. All Rights Reserved. This is free software and ....ladadi ladada .... either version 2, or (at your option) any later version. - InitDisk Interrupt devide by zero, stack: E159 0652 0212 0022 3636 0000 0000 0000 0000 0000 0000 0000 0000 * IBM LanAID (PCDOS) boot disk: MEMDISK 2.08 2003-12-12 Copyright 2001-2003 H. Peter Anvin e820: 0000000000000000 000000000009f000 1 e820: 000000000009f000 0000000000010000 2 e820: 00000000000d2000 0000000000020000 2 e820: 00000000000dc000 0000000000240000 2 e820: 0000000000100000 00000001fe600000 1 e820: 000000001ff60000 00000000001a0000 3 e820: 000000001ff7a000 0000000000020000 4 e820: 000000001ff7c000 0000000000040000 2 e820: 000000001ff80000 0000000000800000 2 e820: 00000000ff800000 0000000000400000 2 e820: 00000000ffc00000 0000000000400000 2 Ramdisk at 0x1fdf0000, length 0x00168000 command line: initrd=lanaid.img BOOT_IMAGE=memdisk.zi Disk is floppy, 1440 K, C/H/S = 80/2/18 Total size needed = 1493 bytes, allocating 2K Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 1588: 0xffff 15E801: 0x3c00 0x1edf INT 13 08: Success, count = 1, BPT = f000:8ccd old: int13 = f00066ea int15 = f00066ef new: int13 = 9e800008 int15 = 9e800272 Loading boot sector... booting... Starting PC DOS... _ * PC DOS 7.1 boot disk (What I have on the screen): e820: 000000000009f000 0000000000010000 2 e820: 00000000000d2000 0000000000020000 2 e820: 00000000000dc000 0000000000240000 2 e820: 0000000000100000 00000001fe600000 1 e820: 000000001ff60000 00000000001a0000 3 e820: 000000001ff7a000 0000000000020000 4 e820: 000000001ff7c000 0000000000040000 2 e820: 000000001ff80000 0000000000800000 2 e820: 00000000ff800000 0000000000400000 2 e820: 00000000ffc00000 0000000000400000 2 Ramdisk at 0x1fec6000, length 0x0008905c Moving compressed data from 0x1fec6000 to 0x1fc06e00 gzip image: decompressed addr 0x1fc90000, len 0x002d0000: ok command line: Disk is floppy, 2880 K, C/H/S = 80/2/36 Total size needed = 1441 bytes, allocating 2K Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 1588: 0xffff 15E801: 0x3c00 0x1ec9 INT 13 08: Success, count = 1, BPT = f000:8ccd old: int13 = f00066ea int15 = f00066ef new: int13 = 9e800008 int15 = 9e800272 Loading boot sector... booting... Starting PC DOS... _ * Windows 95 boot disk Loading win95.img......................... Ready. MEMDISK 2.08 2003-12-12 Copyright 2001-2003 H. Peter Anvin e820: 0000000000000000 000000000009f000 1 e820: 000000000009f000 0000000000010000 2 e820: 00000000000d2000 0000000000020000 2 e820: 00000000000dc000 0000000000240000 2 e820: 0000000000100000 00000001fe600000 1 e820: 000000001ff60000 00000000001a0000 3 e820: 000000001ff7a000 0000000000020000 4 e820: 000000001ff7c000 0000000000040000 2 e820: 000000001ff80000 0000000000800000 2 e820: 00000000ff800000 0000000000400000 2 e820: 00000000ffc00000 0000000000400000 2 Ramdisk at 0x1fdf0000, length 0x00168000 command line: BOOT_IMAGE=memdisk.zi initrd=win95.img Disk is floppy, 1440 K, C/H/S = 80/2/18 Total size needed = 1491 bytes, allocating 2K Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 1588: 0xffff 15E801: 0x3c00 0x1edf INT 13 08: Success, count = 1, BPT = f000:8ccd old: int13 = f00066ea int15 = f00066ef new: int13 = 9e800008 int15 = 9e800272 Loading boot sector... booting... _ * Windows 98 boot disk: Loading win98.img......................... Ready. MEMDISK 2.08 2003-12-12 Copyright 2001-2003 H. Peter Anvin e820: 0000000000000000 000000000009f000 1 e820: 000000000009f000 0000000000010000 2 e820: 00000000000d2000 0000000000020000 2 e820: 00000000000dc000 0000000000240000 2 e820: 0000000000100000 00000001fe600000 1 e820: 000000001ff60000 00000000001a0000 3 e820: 000000001ff7a000 0000000000020000 4 e820: 000000001ff7c000 0000000000040000 2 e820: 000000001ff80000 0000000000800000 2 e820: 00000000ff800000 0000000000400000 2 e820: 00000000ffc00000 0000000000400000 2 Ramdisk at 0x1fdf0000, length 0x00168000 command line: BOOT_IMAGE=memdisk.zi initrd=win98.img Disk is floppy, 1440 K, C/H/S = 80/2/18 Total size needed = 1491 bytes, allocating 2K Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 1588: 0xffff 15E801: 0x3c00 0x1edf INT 13 08: Success, count = 1, BPT = f000:8ccd old: int13 = f00066ea int15 = f00066ef new: int13 = 9e800008 int15 = 9e800272 Loading boot sector... booting... _ I have the same problems when booting memdisk via grub or lilo. The only noticeable difference between syslinux and grub/lilo is that when booting FreeDOS with syslinux I get a division-by-zero error and a stack-trace. Any help would be appreciated, if needed I can send the different configuration files and/or the commands I ran to install the bootloaders. Thanks in advance, -- dag wieers, dag at wieers.com, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
Dag Wieers wrote:> Hi, > > I'm doing a small hobby project writing some tools to put DOS boot images > and Linux rescue images on a USB stick. >What BIOS are you using? I would, unfortunately, bet a fair amount of money it's a BIOS bug more so than a MEMDISK bug. -hpa
Hi, Dag Wieers <dag at wieers.com> schrieb am 20.01.04 16:56:26:> I'm doing a small hobby project writing some tools to put DOS boot images > and Linux rescue images on a USB stick. > > For this I have partitioned my USB stick in 2 partitions, one 192MB > partition with a VFAT filesystem (for the normal use) and a second > partition with an ext3 filesystem.[..]> I fear this is a bug in memdisk when booting from USB devices. It would be > nice if this could work. > > The setup (for testing-purposes) is like this: > > /dev/sda -> lilo > /dev/sda1 -> syslinux (vfat) > /dev/sda2 -> grub (ext3) > > The software used is: > > syslinux 1.08You mean 2.08, correct?> memdisk 1.08Dito.> I have the same problems when booting memdisk via grub or lilo. > The only noticeable difference between syslinux and grub/lilo is that when > booting FreeDOS with syslinux I get a division-by-zero error > and a stack-trace.Did you try to boot these images via hard disk? Did you try to set up a FAT (no VFAT) Filesystem on the USB stick? Syslinux can't do anything about vfat, it only uses FAT. Regards, Josef ______________________________________________________________________________ Nachrichten, Musik und Spiele schnell und einfach per Quickstart im WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110
James Courtier-Dutton
2004-Jan-21 18:09 UTC
[syslinux] Bug-report: Booting DOS images from USB
Dag Wieers wrote:> Hi, > > I'm doing a small hobby project writing some tools to put DOS boot images > and Linux rescue images on a USB stick. > > For this I have partitioned my USB stick in 2 partitions, one 192MB > partition with a VFAT filesystem (for the normal use) and a second > partition with an ext3 filesystem. > > My aim was to provide a graphical menu (grub) to access the different > images using memdisk. Since none of the DOS images would load using > grub+memdisk (and I tried MSDOS, PCDOS and FreeDOS), I tried with lilo too > and finally with syslinux (the intended usage). > > With both grub and lilo DOS just freezes without any output, > FreeDOS and PCDOS with some output, but no output to why it crashes. > > Now that I added syslinux to my first VFAT partition, I get some more > output, and that's why I'm doing this bugreport ;) > > I fear this is a bug in memdisk when booting from USB devices. It would be > nice if this could work. > > The setup (for testing-purposes) is like this: > > /dev/sda -> lilo > /dev/sda1 -> syslinux (vfat) > /dev/sda2 -> grub (ext3) > > The software used is: > > syslinux 1.08 > memdisk 1.08 > grub 0.93 > lilo 21.4.4 > > The DOS images: > > FreeDOS 1.1.32a boot disk > IBM LanAID (PCDOS) boot disk > IBM PCDOS 7.1 boot disk > Windows 95 boot disk > Windows 98 boot disk > > The output I get for the different DOS images is as follows: > > * FreeDOS: (what I have on the screen!): > > e820: 000000001ff80000 0000000000080000 2 > e820: 00000000ff800000 0000000000400000 2 > e820: 00000000ffc00000 0000000000400000 2 > Ramdisk at 0x1fdf0000, length 0x00168000 > command line: initrd=freedos.img BOOT_IMAGE=memdisk.zi > Disk is floppy, 1440 K, C/H/S = 80/2/18 > Total size needed = 1494 bytes, allocating 2K > Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 > 1588: 0xffff 15E801: 0x3c00 0x1edf > INT 13 08: Success, count = 1, BPT = f000:8ccd > old: int13 = f00066ea int15 = f00066ef > new: int13 = 9e800008 int15 = 9e800272 > Loading boot sector... booting... > FreeDOS kernel version 1.1.32a (Building 2032a) [Sep 24 2003 21:58:48] > Kernel compatibility 7.10 - WATCOMC - FAT32 support > > (C) Copyright 1995-2003 Pasquale J. Villani and The FreeDOS Project. > All Rights Reserved. This is free software and ....ladadi ladada > .... > either version 2, or (at your option) any later version. > - InitDisk > Interrupt devide by zero, stack: > E159 0652 0212 0022 3636 0000 0000 0000 0000 0000 0000 0000 0000 > > > * IBM LanAID (PCDOS) boot disk: > > MEMDISK 2.08 2003-12-12 Copyright 2001-2003 H. Peter Anvin > e820: 0000000000000000 000000000009f000 1 > e820: 000000000009f000 0000000000010000 2 > e820: 00000000000d2000 0000000000020000 2 > e820: 00000000000dc000 0000000000240000 2 > e820: 0000000000100000 00000001fe600000 1 > e820: 000000001ff60000 00000000001a0000 3 > e820: 000000001ff7a000 0000000000020000 4 > e820: 000000001ff7c000 0000000000040000 2 > e820: 000000001ff80000 0000000000800000 2 > e820: 00000000ff800000 0000000000400000 2 > e820: 00000000ffc00000 0000000000400000 2 > Ramdisk at 0x1fdf0000, length 0x00168000 > command line: initrd=lanaid.img BOOT_IMAGE=memdisk.zi > Disk is floppy, 1440 K, C/H/S = 80/2/18 > Total size needed = 1493 bytes, allocating 2K > Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 > 1588: 0xffff 15E801: 0x3c00 0x1edf > INT 13 08: Success, count = 1, BPT = f000:8ccd > old: int13 = f00066ea int15 = f00066ef > new: int13 = 9e800008 int15 = 9e800272 > Loading boot sector... booting... > Starting PC DOS... > > _ > > > * PC DOS 7.1 boot disk (What I have on the screen): > > e820: 000000000009f000 0000000000010000 2 > e820: 00000000000d2000 0000000000020000 2 > e820: 00000000000dc000 0000000000240000 2 > e820: 0000000000100000 00000001fe600000 1 > e820: 000000001ff60000 00000000001a0000 3 > e820: 000000001ff7a000 0000000000020000 4 > e820: 000000001ff7c000 0000000000040000 2 > e820: 000000001ff80000 0000000000800000 2 > e820: 00000000ff800000 0000000000400000 2 > e820: 00000000ffc00000 0000000000400000 2 > Ramdisk at 0x1fec6000, length 0x0008905c > Moving compressed data from 0x1fec6000 to 0x1fc06e00 > gzip image: decompressed addr 0x1fc90000, len 0x002d0000: ok > command line: > Disk is floppy, 2880 K, C/H/S = 80/2/36 > Total size needed = 1441 bytes, allocating 2K > Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 > 1588: 0xffff 15E801: 0x3c00 0x1ec9 > INT 13 08: Success, count = 1, BPT = f000:8ccd > old: int13 = f00066ea int15 = f00066ef > new: int13 = 9e800008 int15 = 9e800272 > Loading boot sector... booting... > Starting PC DOS... > > _ > > > * Windows 95 boot disk > > Loading win95.img......................... > Ready. > MEMDISK 2.08 2003-12-12 Copyright 2001-2003 H. Peter Anvin > e820: 0000000000000000 000000000009f000 1 > e820: 000000000009f000 0000000000010000 2 > e820: 00000000000d2000 0000000000020000 2 > e820: 00000000000dc000 0000000000240000 2 > e820: 0000000000100000 00000001fe600000 1 > e820: 000000001ff60000 00000000001a0000 3 > e820: 000000001ff7a000 0000000000020000 4 > e820: 000000001ff7c000 0000000000040000 2 > e820: 000000001ff80000 0000000000800000 2 > e820: 00000000ff800000 0000000000400000 2 > e820: 00000000ffc00000 0000000000400000 2 > Ramdisk at 0x1fdf0000, length 0x00168000 > command line: BOOT_IMAGE=memdisk.zi initrd=win95.img > Disk is floppy, 1440 K, C/H/S = 80/2/18 > Total size needed = 1491 bytes, allocating 2K > Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 > 1588: 0xffff 15E801: 0x3c00 0x1edf > INT 13 08: Success, count = 1, BPT = f000:8ccd > old: int13 = f00066ea int15 = f00066ef > new: int13 = 9e800008 int15 = 9e800272 > Loading boot sector... booting... > _ > > > * Windows 98 boot disk: > > Loading win98.img......................... > Ready. > MEMDISK 2.08 2003-12-12 Copyright 2001-2003 H. Peter Anvin > e820: 0000000000000000 000000000009f000 1 > e820: 000000000009f000 0000000000010000 2 > e820: 00000000000d2000 0000000000020000 2 > e820: 00000000000dc000 0000000000240000 2 > e820: 0000000000100000 00000001fe600000 1 > e820: 000000001ff60000 00000000001a0000 3 > e820: 000000001ff7a000 0000000000020000 4 > e820: 000000001ff7c000 0000000000040000 2 > e820: 000000001ff80000 0000000000800000 2 > e820: 00000000ff800000 0000000000400000 2 > e820: 00000000ffc00000 0000000000400000 2 > Ramdisk at 0x1fdf0000, length 0x00168000 > command line: BOOT_IMAGE=memdisk.zi initrd=win98.img > Disk is floppy, 1440 K, C/H/S = 80/2/18 > Total size needed = 1491 bytes, allocating 2K > Old dos memory at 0x9f000 (map says 0x9f000), loading at 0x9e800 > 1588: 0xffff 15E801: 0x3c00 0x1edf > INT 13 08: Success, count = 1, BPT = f000:8ccd > old: int13 = f00066ea int15 = f00066ef > new: int13 = 9e800008 int15 = 9e800272 > Loading boot sector... booting... > _ > > I have the same problems when booting memdisk via grub or lilo. > The only noticeable difference between syslinux and grub/lilo is that when > booting FreeDOS with syslinux I get a division-by-zero error > and a stack-trace. > > Any help would be appreciated, if needed I can send the different > configuration files and/or the commands I ran to install the bootloaders. > > Thanks in advance, > -- dag wieers, dag at wieers.com, http://dag.wieers.com/ -- > [Any errors in spelling, tact or fact are transmission errors] > > _______________________________________________ > SYSLINUX mailing list > Submissions to SYSLINUX at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux > Please do not send private replies to mailing list traffic. > > >When you boot from a USB device, the usb device will look like the first HD on your system BIOS disc 0x80 With your HD looking like the second disc, 0x81 As DOS uses the BIOS calls to access the hard disk, it will try using 0x80 as if it was the HD. If booting from the USB device, I would assume that you want DOS to treat the USB device as the first HD, so in order to boot properly, you would have to format the USB device as if it was a HD, and not as if it was a floppy disc. Cheers James
Hi, James Courtier-Dutton <James at superbug.demon.co.uk> schrieb am 21.01.04 19:22:00:> Dag Wieers wrote: > > I'm doing a small hobby project writing some tools to put DOS boot images > > and Linux rescue images on a USB stick. > > > > For this I have partitioned my USB stick in 2 partitions, one 192MB > > partition with a VFAT filesystem (for the normal use) and a second > > partition with an ext3 filesystem.[..]> When you boot from a USB device, the usb device will look like the first > HD on your system BIOS disc 0x80 > With your HD looking like the second disc, 0x81 > As DOS uses the BIOS calls to access the hard disk, it will try using > 0x80 as if it was the HD. > If booting from the USB device, I would assume that you want DOS to > treat the USB device as the first HD, so in order to boot properly, you > would have to format the USB device as if it was a HD, and not as if it > was a floppy disc.Hmm. Seems that Dag already formatted the USB device as a harddrive, otherwise he wouldn't be able to see any partitions on it. What he wants is use memdisk, a 1,44 MB disk image (on one of the partitions as a file), and boot dos off this floppy image that memdisk provides from a ram disk. So nothing really complicated, also this should have worked out of the box. Regards, Josef ______________________________________________________________________________ Erdbeben im Iran: Zehntausende Kinder brauchen Hilfe. UNICEF hilft den Kindern - helfen Sie mit! https://www.unicef.de/spe/spe_03.php