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). 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 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
On Sun, Dec 18, 2011 at 18:40, Bernd Blaauw <bblaauw at home.nl> 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.If the image for MEMDISK is an HDD, it should be device 0x80 and picked first for using the "C:" drive letter assignment. If it's an FDD, it should be device 0x00 and assigned "A:". I'm not sure if a floppy emulation mode ISO would be supported with MEMDISK but if so, using the nopassany in this situation would allow the ISO to be assigned "C:".> 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).I'd expect nopassany to hide everything except the new disk. CD drives are HDD-like and should be hidden by nopassany.> Original Boot order: > BIOS -> CD -> Isolinux 4.04 -> Memdisk 4.04 -> FLOPPY.IMGnopassany should hide the FDD/HDD/CD> Alternative with ISO in RAM: > BIOS -> CD -> Isolinux -> Memdisk -> ISO -> isolinux -> memdisk -> > floppy.imgnopassany on memdisk #1 should hide the FDD/HDD (including CD) but not using nopassany in the second should make eltorito.sys pick the ISO. Under this condition, I'd expect the ISO could easily be assigned "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/memdiskI'm guessing from the "cmdline" statements that you didn't try moving the nopassany to the MEMDISK for the ISO and not the MEMDISK for the FDD. -- -Gene
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/memdiskMDISKCHK 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
On 12/18/2011 03:40 PM, 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). >No, "nopassany" really means "don't pass ANY". There isn't a ready way for MEMDISK to know what drives to allow through. -hpa