Need help getting FreeDOS to run in QEMU with network and something like SMB

  • SpinRite v6.1 Release #3
    Guest:
    The 3rd release of SpinRite v6.1 is published and may be obtained by all SpinRite v6.0 owners at the SpinRite v6.1 Pre-Release page. (SpinRite will shortly be officially updated to v6.1 so this page will be renamed.) The primary new feature, and the reason for this release, was the discovery of memory problems in some systems that were affecting SpinRite's operation. So SpinRite now incorporates a built-in test of the system's memory. For the full story, please see this page in the "Pre-Release Announcements & Feedback" forum.
    /Steve.
  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in please checkout the “Tips & Tricks” page for some very handy tips!

    /Steve.
  • BootAble – FreeDOS boot testing freeware

    To obtain direct, low-level access to a system's mass storage drives, SpinRite runs under a GRC-customized version of FreeDOS which has been modified to add compatibility with all file systems. In order to run SpinRite it must first be possible to boot FreeDOS.

    GRC's “BootAble” freeware allows anyone to easily create BIOS-bootable media in order to workout and confirm the details of getting a machine to boot FreeDOS through a BIOS. Once the means of doing that has been determined, the media created by SpinRite can be booted and run in the same way.

    The participants here, who have taken the time to share their knowledge and experience, their successes and some frustrations with booting their computers into FreeDOS, have created a valuable knowledgebase which will benefit everyone who follows.

    You may click on the image to the right to obtain your own copy of BootAble. Then use the knowledge and experience documented here to boot your computer(s) into FreeDOS. And please do not hesitate to ask questions – nowhere else can better answers be found.

    (You may permanently close this reminder with the 'X' in the upper right.)

coffeeprogrammer

Well-known member
Jul 19, 2021
139
12
I am slowly getting ready to try and start to try and learn dos internal and some assembly programming for DOS. I found a few books online on dos assembly. I wanted to run freedos in QEMU and have someway of sharing files with it via a SMB share. Getting freedos installed was easy first I used:





qemu-img create freedos.img 512M



To create the hard disk image and then



qemu-system-i386 -hda freedos.img -cdrom FD13LIVE.iso -m 16 -boot order=d -display sdl -enable-kvm -nic tap,model=e1000,mac=52:54:98:76:54:32



To boot up the iso and install. At this point I have freedos install and when I boot I get



FREEDOS_BOOTED_QEMUnetworking.png




Notice the green QEMU networking detected. I thought with the -nic parameter that I could somehow get a DHCP lease just like the host system. I was thinking that tap was like a bridge.


freedos_ne2000_driver_.png



I found on some junky old sites that I should be able to run ne2000.exe to install the driver, I was wondering if I could do that, then run DHCP.exe to get an ip address and maybe figure out how to mount a smb share some how or share the files in the freedos machine with smb. Either way. I tried to get information on the freedos wiki but it does not seem to be functioning. I think ne2000.exe needs like hardware information, when I was a kid, I think I might have used MSD.exe in dos to figure out stuff for hardware. I remember needing to know that stuff to get some dos games to work. But when I got my first 486 in 1994 I was 10, so I really did not have much of an idea what I was doing. :) I will try to post this on both grc and reddit.com/r/freedos
 
Check out THIS page: http://www.dendarii.co.uk/FAQs/dos-net.html

ALL of the development work I did for SpinRite v6.1 was done on a ZimaBoard on my local network which SMB mapped directory shares on my main development machine. So this is definitely possible. I also succeeded in doing this with a VirtualBox VM running in the same development machine. What I do NOT know about is QEMU.
 
Well I did get SMB working to and from a FreeDOS VM. I am using “The Revolutionary Guide To Assembly Language” to start which uses MASM 6. The source code is on https://archive.org/. I am including some screen shots of how I made the mappings to and from the FreeDOS VM. I created a share on a Windows 2000 VM that I found on WinWorldPC and I also got access to the FreeDOS VM from Windows 7 64. For some reason when I go into cmd and change to the FreeDOS mapped drive and type to do a “dir” I get “The system cannot find the file specified.” The biggest problem I have is that I was going to try and use CodeView to debug some of the “The Revolutionary Guide To Assembly Language” programs to figure out how to debug assembly programs. But I get a “CPU in protected or virtual mode” I googled that and I guess I can not have emm386 loaded.



I also noticed on asmirvine.com something about creating 16-bit assembly programs with modern Vs with a 16-bit link.exe, I am not sure I understand that. Anyway, this is the progress I have made so far.


I downloaded the FreeDOS VM from here:

https://www.lazybrowndog.net/freedos/virtualbox/
 

Attachments

  • win7_freedos_map_cmd_error.png
    win7_freedos_map_cmd_error.png
    33 KB · Views: 14
  • freedos_map_to_share1.png
    freedos_map_to_share1.png
    255.5 KB · Views: 13
  • freedos_ipconfig.png
    freedos_ipconfig.png
    305.1 KB · Views: 15
  • freedos_from_win7.png
    freedos_from_win7.png
    83 KB · Views: 16
  • freedos_from_win2k.png
    freedos_from_win2k.png
    20.7 KB · Views: 15
  • freedos_codeview_error.png
    freedos_codeview_error.png
    58.7 KB · Views: 19
Two other things I noticed while researching this issue. 1) It is possible to do remote debugging using a com port, do perhaps I could have two DOS VMs, one for the debugger and one for the program being debugged. 2) I am not sure if codeview is meant to run under windows, I was trying to get it to run under windows 2000 and I am not have much luck. Anyway, I took a break and shower and I might do some more googling on it.