[syslinux] nopassany parameter causing trouble

Shao Miller Shao.Miller at yrdsb.edu.on.ca
Sun Dec 18 23:05:16 PST 2011


On 12/18/2011 18:40, Bernd Blaauw wrote:
> I'm running into an issue which I didn't expect to encounter.
> When specifying the "nopassany" parameter to hide physical drives, I'm 
> getting different output from ELTORITO.SYS (v1.5, syslinux distro) 
> such that it fails.
>
> My intent is a LiveCD functionality with a DOS RAMDISK program taking 
> over as drive C:, meaning either no FAT partitions on harddisks and 
> removable disks (as the DOS kernel enumerates them) or using the 
> NOPASSANY parameter for MEMDISK.
>
> Different output:
> * ISO9660 found: drive E0 with address 0800h (omitting nopassany)
> * Nothing found: drive 70 with address 0000h (nopassany specified)
>
> My expectation was that only floppydrives and USB/harddisk units would 
> be hidden. (for that matter I'd prefer booting from USB FAT32 yet hide 
> USB drive but not harddisk, but can't have it all).
>

In syslinux/doc/memdisk.txt, we can see that "nopass" hides drives of 
the same type and "nopassany" allows only the emulated drive to be 
accessible.  If MEMDISK provides a RAM-backed HDD as drive 0x80 and 
either of these parameters is used, that will hide any another drive 
numbers, including 0xE0.

> Original Boot order:
> BIOS -> CD -> Isolinux 4.04 -> Memdisk 4.04 -> FLOPPY.IMG
>
> Alternative with ISO in RAM:
> BIOS -> CD -> Isolinux -> Memdisk -> ISO -> isolinux -> memdisk -> 
> floppy.img
>

I don't follow.  You said a RAM disk that becomes C:.  Floppy images 
will not become C:, they will become A:.  HDD images will become C:.

> The issue seems to be a bug in ELTORITO.SYS itself, as MDISKCHK lists 
> the drive properly as E0. Below captured from redirecting to COM1 in 
> QEMU:
>
> Drive 00 is MEMDISK 4.04:
>         Address = 0x094ce000, len = 720 sectors, chs = 40/2/9,
>         loader = 0x33 (ISOLINUX),
>         cmdline = nopassany initrd=/isolinux/fdboot.img 
> BOOT_IMAGE=/isolinux/memdisk
> Drive E0 is MEMDISK 4.04:
>         Address = 0x09549000, len = 7461 sectors, chs = 65535/255/15,
>         loader = 0x33 (ISOLINUX),
>         cmdline = iso initrd=/isolinux/fdbootcd.iso 
> BOOT_IMAGE=/isolinux/memdisk
> Drive 00 is MEMDISK 4.04:
>         Address = 0x094ce000, len = 720 sectors, chs = 40/2/9,
>         loader = 0x33 (ISOLINUX),
>         cmdline = nopassany initrd=/isolinux/fdboot.img 
> BOOT_IMAGE=/isolinux/memdisk

MDISKCHK attempts to find MEMDISKs by three different methods:
- An INT 0x13 probe of every BIOS number
- A search for so-called mBFT tables in memory
- Walking the so-called "safe INT 0x13 hook" chain

You can choose which methods are used with command-line options.  By 
default, only the probe of every BIOS number is performed.  Since you 
are seeing drive 0x00 twice in your output, you must be using multiple 
methods.  What are your command-line options?  I would expect that if 
you only choose the default behaviour, it will be consistent with 
ElTorito.Sys.

This seems like another situation that a hypothetical MAPDISK could 
assist with: You'd do something like BIOS -> PXE -> PXELINUX -> MEMDISK 
some ISO with "nopass" to hide any real HDDs and CDs -> ISOLINUX -> 
MAPDISK some HDD image in the ISO9660 filesystem -> DOS with .  Syslinux 
doesn't include a MAPDISK at this time, as far as I know.

- Shao Miller



More information about the Syslinux mailing list