Hint: You can't use the -enable kvm parameter option, when you are using a none x86 CPU. If you run the emulation on for example an Raspberry Pi than you need the full x86 emulation because the Raspberry Pi does have an ARM based CPU.
Correct. And on this machine, it's Intel. I wrote an article some time ago about how to use QEMU on Raspberry Pi to run FreeDOS: opensource.com/article/18/3/can-you-run-dos-raspberry-pi
Год назад+2
Nice to see content about FreeDOS on a saturday night!
Some shortcuts: "-sdl" is the same as "-display sdl" "-boot d" is the same as "-boot order=d" (basically, "order=" is optional if you strictly want to boot from a certain drive) And if anyone wants to get rid of the warning about the raw images, this is how you specify the hdd: -drive format=raw,file=freedos.img The other way is to specify the format of the image type when creating freedos.img, by adding "-f qcow2" to the qemu-img command line. 5:10 Is there a technical reason that stops FreeDOS from no longer requiring a reboot after partitioning? It would be nice to not have to reboot.
Thanks for sharing that! And no, every DOS is built to read the partition table once, at boot time. The short answer to why DOS doesn't re-read the partition table later is the primary active partition may have changed when you run FDISK, and that messes up a bunch of things if that changes on the fly. See kernel/initdisk.c
@@freedosproject Thanks, although looking at the source won't help me figure out if things can be improved - not skilled enough in C, nor in that area of programming. :) My thinking was: does FreeDOS do this just because every other DOS does the same, or because it can't be done better? And if FreeDOS can do better, would that break compatibility with other DOS software?
You're welcome! I find QEMU is great to test with. VirtualBox isn't perfect, so it's good to double check if a problem is really a bug in my program or if it's a problem in the VM. So I run QEMU for that. And as I mentioned in the video, VirtualBox doesn't emulate the PC speaker, but QEMU does. So if your program needs to use the speaker (like Simple Senet, or Commander Keen, and a bunch of other DOS programs and games) and you want to *hear* that sound, then you need to run QEMU instead of VirtualBox.
The description says "most people run FreeDOS in a virtual machine." I'm happy to report that I have 1.3 installed on the bare metal on my old Thinkpad and use it regularly. I would stick with DOS exclusively on that machine if I knew how to get it on the network. Maybe another tutorial video? (Hint, hint.) 😁
As Nicolae also mentioned, you need a DOS packet driver for your network card on that machine. And I don't know of a DOS driver that supports the Thinkpad. (That said, I haven't looked very hard, since I run on virtual machine all the time.)
@@freedosproject RUclips either deleted my comments, or hid them for approval. I mentioned "packetdriversdos" twice here - a website having a nice list of packet drivers, and more. And where they lack downloads, they still have the archive name that can be used to search online.
Hello Jim! Thanks for this and all your work. I'm a follower of your channel since several month, but it's the first time I'm commenting. I'm trying to revive (and print) some old files from some very obscure DOS music notation program. Is there a way to catch DOS's printer output trough some QEMU cli param? That would be so awesome...
I used Linux exclusively in the last years, sadly my experiences with Virtualbox are a lot less good than yours. I had exactly the same ISO be unstable on Virtualbox while working perfectly fine on QEMU, including a 2018 Ubuntu. On Virtualbox I would get black screens when resuming the VM or restarting it (after shutdown), I would have the VM hanging when switching between workspaces or going from windowed to fullscreen. On With QEMU no problem at all. For these reasons I highly recommend Linux-users to not use Virtualbox but use QEMU, I recommend to use virt-manager or any other suitable GUI-frontend for it but if you know how to do it from the terminal then power to you! Awesome.
Great points, Peter. I can't understand why people would run VirtualBox these days. On top of your points, everything in QEMU can be automated with Application Programming Interfaces via scripts / Ansible
Looks like at least 1 facet of this is now out of date, i.e. `-soundhw pcspk` is now be deprecated, trying to use it you will get an output: '-soundhw pcspk' is deprecated, please set a backend using '-machine pcspk-audiodev=' instead', but I'm not exactly sure what it means by , what am I meant to put here? Also, any idea how to add the PC speaker in virt-manager? Thank you.
You can briefly see the same message on my screen at 8:43 in the video. That option is deprecated, but I'm still using it. :-P The preferred option is to give it the device name of the sound system under /dev/snd but I haven't investigate that yet. (My easiest path will probably be to start FreeDOS in GNOME Boxes, and examine the command line from "ps" to see what device it is using. GNOME Boxes uses QEMU for the back-end.)
@@powerfulaura5166 I just upgraded to Fedora Linux 38, and the new version of QEMU (7.2.0) doens't like the -soundhw option *at all* so now I'm stuck. The man page says "The PC speaker audio device can be configured using the pcspk-audiodev machine property, i.e. qemu-system-x86_64 some.img -audiodev ,id= -machine pcspk-audiodev=" I'll have to experiment with that.
I installed FreeDOS 1.3 on my M2 MacBook by UTM (modified QEMU) emulation. The installation was successful, but after I rebooted the VM, it said " QEMU network detected. Physical hardware networking is not supported at this time." So what should I do to connect the net? Thanks!
I can do an updated video for this, probably to show one of hte monthly test releases. Here's a quick update on how I installed T2410 test release: - create the virtual disk: qemu-img create -f qcow2 2410.qcow2 500M - install: qemu-system-i386 -enable-kvm -m 32 -cdrom T2410/T2410LIVE.iso -hda 2410.qcow2 -boot order=d - after install, now you can boot FreeDOS: qemu-system-i386 -enable-kvm -m 32 -rtc base=localtime -audiodev pa,id=snd -machine pcspk-audiodev=snd -device sb16,audiodev=snd -device adlib,audiodev=snd -hda 2410.qcow2 -hdb data.qcow2 -cdrom T2410/T2410BNS.iso -boot menu=on This has extra options for sound, too.
That suggests one of two things: 1. You installed FreeDOS 1.3 "plain DOS only" or 2. You don't have one of the FreeDOS CD images inserted in your system when you run FDIMPLES.
1) Create an empty file and give it the name of the command that you want to use to start your machine, e.g. 'startfreedosvm" 2) Start FreeDos with all the parameters you want until you're happy with your configuration, then copy the command line you used from the terminal window and paste it into your startfreedosvm file. If you use full paths for your HDD image file and CD image file, you'll be able to start your FreeDos VM from anywhere. 3) type 'sudo chmod +x startfreedosvm' to make it executable 4) run it by typing './startfreedosvm' optional: 5) Add 'export PATH=:$PATH' to the .bashrc file in your home directory Example: export PATH=/home/username/qemu/freedos/:$PATH 6) Close and re-open the terminal window to reload the PATH variable. Just typing 'startfreedosvm' should now start your VM
^^ Came to say exactly this (I have a Bash shell script on my Linux system called 'freedos' that I use to launch FreeDOS in QEMU from the command line)
Definitely. I've booted FreeDOS on Raspberry Pi with QEMU too, and had the same experience. Very slooooooooooooooooow to install (also because I/O limited with SD) and not great for games - but for everyday apps, it's fine. In emulation, def no slower than a '486 of the era.
Hi, please help me install FreeDOS on a flash drive, I downloaded version 1.3 Full USB and when I open it says "The disk image file is corrupted" I tried reinstalling and it's the same, then I downloaded the Lite USB version and there was no error "Disk image file damaged", but not the laptop did not boot from this flash drive. This problem is not in the flash drive
I see you emailed me too. I'll reply to you there. Short answer: I don't know how you tried to write the USB image to the USB drive. You should use an image-writer program like Rufus.
First, you need to set up QEMU to provide networking. QEMU doesn't provide that by default-but other virtual machine systems usually do. For example, VirtualBox provides networking to "guest" operating systems, by default. If you're running FreeDOS in VirtualBox, it's easy-if you've installed the networking packages, the bootup process should recognize that it's running on VirtualBox and get an IP address automatically.
I'm using Linux, and -enable-kvm works on Linux. Maybe it's a different command line option for Windows? Check the QEMU user guide to see what it suggests. For sound, try "-device sb16 -device adlib"
I use Linux on my desktop, so I'm not the best person to answer about Windows. I thought if you right-click on the IMG file in Windows, that Windows will let you access it as a drive? (That's what GNOME/Linux does, so I assumed the same on Windows.)
Hi, How about showing us how to install FreeDos natively on a system (meaning NOT in a virtual machine), and also maybe with a Linux dual boot, for example. Everything I’ve tried to boot from a USB drive has miserably failed, and there is virtually no support or any info on how to do this on the web site. And all the methods I’ve seen online, and I mean ALL, have just been complete garbage. I’d like to boot a machine into FreeDos like I used to boot my IBM PC AT back in the day…
@FreeDOS Today I created - after your instructions in this video - successfully an bootable FreeDOS Image. Then I "installed" with IMDisk (to mount the Image in Windows) RunCPM 16Bit, which does run in qemu faster than in DOXBox-X or VDOS with the --whpx option Which is the -enable-kvm (only useable in Linux) for Windows But --whpx doesnt seem to like cdrom as option so I installed in the slow mode :) and then removed CDROM-support (also in FDAUTO.BAT)
I'm glad you are running FreeDOS now! ☺ I run FreeDOS in QEMU all of the time, it's my preferred way to boot FreeDOS on my Linux box. I used to run VirtualBox, but I can't remember the last time I installed VirtualBox.
Thanks for this clear explanation. Cheers from Canada!
Hint: You can't use the -enable kvm parameter option, when you are using a none x86 CPU. If you run the emulation on for example an Raspberry Pi than you need the full x86 emulation because the Raspberry Pi does have an ARM based CPU.
Correct. And on this machine, it's Intel. I wrote an article some time ago about how to use QEMU on Raspberry Pi to run FreeDOS: opensource.com/article/18/3/can-you-run-dos-raspberry-pi
Nice to see content about FreeDOS on a saturday night!
Enjoy! ☺
Some shortcuts:
"-sdl" is the same as "-display sdl"
"-boot d" is the same as "-boot order=d" (basically, "order=" is optional if you strictly want to boot from a certain drive)
And if anyone wants to get rid of the warning about the raw images, this is how you specify the hdd:
-drive format=raw,file=freedos.img
The other way is to specify the format of the image type when creating freedos.img, by adding "-f qcow2" to the qemu-img command line.
5:10 Is there a technical reason that stops FreeDOS from no longer requiring a reboot after partitioning? It would be nice to not have to reboot.
Thanks for sharing that!
And no, every DOS is built to read the partition table once, at boot time. The short answer to why DOS doesn't re-read the partition table later is the primary active partition may have changed when you run FDISK, and that messes up a bunch of things if that changes on the fly. See kernel/initdisk.c
@@freedosproject Thanks, although looking at the source won't help me figure out if things can be improved - not skilled enough in C, nor in that area of programming. :)
My thinking was: does FreeDOS do this just because every other DOS does the same, or because it can't be done better? And if FreeDOS can do better, would that break compatibility with other DOS software?
Any way to share files using samba with Windows or Android hosts?
I didn't know that qemu has installed by default. Thanks for the video.
You're welcome! I find QEMU is great to test with. VirtualBox isn't perfect, so it's good to double check if a problem is really a bug in my program or if it's a problem in the VM. So I run QEMU for that.
And as I mentioned in the video, VirtualBox doesn't emulate the PC speaker, but QEMU does. So if your program needs to use the speaker (like Simple Senet, or Commander Keen, and a bunch of other DOS programs and games) and you want to *hear* that sound, then you need to run QEMU instead of VirtualBox.
The description says "most people run FreeDOS in a virtual machine." I'm happy to report that I have 1.3 installed on the bare metal on my old Thinkpad and use it regularly. I would stick with DOS exclusively on that machine if I knew how to get it on the network. Maybe another tutorial video? (Hint, hint.) 😁
What network hardware do you have in there? You'll need to load a DOS packet driver for it, if one exists.
As Nicolae also mentioned, you need a DOS packet driver for your network card on that machine. And I don't know of a DOS driver that supports the Thinkpad. (That said, I haven't looked very hard, since I run on virtual machine all the time.)
@@freedosproject What about other solutions like an USB Ethernet adapter? A PCMCIA Ethernet network card should also work.
If there's a DOS package driver for it, then that would work.
@@freedosproject RUclips either deleted my comments, or hid them for approval. I mentioned "packetdriversdos" twice here - a website having a nice list of packet drivers, and more. And where they lack downloads, they still have the archive name that can be used to search online.
Teşekkürler. Faydalı bir video olmuş. İnşallah devamı gelir ;)
Definitely more coming! I've queued up videos for the next few weeks, every weekend.
Hello Jim! Thanks for this and all your work. I'm a follower of your channel since several month, but it's the first time I'm commenting.
I'm trying to revive (and print) some old files from some very obscure DOS music notation program. Is there a way to catch DOS's printer output trough some QEMU cli param? That would be so awesome...
I used Linux exclusively in the last years, sadly my experiences with Virtualbox are a lot less good than yours. I had exactly the same ISO be unstable on Virtualbox while working perfectly fine on QEMU, including a 2018 Ubuntu. On Virtualbox I would get black screens when resuming the VM or restarting it (after shutdown), I would have the VM hanging when switching between workspaces or going from windowed to fullscreen. On With QEMU no problem at all. For these reasons I highly recommend Linux-users to not use Virtualbox but use QEMU, I recommend to use virt-manager or any other suitable GUI-frontend for it but if you know how to do it from the terminal then power to you! Awesome.
Great points, Peter. I can't understand why people would run VirtualBox these days. On top of your points, everything in QEMU can be automated with Application Programming Interfaces via scripts / Ansible
Looks like at least 1 facet of this is now out of date, i.e. `-soundhw pcspk` is now be deprecated, trying to use it you will get an output:
'-soundhw pcspk' is deprecated, please set a backend using '-machine pcspk-audiodev=' instead', but I'm not exactly sure what it means by , what am I meant to put here? Also, any idea how to add the PC speaker in virt-manager? Thank you.
You can briefly see the same message on my screen at 8:43 in the video. That option is deprecated, but I'm still using it. :-P The preferred option is to give it the device name of the sound system under /dev/snd but I haven't investigate that yet. (My easiest path will probably be to start FreeDOS in GNOME Boxes, and examine the command line from "ps" to see what device it is using. GNOME Boxes uses QEMU for the back-end.)
@@freedosproject Sorry for not catching that message. So what you're saying is it still works?
@@powerfulaura5166 I just upgraded to Fedora Linux 38, and the new version of QEMU (7.2.0) doens't like the -soundhw option *at all* so now I'm stuck.
The man page says "The PC speaker audio device can be configured using the pcspk-audiodev machine property, i.e. qemu-system-x86_64 some.img -audiodev ,id= -machine pcspk-audiodev="
I'll have to experiment with that.
I installed FreeDOS 1.3 on my M2 MacBook by UTM (modified QEMU) emulation. The installation was successful, but after I rebooted the VM, it said " QEMU network detected. Physical hardware networking is not supported at this time." So what should I do to connect the net? Thanks!
yeah im wondering on the same thing. cant find any answers yet
Hey Jim, is there any chance of an updated version of this tutorial? QEMU 7 apparently doesn't work like the version you have here?
I can do an updated video for this, probably to show one of hte monthly test releases. Here's a quick update on how I installed T2410 test release:
- create the virtual disk:
qemu-img create -f qcow2 2410.qcow2 500M
- install:
qemu-system-i386 -enable-kvm -m 32 -cdrom T2410/T2410LIVE.iso -hda 2410.qcow2 -boot order=d
- after install, now you can boot FreeDOS:
qemu-system-i386 -enable-kvm -m 32 -rtc base=localtime -audiodev pa,id=snd -machine pcspk-audiodev=snd -device sb16,audiodev=snd -device adlib,audiodev=snd -hda 2410.qcow2 -hdb data.qcow2 -cdrom T2410/T2410BNS.iso -boot menu=on
This has extra options for sound, too.
my problem is with the fdimples where idk what to do to be able to see other packages currently only installed packages are shown
That suggests one of two things: 1. You installed FreeDOS 1.3 "plain DOS only" or 2. You don't have one of the FreeDOS CD images inserted in your system when you run FDIMPLES.
is there a way to make a configuration file so we can avoid always having to specify all those flags on the command line?
1) Create an empty file and give it the name of the command that you want to use to start your machine, e.g. 'startfreedosvm"
2) Start FreeDos with all the parameters you want until you're happy with your configuration, then copy the command line you used from the terminal window and paste it into your startfreedosvm file. If you use full paths for your HDD image file and CD image file, you'll be able to start your FreeDos VM from anywhere.
3) type 'sudo chmod +x startfreedosvm' to make it executable
4) run it by typing './startfreedosvm'
optional:
5) Add 'export PATH=:$PATH' to the .bashrc file in your home directory
Example: export PATH=/home/username/qemu/freedos/:$PATH
6) Close and re-open the terminal window to reload the PATH variable. Just typing 'startfreedosvm' should now start your VM
^^ Came to say exactly this (I have a Bash shell script on my Linux system called 'freedos' that I use to launch FreeDOS in QEMU from the command line)
The easiest way is to just use virt-manager.
Nice. I tried this on a Raspberry Pi 4 (without the -enable kvm option, of course). It's too slow for games, but usable for editing text etc.
Definitely. I've booted FreeDOS on Raspberry Pi with QEMU too, and had the same experience. Very slooooooooooooooooow to install (also because I/O limited with SD) and not great for games - but for everyday apps, it's fine. In emulation, def no slower than a '486 of the era.
nice one!
Thanks!
Hi, please help me install FreeDOS on a flash drive, I downloaded version 1.3 Full USB and when I open it says "The disk image file is corrupted" I tried reinstalling and it's the same, then I downloaded the Lite USB version and there was no error "Disk image file damaged", but not the laptop did not boot from this flash drive. This problem is not in the flash drive
I see you emailed me too. I'll reply to you there. Short answer: I don't know how you tried to write the USB image to the USB drive. You should use an image-writer program like Rufus.
How do you set up networking?
First, you need to set up QEMU to provide networking. QEMU doesn't provide that by default-but other virtual machine systems usually do. For example, VirtualBox provides networking to "guest" operating systems, by default. If you're running FreeDOS in VirtualBox, it's easy-if you've installed the networking packages, the bootup process should recognize that it's running on VirtualBox and get an IP address automatically.
hello! can you create a tutorial of installation of FreeDOS on a usb stick?
I'll add this to my list of videos to do.
enable-kvm, sound-hw does not work for me, I'm using msys2 in windows (invalid accelerator)
I'm using Linux, and -enable-kvm works on Linux. Maybe it's a different command line option for Windows? Check the QEMU user guide to see what it suggests.
For sound, try "-device sb16 -device adlib"
What is the easiest method to extract (or write) data inside this IMG file?? 7zip can extract data from this file, but how to save?? /in windows/
I use Linux on my desktop, so I'm not the best person to answer about Windows. I thought if you right-click on the IMG file in Windows, that Windows will let you access it as a drive? (That's what GNOME/Linux does, so I assumed the same on Windows.)
Find a way to mount .img file as a drive (WinCDEmu maybe)
it would be much more convenient for us if you LIST the commands in the description
Hi,
How about showing us how to install FreeDos natively on a system (meaning NOT in a virtual machine), and also maybe with a Linux dual boot, for example. Everything I’ve tried to boot from a USB drive has miserably failed, and there is virtually no support or any info on how to do this on the web site. And all the methods I’ve seen online, and I mean ALL, have just been complete garbage.
I’d like to boot a machine into FreeDos like I used to boot my IBM PC AT back in the day…
Noted. I'm planning to pick up a spare laptop later this Fall (October?) so I'll show it on that.
@@freedosproject That would be AWESOME!! Thank you!! 🙏
THIS is.. Gentlemen.
@FreeDOS Today I created - after your instructions in this video - successfully an bootable FreeDOS Image. Then I "installed" with IMDisk (to mount the Image in Windows) RunCPM 16Bit, which does run in qemu faster than in DOXBox-X or VDOS with the --whpx option
Which is the -enable-kvm (only useable in Linux) for Windows
But --whpx doesnt seem to like cdrom as option so I installed in the slow mode :) and then removed CDROM-support (also in FDAUTO.BAT)
I'm glad you are running FreeDOS now! ☺ I run FreeDOS in QEMU all of the time, it's my preferred way to boot FreeDOS on my Linux box. I used to run VirtualBox, but I can't remember the last time I installed VirtualBox.