RAMDISK drive letter (Users)
If you load a RAM disk in CONFIG.SYS, you can't (at least not directly) control/select the drive letter that is assigned. DOS assigns the letters of all disks automatically using its own mechanisms, and different versions/manufacturers of DOS do it differently.
If you load the RAM disk as a TSR (not in CONFIG.SYS), you can assign the drive letter. Whatever you have assigned as the LASTDRIVE creates a table in DOS memory with a table entry for each applicable letter (up to 32 "letters" in some versions of DOS, even though there are only 26 actual letters). Unused drive letters have empty table entries which can be filled in by applications that need drive letters after the system has booted (USB disks, network drives, etc.).
Some RAM disks come with a special CONFIG.SYS driver that temporarily inserts "fake" drive letter entries so that the drive letter you want the "real" CONFIG.SYS RAM disk driver to have is assigned correctly. Afterwards, the fake/temporary drive letter device driver is removed from memory.
You can also sometimes use a TSR that loads device drivers after CONFIG.SYS has run (like the FreeDOS DEVLOAD, though there are also others), but sometimes there are compatibility issues with those.
Another option, the one I use, is to load the RAM disk via CONFIG.SYS and let DOS assign whatever letter it wants and then use SUBST or SWUBST to assign the letter you actually want it to be. I actually do this with all my drive letters. For example, I use SUBST or SWSUBST to assign S: to what I call my "System" drive -- the one that almost all my applications are on. For most people, this would be C:, but in my case it's usually D: or E:. I reserve C: strictly for booting and don't use it as a data drive. After I've booted, S: is my "default" drive instead of C:. I use SUBST or SUBST to assign R: to the RAM disk, no matter what letter it was assigned by CONFIG.SYS. I also assign the TEMP and TMP environment variables to R: so my temporary files are always erased when I reboot.
The RAM disk driver I use is called TDSK (TurboDisk), which you can find if you search (or I can send it if you ask). The reason I use it is because it lets you choose the sector size of the RAM disk -- it doesn't just need to be the "normal" 512 bytes.
In MS-DOS (and I think PC-DOS), if you load a device driver in CONFIG.SYS for a disk with a sector size > 512 bytes, the DOS kernel will adjust its maximum sector size to that same value so you can load "special" disks. I don't think other versions of DOS do this (I know for sure that FreeDOS does not). This is handy for me as I am writing drivers for things like USB disks, particularly CD/DVD/BD which have a native sector size of 2k. This lets me mount optical disks which are formatted correctly (such as FAT32 with 2k sectors which is actually quite common on DVD-RAMs, though DVD-RAMs themselves are no longer common) natively into DOS and don't need any special CD/DVD/BD drivers (like MSCDEX or an equivalent).
Note that you can also modify MS-DOS hidden boot files (IO.SYS and/or MSDOS.SYS, depending on the DOS version) to handle 2k sector sizes, but I find it easier to just do it with TDSK. Again, AFAIK this only works in MS-DOS and maybe PC-DOS.
Complete thread:
- RAMDISK drive letter - nico7550, 22.06.2025, 15:07 (Users)
- RAMDISK drive letter - Rugxulo, 22.06.2025, 16:53
- RAMDISK drive letter - nico7550, 22.06.2025, 18:51
- RAMDISK drive letter - Rugxulo, 24.06.2025, 03:00
- RAMDISK drive letter - nico7550, 22.06.2025, 18:51
- RAMDISK drive letter - roytam, 23.06.2025, 08:22
- RAMDISK drive letter - nico7550, 23.06.2025, 10:03
- RAMDISK drive letter - roytam, 23.06.2025, 12:56
- RAMDISK drive letter - nico7550, 25.06.2025, 08:39
- RAMDISK drive letter - roytam, 23.06.2025, 12:56
- RAMDISK drive letter - nico7550, 23.06.2025, 10:03
- RAMDISK drive letter - bretjohn, 24.06.2025, 01:58
- RAMDISK drive letter - nico7550, 25.06.2025, 08:41
- RAMDISK drive letter - nico7550, 25.06.2025, 08:42
- RAMDISK drive letter - bretjohn, 25.06.2025, 16:05
- RAMDISK drive letter - nico7550, 25.06.2025, 08:42
- RAMDISK drive letter - nico7550, 25.06.2025, 08:41
- RAMDISK drive letter - RayeR, 24.06.2025, 18:56
- RAMDISK drive letter - nico7550, 25.06.2025, 08:45
- RAMDISK drive letter - Rugxulo, 22.06.2025, 16:53