FreeDOS in qemu: no internet-connection

Hi all, :wave:

I was thinking the following:

As ITSFOSS deals with “Free and Open Source Software” I thought I could post my FreeDOS problem here as well. :blush:
My reasoning was thus:

So here I am, trying to get some help from you, although I suspect it might be a bit tricky this time… :blush:

BTW:

I also posted the topic by subscribing to the FreeDOS mailing-list. It´s also being archived and my post is located here: The FreeDOS Project / Thread: [Freedos-user] FreeDOS in qemu: no internet-connection .
I haven´t received any answer so far there.
So here is my problem:

I want to get FreeDOS going within qemu.

Quite a long time ago I downloaded the respective iso-file and the installation went well.
In principle FreeDOS works fine with the exception of networking. I simply can´t get qemu to let FreeDOS connect to the internet (but formerly I could; see below). :thinking:

My command-line is:

qemu-system-i386 -m 32M -drive file=drivec.img,media=disk,format=raw -net nic,model=pcnet -net user -drive file=FD12CD.iso,media=cdrom -boot order=d

According to the instructions on Networking FreeDOS - Quick Networking HowTo - FreeDOS I installed FDNET, mTCP and wget in FreeDOS. So things should work. Yet they don´t (any more). :slightly_frowning_face:

When starting FreeDOS everything looks right at first:

QEMU network detected

DHCP request sent, attempt 1: Offer received, Acknowledged
Good news everyone!

IPADDR = 10.0.2.15
NETMASK = 255.255.255.0
GATEWAY = 10.0.2.2
NAMESERVER = 10.0.2.3  
LEASE_TIME = 86400 seconds

That used to work in the past. But things seem to have changed as of late:

When trying to use ping or the links browser internet connection doesn´t seem to be established:

configuring through DHCP...failed
configuring through RARP...failed
error loading ... URL
Host not found

I don´t know whether it has something to do with the fact that my means of connecting to the internet has changed in the meantime. :thinking:

I used to use a 3G-umts-stick (Huawei E 1550) , which was recognized as a modem and used “ppp0”.
My new 4G-stick is Huawei E 3372 and this one seems to work as a router; so my internet connection is recognized as LAN (wired) connection.

I´m guessing I have to change some settings in C:\FDOS\WATTCP.CFG, but I´m not sure at all.

So that´s all I can tell so far.
Any help is - as always - highly appreciated. :slightly_smiling_face:

Many thanks in advance.
Many greetings.
Rosika :slightly_smiling_face:

P.S.:

my system (host): Linux/Lubuntu 20.04.4 LTS, 64bit
FreeDOS 1.2

Hi.
What a coincidence, I’m fu*ing around with qemu/KVM myself for the last few days.
Just set up a FreeDos today…
I, too have no working network.
On boot it says something like “Physical Hardware network not supported at this time”

Tried quite some stuff (see screenshot) both in terminal and virt-manager with no luck.
Someone suggested to install some network card drivers (see here), but I didn’t test it so far…
It seems, it is possible (see here)
Just throwing it in, maybe it helps.

/edit
Just found this. Creating a bridge and assigning eth0 to it, then getting an address:

ifconfig eth0 down
brctl addbr br0
ifconfig eth0 0.0.0.0 up
brctl addif br0 eth0
ifconfig br0 0.0.0.0 up
dhclient br0

Create a new “TAP” device for the user and assign it to the bridge:

tunctl -t tap0 -u user
ifconfig tap0 0.0.0.0 up
brctl addif br0 tap0

Start the VM with:

qemu -monitor stdio -soundhw sb16 -k de -m 32 -cdrom /dev/cdrom -hda qemu_freedos -net nic,model=pcnet -net tap,ifname=tap0,script=no

When shutting down the VM the bridge is removed:

ifconfig tap0 down
tunctl -d tap0
ifconfig br0 down
brctl delbr br0
dhclient eth0

Don’t know if appropriate. As an apprentice I don’t like messing around with my network thingies, when I don’t really know what I just do… :wink:

Greetings

1 Like

Just curious why you’re going the VM route, when there’s DOSBox for Linux?

Is there some functionality FreeDOS in a VM gives you that you can’t get from DOSBox?

For me - DOSBox is as simple as :

sudo apt install dosbox
(which I just did now)
image
image

Just tried ping, but doesn’t seem like the binary is there… I guess I could copy it from somewhere (I have an archive of DOS boot disk images with utilities on them) to find out if I have a TCP/IP stack… I’m old enough to remember if you wanted TCP on DOS, you had to BUY a TCP/IP stack! Not cheap either, unless you bought them in massive multi-user license deals… Then Novell started giving them away, then Microsoft threw one in (they got most of the code from BSD) with Windows for Workgroups 3.11 “TCP/IP Add On” (free download).

2 Likes

Earlier, I had the impression FreeDOS was supposed to run Windows programs, which would make it superior to what the name implies. Then I visited the website and indeed, it’s just some DOS.

So, your question legitimate. I had experience with DOSBox in the past and it worked well. Actually, I have a number of old adventure games fully prepared, so I just need to click a shortcut and the DOSBox instance opens automatically with the game starting, without me having to set up anything on each start.

2 Likes

Hi everyone, :wave:

thanks so much to all of you for your answers. :heart:

@Fast.Edi:

Hi Edgar,

Wow, that´s quite some coincidence indeed. :smiley:
Sorry to hear you too cannot connect to the internet.

As to your first link:
I took a look at at it and it seems quite comprehensive.
To be honest, I think it´ll take some time for me to get through it all. So I cannot reply to it directly (yet). But thanks for providing the link.

As to you second link:
Yes, indeed, it was me who posted it at linuxquestions.org . :blush:
That was quite some time ago (09-14-2018) and I could solve the problem back then.

But the command which was posted as a solution by me doesn´t work anymore - for reasons unknown to me. Therefore my asking around here…

Exactly my sentiments as well. Perhaps I´m over-cautions, but better safe than sorry. :wink:

As for “bridge” I found this in “Connection Information” on my host:

…so it seems there´s a bridge for my “wired connection” already. But perhaps I´m mistaken there and prone to mis-interpret things… :thinking:

Anyhow I tried the values I got from there and modified WATTCP.CFG in FreeDOS to that effect. But it yielded no results either. Still no internet connection. :slightly_frowning_face:

Thanks a lot for your help, Edgar. :heart:

@daniel.m.tripp:

Hi Dan,

uh, I´ve heard of dosbox already but could never bring myself to deal with the matter in detail.
I´ve always been using VMs (even FreeDOS worked in the past with kvm/qemu) and it bugs me quite a bit to see things don´t work anymore although they used to.

Besides it´s easy to sandbox qemu VMs with firejail, although I found out that firejail indeed seems to provide a dedicated profile for dosbox as well :wink:

ll /etc/firejail | grep dosbox
-rw-r--r-- 1 root root  820 Feb  9 18:06 dosbox.profile

So this might be an alternative. Thanks for the suggestion. :+1:
I hope to be able to look into it soon…

@Akito:

Hi Akito,

yes, you´re right.
That´s what I get from FreeDOS too:

FreeDOS (formerly Free-DOS and PD-DOS) is a free operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running legacy software and supporting embedded systems.

Thanks a lot to all of you.
Many greetings from Rosika :slightly_smiling_face:

Hi Dan, :wave:

just wanted to let you know I installed DOSBox in the meantime (running in my Debian VM).

It went well and I even could get DOSBox to run in a larger window than the default one. :wink:
A good how-to can be found here: DOSBox resolution: full screen, window size, clear graphics .
It runs great within firejail. So actually nothing to complain about. :slightly_smiling_face:

…except this one thing: It seems a bit awkward not to be able to scroll the terminal output.
Yet it has to said it´s the same with FreeDOS

Oh well.

Thanks for your suggestion, Dan. DOSBox really seems to be a nice programme.

Many greetings.
Rosika :slightly_smiling_face:

2 Likes