[syslinux] retrieve drive letter of USB Media.

H. Peter Anvin hpa at zytor.com
Tue Mar 1 11:08:32 PST 2005


Blaauw,Bernd B. wrote:
> Does SYSLINUX have any idea which DOS driveletter would be assigned to the disk it is booting from?

Nope; that would pretty much require following the DOS algorithm for 
drive letter assignment.

> At www.veder.com someone is trying to build a USB flash drive.
> However, FreeDOS does not seem to boot correctly from it
> (bootsector trouble maybe, or kernel itself is confusing drives),
> thus we're thinking of using Syslinux + Memdisk + bootimage,
> but somehow we want to be able to also access the USB flash disk itself,
> from a batchfile.
> 
> Perhaps MEMDISK could not only have the Bootloader_ID (syslinux, and others),
> but also a disk ID (0x00, 0x80 and so on).
> 
> Then if diskID was retrieved and is 0x00,
> we know we booted from a bootdrive which would be A: and currently accessible as B: (because of Memdisk taking A: driveletter).

How about just leaving an index file on the drive, and looking for that?

	-hpa




More information about the Syslinux mailing list