Hoi Bernd, > I'm in a situation where I got Syslinux bootloader on an USB flash > drive. It loads the MEMDISK ramdisk module with a floppy image as > contents which is then executed (as drive A:). > I'd like to get into a situation where the USB flash disks doesn't get a > driveletter assigned by the kernel when it loads but only after the DOS > USB driver stack is loaded.
You can hook int 13 function 8 (get drive parameters) and make sure that for dl = 80 or higher, it always returns carry set and dl = 0 to pretend having no harddisks. Of course DOS does a lot of work for you to parse partitions, so it is a bit odd to pretend you have none only to do that again manually later. > To that end there seem to be 2 options: > 1) "/memdisk initrd=floppy.img pause" followed by removing USB disk and > pressing a key to continue. Later on, insert again. You could also do the above and/or temporarily make int 13 access to all harddisks behave as if all disks are empty bit buckets. I hope you will not try to format later ;-) > 2) keep kernel disk scanning/enumerating code intact but don't execute > it for drive 0x80 and up, at startup at least. This way the drivers can > be loaded, set interface to max supported speed, recognise devices, and > get a driveletter assigned (C: likely) See above. You can do it with a relatively simply int 13 fake. > Is the kernel designed to allow such a specific scenario #2 ? There is no built-in function in the kernel, although you can SYS CONFIG the lba support away and hide your partitions after the first 1024 cylinders. Later, when you load USB drivers to do the processing on DOS block device level, you can get along completely without int 13 CHS / LBA access anyway, depending on what style of USB drivers you use, I guess. Again, in this scenario, the USB driver will have to do all partition table (MBR, chain of extra partitions) processing itself because DOS and int 13 itself has not int 13 disk hot-plugging. Luckily it is okay for DOS to have many drive letters managed by 1 driver. > It's very > un-DOS-like to delay giving out driveletters. Initdisk.c seems to > suggest scanning can be disabled [SCAN_PRIMARY], but I guess that's a > permanent option instead of only for boot-time. The scan constants are only for doing some things in some passes of scanning the partition table and other things in other, with some things being skipped then. It is not about skipping disks. Eric :-) ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel