Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
nico7550

22.06.2025, 15:07
 

RAMDISK drive letter (Users)

Hi,

Depending of the kernel I use, the ramdisk is different:

PARAGON DOS AND PTS-DOS ==> RDISK.COM

OTHERS KERNELS ==> XMSDSK.EXE

But they didn't work for Digital Research DR DOS 6.0 nor Novell DR DOS 6.0, you should use VDISK.SYS that don't have the option to force the drive letter.

BUT on this thread (https://www.reddit.com/r/DOS/comments/fsjjya/how_do_i_change_the_drive_letter_of_a_ram_drive/), a guy Paracortex (suspended account) speak about NEXTDRIV a tool that force the next available letter to be the one you want to trick the ram disk.

But I cannot find the tools. I ask to the guys on his itch.io page (https://itch.io/profile/paracortex) and I also ask to the guy who respond to him on the reddit thread. I'm really looking for this tools... Did some of you have it or now the tricks to force the letters?

Thanks

Rugxulo

Homepage

Usono,
22.06.2025, 16:53

@ nico7550

RAMDISK drive letter

I use Jason Hood's modified SHSURDRV (with the ZLIB stuff stripped out) XMSv3 386+ RAM driver. It lets me choose drive letter. I set LASTDRIVE=G usually, so I use that. (It unloads, too!) But I normally don't create beyond 200 MB because larger sizes confuse some software.

http://adoxa.altervista.org/shsufdrv/index.html

IIRC, I just reassembled it with (32-bit DJGPP) NASM 0.98.39 (needed by its weird macros), used ALINK to link it, and UPX'd it.

nico7550

22.06.2025, 18:51

@ Rugxulo

RAMDISK drive letter

Thanks, but on DR DOS 6.0 both shsurdv/shrdrv86 give a "Must be DOS 4 or later" error... using DOSVER to trick them freeze...

roytam

23.06.2025, 08:22

@ nico7550

RAMDISK drive letter

> Hi,
>
> Depending of the kernel I use, the ramdisk is different:
>
> PARAGON DOS AND PTS-DOS ==> RDISK.COM
>
> OTHERS KERNELS ==> XMSDSK.EXE
>
> But they didn't work for Digital Research DR DOS 6.0 nor Novell DR DOS 6.0,
> you should use VDISK.SYS that don't have the option to force the drive
> letter.
>

what about SRDISK?
https://github.com/FDOS/ramdisk/blob/master/srdisk/srdisk.doc

nico7550

23.06.2025, 10:03

@ roytam

RAMDISK drive letter

>
> what about SRDISK?
> https://github.com/FDOS/ramdisk/blob/master/srdisk/srdisk.doc

Thanks, I will test it.

The dummy tool seems to be the kind of soft I need, I hope it will works (as I see the sentence in the file "This DOS version does not tell the drive letter to device driver."...)

Something to bypass/reserve the disk letter to forbid the ramdisk to use them.

roytam

23.06.2025, 12:56
(edited by roytam, 23.06.2025, 13:09)

@ nico7550

RAMDISK drive letter

> >
> > what about SRDISK?
> > https://github.com/FDOS/ramdisk/blob/master/srdisk/srdisk.doc
>
> Thanks, I will test it.
>
> The dummy tool seems to be the kind of soft I need, I hope it will works
> (as I see the sentence in the file "This DOS version does not tell the
> drive letter to device driver."...)
>
> Something to bypass/reserve the disk letter to forbid the ramdisk to use
> them.

and please remember that DR DOS 5-6 don't allow drive letter beyond P: (so Q: to Z: are always unavailable no matter LASTDRIVE= is set in config.sys)

bretjohn

Homepage E-mail

Rio Rancho, NM,
24.06.2025, 01:58

@ nico7550

RAMDISK drive letter

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.

Rugxulo

Homepage

Usono,
24.06.2025, 03:00

@ nico7550

RAMDISK drive letter

You can also use FreeDOS finddisk to find (and/or go to) your RAM drive via label. Presumably then you "set RAMDRIVE=%_CWD%" or similar.

RayeR

Homepage

CZ,
24.06.2025, 18:56

@ nico7550

RAMDISK drive letter

For swapping drive letters you can use Letter Assigner v1.2.0
https://vogonsdrivers.com/getfile.php?fileid=2131&menustate=0
(it contains also DOS TSR)

---
DOS gives me freedom to unlimited HW access.

nico7550

25.06.2025, 08:39

@ roytam

RAMDISK drive letter

> and please remember that DR DOS 5-6 don't allow drive letter beyond P: (so
> Q: to Z: are always unavailable no matter LASTDRIVE= is set in config.sys)

SRDISK seems to work (no freeze) but as I use the ramdisk in autoexec and as it should be sized, I cannot use it. And as I use the ramdisk for a bootdisk, the size of the binary (80KB) forbid the use of it.

BUT SRDUMMY work as a charm.

Thanks

nico7550

25.06.2025, 08:41

@ bretjohn

RAMDISK drive letter

Thanks a lot for all the technical info, I find my need with SRDUMMY that allow me to use the smaller ramdisk provided with DR-DOS 6. Even if 20KB is not a big deal, on an overcrowled floppy it's too much

nico7550

25.06.2025, 08:42

@ nico7550

RAMDISK drive letter

I alos try to use SUBST and SWSUBST but as the disk letter I want to use is not active (no disk behind), the substitution work, no binary error, but after it didn't work...

nico7550

25.06.2025, 08:45

@ RayeR

RAMDISK drive letter

> For swapping drive letters you can use Letter Assigner v1.2.0
> https://vogonsdrivers.com/getfile.php?fileid=2131&menustate=0
> (it contains also DOS TSR)

Hi, the manual show:
Letter Assigner includes command line utility "letassig.exe" for MS-DOSĀ®. It allows to assign drive letters when working in MS-DOSĀ®. One of the possible advantages of this utility is simplification of the bootable diskette creation. Usually it is necessary to create a RAM drive using "ramdrive.sys" and copy "command.com" and some other files to that drive. However, it's impossible to predict the letter that the system assigns to that drive. Letter Assigner allows assigning any desired letter to RAM drive based on its label: "MS-RAMDRIVE".
So I assume it work only with RAMDRIV.SYS?

Thanks for the tips

I also try DLMANIP (https://sta.c64.org/dlmanipdoc.html) but it didn't support DR-DOS 6

bretjohn

Homepage E-mail

Rio Rancho, NM,
25.06.2025, 16:05

@ nico7550

RAMDISK drive letter

> I alos try to use SUBST and SWSUBST but as the disk letter I want to use is
> not active (no disk behind), the substitution work, no binary error, but
> after it didn't work...

Just FYI, I try to use SWSUBST when I can but it doesn't work with all versions of DOS. When it doesn't, I need to use the SUBST program that came with the DOS version itself (if it came with one, which most versions of DOS did).

I wrote a program called DRIVES that shows the details of all the drive letters in DOS, and it is included in my USB drivers (you can download them from www.bretjohnson.us). I wrote it to help me as I write the USB drivers for disks, but it comes in handy for other things also. DRIVES may help you troubleshoot the problem (but it may not work correctly with all versions of DOS, either, since some versions of DOS don't follow the MS standard for how all the internal DOS tables related to disks are supposed to work).

You need to make sure you're using SUBST/SWSUBST correctly (for example, not reversing the drive letters on the command line) and that you have LASTDRIVE (or LASTDRIVEHIGH if your version of DOS supports it) set correctly in CONFIG.SYS.

Back to the board
Thread view  Mix view  Order
22632 Postings in 2109 Threads, 402 registered users, 279 users online (0 registered, 279 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum