joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.76k stars 381 forks source link

Fileexport/Filesharing from MS-DOS622 running in DOSBox-X #4639

Open w8335 opened 10 months ago

w8335 commented 10 months ago

Question

I'm testing to run my old (before 1995) development environment with DOSBox-X. So far I'm happy with that; the result looks like a verry good optimized MS-DOS 6.22 system. But I have until now not found a good way to work with a permanent storage on the mounted data-drive and further usage at the W10-world.

Have you checked that no similar question(s) exist?

Code of Conduct & Contributing Guidelines

maron2000 commented 10 months ago

But I have until now not found a good way to work with a permanant storage on the mounted data-drive and fourther usage at the W10-world.

You can elaborate what your definition is for work, permanant storage and further usage.

w8335 commented 10 months ago

The result of a development is to receive a product, mostly not only for the development system. So the question is, to bring this on a easy way for the further usage and distribution to the W10-world. During the development there where many steps with partial results. All this should be permanent stored to not loose them by closing the DOSBox-X. (there where many situations for that) For me it would be a good way to have them directly on the external W10-world (mounted data-drive) exactly as the final results.

rderooy commented 10 months ago

You can just mount any host folder as a drive in DOSBox, is that not what you want?

e.g. to create a virtual D: drive containing the contents of "mydata"...

mount D: C:\users\myuser\mydata

Any changes made there will be accessible from the host.

w8335 commented 10 months ago

This is what I do, but with the MS-DOS 622 running in DOSBox-X I can read/write from/to the emulated drive what is just a image of the real drive. There is none write to the real drive! All results where been lost just as with a RAMDrive.

rderooy commented 10 months ago

Why are you booting MS-DOS? Can you not just use the integrated DOS environment that DOSBox provides? You can just tell DOSBox to "emulate" version 6.22, instead of the default 5.0 if that is somehow important.

You can also mount any VHD image file on the host OS (just not when DOSBox-X has the file open), such that you can access the files.

w8335 commented 10 months ago

The booting with real MS-DOS 622 was just the gamechanger for DOSBox-X. It is important, because the applications where real DOS programs running on real DOS machines and where running since before 2000 in critical 365/24 environment. Because there is no problem with more hundered places there is nobody interrested to create new applications or making experiments. At the moment I have a old DOS / W95 machine for anything what must be done with this system. For the future I was looking for a new solution to keep all the benefit of the old machine inside new W10 system.

Just the moment I remember: With the flag FAT in config it will be displayed durind boot "convert to FAT". I have tried once without this flag FAT but then the previous mount was canceled.

rderooy commented 10 months ago

If this is a "critical 365/24" environment, you should not be using any flavour of DOSBox. There are no guarantees of correctness. DOSBox is primarily meant to run games.

As to folder mounts, when booting a guest OS, any changes to the folder mount from within DOSBox-X will not be made to the underlying filesystem at this point. Any changes will be lost once you reboot the guest OS or shut it down.

w8335 commented 10 months ago

Sorry, you misunderstood. The Application is running at the critical 365/24 environment. This is the reason for the real MS-DOS 622. The development system is not running in that critical environment, but it must be the real MS_DOS 622 to create everything as close to the system for getting the previous safety.

What I not understand and can also not check is the situation about the convert FAT flag. With this flag I have the mounted drive but converted as image of the real folder Without this flag I will loose after booting the previous mounted folder. So I can not check: would the mounted folder also run as writeable to the origin folder.

The convention of 8.3 fliename I must use allways, even for the MS-DOS 622 environment and just writing files should be possible without knowedge of the filesystem.

rderooy commented 10 months ago

If I remember correctly, once you boot a guest OS, any changes to a folder mount are written to a filesystem overlay. Once the guest OS ends, those changes should be written to the underlying filesystem, but are not currently.

w8335 commented 10 months ago

So I have seen this will not be done. There is just the possibility to make a image of the mounted folder. But you must do this manually and after that you must write the changed files back to the origin folder. This make it complicated and unsave. Once forgotten or something unexpected - the work of hours can be lost.

Torinde commented 10 months ago

From what you write it doesn't seem like booting MS-DOS 6.22 is required. Is any of the programs you need incompatible with running in DOSbox-X directly, without booting guest MS-DOS?

As for having the file changes kept between reboots - maybe try with mounting images (IMGMOUNT) instead of host folders.

w8335 commented 10 months ago

The files to be shareable where on host folders and must be after the job back to the host folders. To make allways images and later extract from images is many additional work. The collected datas where many files and in the summ a big size for the image, so it also would need much time to create and extract. That's the reason I was looking for a way to work with the mounted folder. So I could safe the time for making the image and also to extract the results.

w8335 commented 10 months ago

There was said during discussion to use mounted image instead host folders. For this I would need a W10 image tool with the possibility do work with the files/folders inside this image. I know Macrium as such flexible image tool, but there is a own image format what can not be mounted inside DOSBox-X.

Does anyone knows such image tool for W10? It should be possible to add/change files/folders to a existing image and also it must be possible to read files from the image.

rderooy commented 10 months ago

Is Win8+ not supposed to be able to open VHD files natively, without external tools?

w8335 commented 10 months ago

I have just now mate following check: Mount folder, booting MS-DOS image, safe mounted folder as image inside DOSBox-X.

The result can not be opened with W10 Explorer and also not with included WinZip; Winzip - "not a valid archive", Explorer - "image damage" So I see at the moment no way to work without external image software.

rderooy commented 10 months ago

Just to be clear, you cannot mount the image file on the host, if it is open in DOSBox-X at the time. You first need to unmount the image in DOSBox-X, or close DOSBox-X before you can open the image file on the host.

If it still does not work after that, how was the VHD file created?

w8335 commented 10 months ago

All that I know! The sharing conventions where known since more than 30 years and I'm also familiar with the network spezifications. And the creation of the image is written above. - safe mounted folder as image inside DOSBox-X - (it is a *.img file) There is the last entry in Drive - "create image" (I'm working with the german version, so the name is perhaps a little different)

And before you tell me, there must be something wrong about the handling of files; the created image was also moved over USB-stick to a other W10 system and give the same result. The same faults in W10 I have also with the origin MS-DOS 622 hdd image which is working for booting, and the same with the images of the 3 floppies as used for the installation the hdd image. All these where not VHD images and also not the from DOSBox-X created one.

rderooy commented 10 months ago

Ahh ok, you are using raw images. Yes those are not supported in Windows natively. But you should be able to open them using 7zip.

Alternatively, create a VHD file, which Windows 8+ should be able to open natively.

See also https://dosbox-x.com/wiki/Guide%3AManaging-image-files-in-DOSBox%E2%80%90X

w8335 commented 10 months ago

Thanks for that hint. Until now my idea was, just use what DOSBox-X have in it; and the creation of this image was served there. 7zip would not be so easy for the handling of files for previous and after DOSBox-X and in addition it's one more what can make some trouble. I will try to create a VHD file and looking how to work with this.

maron2000 commented 10 months ago

To all readers here: The solution of VHD file usage with MS-DOS 622 is a big big joke of the century! You can mount the images, but after booting they where dismounted - still not visible inside MS-DOS.

You failed because you didn't do it right. I'm not going to comment how to do it to such an impolite user against a sincere advisor.

rderooy commented 10 months ago

The Joke's on Who?

msdos6.22_on_vhd.webm

w8335 commented 10 months ago

Thanks rderooy for this well meant video. This part of MS-DOS 6.22 was running since beginning, this is not the problem.

I would need the C: drive with the installed system and developing environment. This I can manage because it must be done once. I would need also a D: drive with the application data which must run after booting the C: image. The D:drive should be work also as transfer/sharing device to the W10 world. (copy from/to, changing, deleting)

With raw images this part works, but I have until now not found a W10 image tool for write, edit, copy, delete inside this image. At beginning I have tried to do this with a mounted drive, but this is inside DOSBox-X allways only a mirror of the drive.

One of the last hint was to do this with a VHD file. This will work in W10 as attached image for handling, but after mounted the released image (also copied from a other machine) and booting from the C: drive the image is not longer mounted. This was the big joke; you can work with it externaly but it can not be mounted inside the MS-DOS 6.22 session.

Also the way with 7-zip is not useable because it is only possible to add and extract files. No change or remove where be possible under 7-zip.

rderooy commented 10 months ago

I really don't get your problem.

I can imgmount a VHD file as the C: drive, and imgmount another VHD file as the D: drive. I can then boot the C: drive, and both the C: and D: drive are available.

If I make changes to the contents of the C: or D: drives, those changes are kept across reboots.

And as long as the VHD files are not in use by DOSBox-X (open), I can mount the VHD image files on my Linux host system.

w8335 commented 10 months ago

With my installation I have 1st made with IMGMAKE the C:drive and then installed MS-DOS 6.22 with the 3 floppy image files. So the image for the C:drive finaly is a raw image. Because the raw images will not work for the W10-world, I have also made a VHD image in W10. This image I can mount as D:drive and the raw image with MS-DOS 6.22 as C:drive. Just now the C:drive and the D:drive where seen and useable in DOSBox-X. I can boot now the C:drive (MS-DOS 622) and just after booting I can not longer see the D:drive.

If I use also a raw image as D:drive it will work inside the MS-DOS 622 session. Then I also can have a C:drive and a D:drive and of course the changes made in those images will kept across reboots. But for me this is not the solution because I have to exchange data and app files to the W10-world.

Is it possible DOSBox-X can not work after boot with two different type of image? Have I to make the bootable MS-DOS 6.22 image also as a VHD image?

rderooy commented 10 months ago

Here I am mounting both a raw image and a VHD image, and booting from the raw image file. I can subsequently access both drives. raw-plus-vhd-boot.webm

w8335 commented 10 months ago

Thanks for the answer and the demo. Then it can it be only the W7 created 128MB vhd-file. I do inside DOSBox-X exactly the same. In my situation the mounted vhd is available as D:-drive but after booting the C:-drive it will not longer be there.

On which way you have created the vhd-image? At the moment I have no tool for images outside Windows. Macrium will not work for that.

rderooy commented 10 months ago

imgmake hdd.vhd -t vhd -size 200

w8335 commented 10 months ago

Thanks, thank, thanks a lot. This will work. But where have you found this? IMGMAKE and the dokumenation tells nothing about VHD.

rderooy commented 10 months ago

it is mentioned when you run imgmake /? and it is mentioned on the wiki page I mentioned before (although that has an error in the instruction, which I fixed for the next release).

w8335 commented 10 months ago

Once more thanks for your assistance. The info for the VHD is really hard to find. In my version /? tells nothing about VHD also not at -examples. A tip for the documentation: Please add this information also at the place of function IMGMOUNT. As I was looking for the possibilities I was looking over there and not near the end at supporting VHD in the printed 26 pages from WIKI.

rderooy commented 10 months ago

VHD support was only very recently added. Hence the light documentation.

w8335 commented 10 months ago

Hello again Sorry to reopen this case. Everything has looked well as I would need it. In between the copy of the old environment was done to the MS-DOS 6.22 image and also the copy of data and app results to the vhd image.

Now I get a situation what is not understandable for me: With the vhd image mounted as D:drive and imagemounted the installed MS-DOS 6.22 as C:drive I get a error during booting the C:drive; it will not be known as bootable system. The same with a other MS-DOS 6.22 image. Both images will boot without the mounted vhd image (D:drive) normaly.

Any idea what could get such situation?