{"id":11347,"date":"2025-08-05T02:00:00","date_gmt":"2025-08-05T06:00:00","guid":{"rendered":"https:\/\/www.both.org\/?p=11347"},"modified":"2025-07-31T19:13:21","modified_gmt":"2025-07-31T23:13:21","slug":"booting-freedos-with-two-cd-rom-drives","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=11347","title":{"rendered":"Booting FreeDOS with two CD-ROM drives"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"11347\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><\/div>\n<p>In the 1980s and 1990s, DOS was my favorite operating system. There were a ton of great DOS applications and games. And the great thing about DOS is that it provides great backwards compatibility, so you don&#8217;t have to keep &#8220;rebuilding&#8221; the DOS programs to run them on a different version of DOS. It&#8217;s all &#8220;DOS.&#8221; That means I can still run my favorite DOS applications and games, even in 2025, using the <a href=\"https:\/\/www.freedos.org\/\">FreeDOS Project<\/a>.<\/p>\n\n\n\n<p>I have a &#8220;retro&#8221; &#8216;386-SX40 laptop if I want to run FreeDOS on real hardware\u2014but most of the time, I just run FreeDOS in a &#8220;window&#8221; on Linux, using a virtual machine. There are a lot of great virtual machine systems that run DOS, but my favorite is QEMU. This is a very flexible virtual machine that is included by default on many Linux distributions. If it&#8217;s not installed on your Linux system, you should be able to install it as a package, such as with the <strong>dnf<\/strong> command on Fedora:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo dnf install qemu<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"from-the-command-line\">From the command line<\/h2>\n\n\n\n<p>While other virtual machine systems like VirtualBox use a graphical interface to configure the machine, QEMU does everything from the command line. This actually works well for me; I like to use the command line anyway. For example, I use these two commands to create a virtual disk and boot the FreeDOS LiveCD to install FreeDOS on it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ qemu-img create -f qcow2 freedos.qcow2 500M\n$ qemu-system-i386 -hda freedos.qcow2 -cdrom T2507LIVE.iso -boot order=d<\/code><\/pre>\n\n\n\n<p>That uses the FreeDOS &#8220;July 2025&#8221; monthly test release (<code>T2507<\/code>) but you can do the same with any version of FreeDOS. The <code>-hda<\/code> option tells QEMU to use the disk image as the first IDE disk, and <code>-cdrom<\/code> indicates the ISO image to use for the CD-ROM drive. The <code>-boot order=d<\/code> option instructs QEMU to only boot from the CD-ROM drive, which lets me install FreeDOS from CD.<\/p>\n\n\n\n<p>After that, I use a longer variation of that command line to define a second virtual disk with my personal files, sound, local time, and other options. I put all of that into a script called <code>qemu<\/code>, so I can just run that to boot FreeDOS in QEMU:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\nhda=\/opt\/freedos\/T2507\/freedos.qcow2\nhdb=$HOME\/virtualmachines\/files.qcow2\ncd=\/opt\/freedos\/T2507\/T2507BNS.iso\n\nsound='-audiodev pa,id=snd -machine pcspk-audiodev=snd -device sb16,audiodev=snd -device adlib,audiodev=snd'\nkbd='-global i8042.kbd-throttle=on'\nboot='-boot menu=on'\n\nqemu-system-i386 -enable-kvm -m 32 -rtc base=localtime $sound $kbd -hda $c -hdb $d -cdrom $cd $boot \"$@\"<\/code><\/pre>\n\n\n\n<p>I prefer to keep my personal files on a separate virtual disk so I don&#8217;t have to back up and restore my files when I install the next month&#8217;s test release. With my files safely stored on a separate &#8220;D:&#8221; virtual disk, it&#8217;s really easy to just start over with a fresh FreeDOS install by creating a new &#8220;C:&#8221; disk and installing on that, then connecting the &#8220;D:&#8221; drive when I want to actually use the new system and run my programs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-packages\">Installing packages<\/h2>\n\n\n\n<p>I usually start with a &#8220;plain DOS&#8221; install, because that takes only a few minutes to install from CD, then install other packages as I need them. The <code>FDIMPLES<\/code> program is the package manager on FreeDOS, and it presents a friendly interface to install packages from the CD-ROM.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"461\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2025\/07\/fdimples.png\" alt=\"Installing FreeDOS packages with FDIMPLES\" class=\"wp-image-11345\"\/><figcaption class=\"wp-element-caption\">Installing packages from the BonusCD<\/figcaption><\/figure>\n\n\n\n<p>For example, I like to create my own programs for FreeDOS, so I also install a few compilers and editors from the BonusCD. That works well until I need to install a package from the other CD-ROM. Wrong disc defined in QEMU? Shut down the virtual machine, update the <code>qemu<\/code> script, and &#8220;reboot&#8221; the virtual machine.<\/p>\n\n\n\n<p>I recently changed my <code>qemu<\/code> script to just use both CD-ROMs at the same time. This makes it a lot easier if I need to install a package, because both the LiveCD and BonusCD will be instantly available without rebooting QEMU.<\/p>\n\n\n\n<p>Ideally, I&#8217;d just use <code>-hda<\/code> and <code>-hdb<\/code> for the hard disks, and two <code>-cdrom<\/code> options to specify the two CD images. But QEMU only allows one <code>-cdrom<\/code> option. Instead, I have to specify everything using <code>-drive<\/code> options to set up the IDE virtual drives.<\/p>\n\n\n\n<p>It&#8217;s a tricky command line, but the important part is that the C: hard drive is on bus 0 unit 0, the D: hard drive is on bus 1 unit 0. And the CD drives are on bus 0 unit 1, and bus 1 unit 1. You could do it in a different order if you prefer, as long as the C: hard drive is on bus 0 unit 0.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\nhda=\/opt\/freedos\/T2507\/freedos.qcow2\nhdb=$HOME\/virtualmachines\/files.qcow2\n\nlive=\/opt\/freedos\/T2507\/T2507LIVE.iso\nbonus=\/opt\/freedos\/T2507\/T2507BNS.iso\n\nide=\"-drive bus=0,unit=0,media=disk,file=${hda} -drive bus=0,unit=1,media=disk,file=${hdb} -drive bus=1,unit=0,media=cdrom,file=${live} -drive bus=1,unit=1,media=cdrom,file=${bonus}\"\n\nsound='-audiodev pa,id=snd -machine pcspk-audiodev=snd -device sb16,audiodev=snd -device adlib,audiodev=snd'\nkbd='-global i8042.kbd-throttle=on'\nboot='-boot menu=on'\nqemu-system-i386 -enable-kvm -m 32 -rtc base=localtime $sound $kbd $ide $boot \"$@\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"two-at-a-time\">Two at a time<\/h2>\n\n\n\n<p>With this config, when I want to install a package, <code>FDIMPLES<\/code> will use the first CD it finds (the LiveCD on bus=1,unit=0 as the &#8220;E:&#8221; drive).<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"461\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2025\/07\/fdimples-f.png\" alt=\"Installing FreeDOS packages with FDIMPLES\" class=\"wp-image-11346\"\/><figcaption class=\"wp-element-caption\">Installing packages from the LiveCD as E:<\/figcaption><\/figure>\n\n\n\n<p>If I want to install a package from the BonusCD, I just run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FDIMPLES F:<\/code><\/pre>\n\n\n\n<p>..and <code>FDIMPLES<\/code> uses the BonusCD that&#8217;s on bus=1,unit=1.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"461\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2025\/07\/fdimples.png\" alt=\"Installing FreeDOS packages with FDIMPLES\" class=\"wp-image-11345\"\/><figcaption class=\"wp-element-caption\">Installing packages from the BonusCD as F:<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s how I boot FreeDOS with two CD-ROMs in QEMU<\/p>\n","protected":false},"author":33,"featured_media":4014,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[340,428],"tags":[267,427],"class_list":["post-11347","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-freedos","category-qemu","tag-freedos","tag-qemu"],"modified_by":"Jim Hall","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/11347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11347"}],"version-history":[{"count":1,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/11347\/revisions"}],"predecessor-version":[{"id":11348,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/11347\/revisions\/11348"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/4014"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}