LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   DOS Machine on qemu/kvm (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/dos-machine-on-qemu-kvm-4175705638/)

jogl_z_8 12-31-2021 03:12 PM

DOS Machine on qemu/kvm
 
What is the easiest way to get a DOS machine running on qemu/kvm virtual machine?

Just wasted a good part of a day trying to get freedos to load.

Having bad memories of why I hate MS.

On debian 10 platform, if that matters.

Thanks.

mredc 12-31-2021 06:29 PM

Did you try the procedures at this link?

http://wiki.freedos.org/install/

Or this one?

https://www.youtube.com/watch?v=o09FLGmbdp4

What's new with using DOS that you would want to install it in this day and age?

jogl_z_8 01-01-2022 05:29 AM

1 Attachment(s)
Yes, have tried those.

Keep getting to the point in attached screen grab and hangs.

Quote:

root@xeon:/home/jogl# qemu-system-x86_64 -hda c.hd -drive format=raw,media=cdrom,readonly,file=/home/jogl/Downloads/freeDos/FD13-LiveCD/FD13LIVE.iso -boot d
WARNING: Image format was not specified for 'c.hd' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
I don't know if the "raw c.hd" is the problem but I have been going through the qemu manual and cannot figure how to get rid of that error.

jogl_z_8 01-01-2022 05:53 AM

1 Attachment(s)
Also tried installing MSDOS6.22 using these instructions:

https://virtualisedreality.com/2009/...-6-22-in-a-vm/

with fail.

jogl_z_8 01-01-2022 05:54 AM

Has to be something simple that I'm not aware of.

Turbocapitalist 01-01-2022 06:25 AM

What about DOSBox?

jogl_z_8 01-01-2022 06:36 AM

Would I be able to use a serial port with Dosbox? Ie.: the ttyS0 port with a DB9 connector.

What I am trying to do is get some files off of a very old (Compaq Contura) laptop. The floppy does not work on the laptop, but it has Laplink installed. So if I can just get a DOS anything working with a serial port I'm hoping that I can transfer files from the lappy.

Thanks,
JP.

Turbocapitalist 01-01-2022 06:38 AM

It appears that it can

https://www.dosbox.com/DOSBoxManual.html#Multiplayer

so it might be worth checking it. The Qemu approach can take a while to debug.

michaelk 01-01-2022 07:08 AM

I can confirm that serial ports work with dosbox. Another option is virtualbox. I have both freedos and DOS 6.22 running in a VM.

jogl_z_8 01-01-2022 07:34 AM

Looking into dosbox, it is running but have not figured out how to run

Code:

MODE COM1:2400,n,8,1,p
CTTY COM1

on it yet. That is normally how Laplink, the file transfer software on the old Compaq, works.


If I put Virtual Box on my VM server would I have to remove qemu/kvm? Is Virtualbox easier to get guests running on?

Turbocapitalist 01-01-2022 07:46 AM

Qemu and VirtualBox are not mutually exclusive. Though ease of use is relative. I find Qemu preferable to VirtualBox but have no recent experience with any form of DOS. If I recall correctly, the last time I did use a DOS was to use GRUB to boot into FreeDOS directly. So if you have a spare machine to boot, using GRUB might be another option. Though Qemu should boot FreeDOS with the right options.

mredc 01-01-2022 09:39 AM

Just in case you were still interested installing qemu-kvm I reformatted your original command:

Code:

qemu-system-x86_64 -hda c.hd -drive format=raw,media=cdrom,readonly,file=/home/jogl/Downloads/freeDos/FD13-LiveCD/FD13LIVE.iso -boot d
Using I was able to start the installation and the error that you got before did not appear.

Code:

qemu-system-x86_64 -blockdev driver=raw,node-name=disk,file.driver=file,file.filename=c.hd -drive format=raw,media=cdrom,readonly,file=/home/jogl/Downloads/freeDos/FD13-LiveCD/FD13LIVE.iso -boot d
On a side note, I ran the command as you listed earlier and although I got the error message that you got, the installation did start. I am using Debian. It is version 10. I am using the i3 window manager. I don't know if that may have any bearing on the situation though.

Turbocapitalist 01-01-2022 09:57 AM

Well, even the official FreeDOS documentation seems to be out of date, with a few deprecated Qemu options, but it boots FreeDOS nevertheless, at least for now:

Code:

qemu-img create freedos.img 150M
after the giant drive is allocated, the following is mostly copied from the FreeDOS page linked above,

Code:

qemu-system-i386  \
        -name FreeDOS,process=freedos \
        -machine pc-i440fx-4.2,accel=kvm,usb=off,dump-guest-core=off \
        -enable-kvm \
        -cpu host \
        -m 8 \
        -overcommit mem-lock=off \
        -no-user-config \
        -nodefaults \
        -rtc base=utc,driftfix=slew \
        -no-hpet \
        -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
        -msg timestamp=on \
        -device sb16 \
        -device adlib \
        -soundhw pcspk \
        -vga cirrus \
        -display sdl \
        -usbdevice mouse\
        -drive format=raw,media=disk,cache=none,index=0,file=freedos.img \
        -cdrom FD13LIVE.iso \
        -boot d

Then you'll have to boot three times. Once to partition the drive space, once to format the drive and install FreeDOS, then once again to actually boot from the designated drive space. The last choice can go with the options above and wait for the boot menu it presents, or by else change the one line from -boot d to -boot c once FreeDOS has been successfully installed.

I took a quick look at trying to use mount on the disk image, but made no progress to get past its complaints about wrong fs type, bad option, bad superblock, missing codepage or helper program, or whatever.
However, clicking on the FreeDOS disk image in the file manager seems to give positive results. So at least on a graphical system, like a desktop, you can get at your DOS files that way.

jogl_z_8 01-01-2022 09:58 AM

Thanks, but still hangs at same spot.

mredc 01-01-2022 10:18 AM

I am sorry, I didn't look at your screenshot from before. You seem to be using the wrong menu item on the install page. You need to choose Install to Harddisk. Like you said something simple being overlooked


All times are GMT -5. The time now is 10:29 PM.