Hello all, I am duplicating some of the questions I asked on reboot.pro to this list, as FreeDOS developers may be more likely to answer them, especially as Bernd has also been trying to direct some of you to look at the forum post [1].
Basically, while trying to support XP installation from USB in my application, I wrote a custom MBR [2], that can override int13h with the ability to masquerade a bootable drive number with another (currently it just swaps 0x80 and 0x81 when enabled), taking the idea from the LILO mapper. In this MBR, the user is prompted to press a key if they want to boot from USB (0x80, not masqueraded on USB boot), while falling through to booting from the second bootable device (0x81, masqueraded by the MBR as 0x80 on boot) if no action is taken. This basically mimics the behaviour of the Windows optical installation media. This seems to work to some extent, which got me into thinking: Could drive index masquerading also be used to make DOS remap drive letters, and for instance move C: to D: on boot if the drive is presented as 0x81 by the MBR? A very early test seems to indicate that it isn't that simple (even as I also modified the partition table to force 0x81 as the drive index), but this was conducted with less than finalized code, and I still have to run a more proper test. Still, I wouldn't mind hearing from people in the know if such a simplistic approach can work, or is bound to be doomed for one reason or another. My thinking would be that, as Bernd pointed out elsewhere, if DOS doesn't see an 0x80 drive, or if it doesn't contain a DOS visible partition, there is probably little incentive for the kernel to skip a drive and start its assignations at D, but who knows... On the other, I do have full control of the USB creation in my application (it repartitions/reformat the whole drive always) so there may be a way to create a hidden non bootable FAT partition, have the MBR remove the hidden flag on boot, so that it gets assigned C:, then boot the second actual FreeDOS partition as D: (with or without drive masquerading), and then from FreeDOS proceed to dismount that initial C: to free up the letter so that it can be reused... The whole point of trying to get FreeDOS run from D: with C: free for grab is that the current FreeDOS HDD installation process requires C: as a target, which of course means that if you boot a FreeDOS flash drive as C: to run the HDD installer, you won't be able to proceed. Anyway, any insight on drive assignation in DOS, or ideas on how to force a specific drive letter for the FreeDOS bootable partition would be welcome. Regards, /Pete [1] http://reboot.pro/16374/page__view__findpost__p__150910 [2] https://github.com/pbatard/rufus/tree/master/res/mbr ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
