{"id":8699,"date":"2024-12-10T02:00:00","date_gmt":"2024-12-10T07:00:00","guid":{"rendered":"https:\/\/www.both.org\/?p=8699"},"modified":"2024-12-01T11:41:42","modified_gmt":"2024-12-01T16:41:42","slug":"how-to-install-freedos-the-old-school-way","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=8699","title":{"rendered":"How to install FreeDOS the old-school way"},"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=\"8699\" 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\">1    <\/span>\r\n<\/div><\/div>\n<p>FreeDOS has grown up to be a modern DOS, including a variety of tools, editors, compilers, and applications that were not present in the original DOS from the 1980s and 1990s. Over time, we\u2019ve worked hard to make the install process very smooth. These days, you only need to answer a few quick prompts to install a fresh version of FreeDOS.<\/p>\n\n\n\n<p>But DOS is a simple operating system, and you don\u2019t need to use an install program. You can actually install FreeDOS <em>the old-school way<\/em>, doing every step \u201cby hand,\u201d like it was the 1980s. This lets you make FreeDOS as small as you want it. If you want to customize your next FreeDOS installation, follow these general steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Partition the disk with <code>FDISK<\/code><\/li>\n\n\n\n<li>Create a DOS filesystem with <code>FORMAT<\/code><\/li>\n\n\n\n<li>Unzip the packages to the disk<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-to-a-virtual-machine\">Installing to a virtual machine<\/h2>\n\n\n\n<p>For this demonstration, I\u2019ll install into a virtual machine. I like to use QEMU, which should be available by default on every Linux system. However, there is no <em>graphical<\/em> front-end to QEMU; you need to set up everything via the command line. We\u2019ll stick to the basics, which should make this pretty straightforward.<\/p>\n\n\n\n<p>To start, we\u2019ll need a virtual disk to install to. Create a disk image using the <code>qemu-img<\/code> program, using these options to use the QCOW2 image format and 120MB size:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>qemu-img create -f qcow2 freedos.qcow2 120M<\/code><\/pre>\n\n\n\n<p>Download the <a href=\"https:\/\/www.freedos.org\/download\/\">FreeDOS 1.3 distribution<\/a> to your computer, and unzip the file. You should end up with a file called <strong>FD13LIVE.iso<\/strong>, which is a CD-ROM image file.<\/p>\n\n\n\n<p>With the virtual disk image we created with <code>qemu-img<\/code> and with the FreeDOS LiveCD image, we can boot an instance of QEMU with both:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ qemu-system-i386 -enable-kvm -m 16 -hda freedos.qcow2 -cdrom FD13LIVE.iso -boot order=d<\/code><\/pre>\n\n\n\n<p>That might seem like a complicated command line, but let\u2019s look at the components:<\/p>\n\n\n\n<p><code>qemu-system-i386<\/code> starts the QEMU emulator using an i386 compatible CPU. <code>-enable-kvm<\/code> uses the Linux kernel virtualization support, which allows the virtual machine to run much faster. You need an Intel CPU on your Linux host machine for this option; if you are doing this on a non-Intel system, like a Raspberry Pi, then you should omit the <code>-enable-kvm<\/code> option. Everything else will run the same, but more slowly.<\/p>\n\n\n\n<p><code>-m 16<\/code> defines the virtual machine with 16MB of memory. The <code>-hda<\/code> option tells QEMU to use a disk image for the first hard drive, and <code>-cdrom<\/code> says to use another disk image for the CD-ROM. Finally, <code>-boot order=d<\/code> will boot the virtual machine from the CD-ROM, so labeled because most PCs running Windows would likely identify the CD-ROM drive as the <strong>D:<\/strong> drive. (You can also use <code>order=c<\/code> to boot from the hard drive, <code>order=a<\/code> to use the floppy drive, or <code>order=n<\/code> to boot from a network device.)<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"400\" src=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/12\/install1.png\" alt=\"\" class=\"wp-image-8782\"\/><figcaption class=\"wp-element-caption\">Booting the FreeDOS LiveCD in QEMU<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"partition-the-disk-with-fdisk\">1. Partition the disk with FDISK<\/h2>\n\n\n\n<p>At the boot menu, select the option to \u201cUse FreeDOS 1.3 in Live Environment mode.\u201d This boots into a \u201clive\u201d FreeDOS environment, which includes the basic FreeDOS commands and a few interesting programs and games. But just to install FreeDOS, we will only use the FreeDOS commands.<\/p>\n\n\n\n<p>At the DOS prompt, type <code>fdisk<\/code> to run the FDISK <em>fixed disk setup<\/em> program. Use the menu to create a DOS partition on the disk, as a <em>primary<\/em> partition, using the full space on the disk. This will also mark the partition as \u201cActive\u201d so that it will boot FreeDOS.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"400\" src=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/12\/install2.png\" alt=\"\" class=\"wp-image-8783\"\/><figcaption class=\"wp-element-caption\">Partition the disk with FDISK<\/figcaption><\/figure>\n\n\n\n<p>Edit FDISK, and reboot the virtual machine. FreeDOS reads the disk\u2019s partition table only once, at boot-up, which means you need to reboot so FreeDOS can read the new partition information. To reboot, type <code>reboot<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-a-dos-filesystem-with-format\">2. Create a DOS filesystem with FORMAT<\/h2>\n\n\n\n<p>When you\u2019re at the boot menu again, select the \u201cUse FreeDOS 1.3 in Live Environment mode\u201d option again. Now we can use the FORMAT program to create a DOS filesystem on the disk. This is called \u201cformatting\u201d the disk.<\/p>\n\n\n\n<p>We can also use an option with the FORMAT program to transfer the \u201csystem\u201d files (the kernel and the COMMAND shell), all in one step. At the prompt, type this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>format C: \/S<\/code><\/pre>\n\n\n\n<p>The <code>\/S<\/code> option will also copy over the system files after formatting the partition, which makes the disk bootable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"unzip-the-packages-to-the-disk\">3. Unzip the packages to the disk<\/h2>\n\n\n\n<p>With a bootable disk, now we need to copy over the rest of the FreeDOS files to the new drive. FreeDOS installs everything as <em>packages<\/em>, so every part of FreeDOS is stored in a separate package file. FreeDOS packages are really just zip files with a special structure and some tracking information\u2014but to install FreeDOS like we were \u201cold-school,\u201d we can use the UNZIP program to extract the packages directly.<\/p>\n\n\n\n<p>The packages are stored in the <code>D:\\PACKAGES<\/code> directory, and the core components of FreeDOS (the \u201cBase\u201d packages) are under <code>D:\\PACKAGES\\BASE<\/code>. Since you should already be at the root of the D: drive, you can just type <code>cd packages<\/code> followed by <code>cd base<\/code> to get into the <code>D:\\PACKAGES\\BASE<\/code> directory.<\/p>\n\n\n\n<p>The <code>BASE<\/code> directory contains about 60 zipped packages. Note that each FreeDOS package also includes a copy of the source code, but the 120MB virtual disk is big enough to store that.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for %f in (*.zip) do unzip %f -d C:\\FREEDOS<\/code><\/pre>\n\n\n\n<p>This is an example of a loop on the DOS command line. It means that for every zip file, DOS will run the <code>unzip<\/code> command to extract the package, and put the files into the <code>C:\\FREEDOS<\/code> directory. The <code>FREEDOS<\/code> directory doesn\u2019t exist yet (because we just formatted the disk, and haven\u2019t set up any directories yet) but with this command line, UNZIP will create it for you.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"400\" src=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/12\/install3.png\" alt=\"\" class=\"wp-image-8784\"\/><figcaption class=\"wp-element-caption\">Unzipping the packages with a FOR loop<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ready-to-use\">Ready to use!<\/h2>\n\n\n\n<p>After the unzipping is complete, you\u2019re ready to use FreeDOS! Halt the FreeDOS virtual machine with the <code>shutdown<\/code> command, which will also exit QEMU. Back at your Linux prompt, you can now run QEMU with a slightly different command line to boot directly from the C: drive, without the CD-ROM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ qemu-system-i386 -enable-kvm -m 16 -hda freedos.qcow2 -boot order=c<\/code><\/pre>\n\n\n\n<p>FreeDOS will prompt for the date and time because this fresh system doesn\u2019t include an FDCONFIG.SYS or AUTOEXEC.BAT file. You can create these on your own to further configure how you want FreeDOS to run.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"400\" src=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/12\/install4.png\" alt=\"\" class=\"wp-image-8785\"\/><figcaption class=\"wp-element-caption\">Booting FreeDOS in QEMU<\/figcaption><\/figure>\n\n\n\n<p>Most users should be able to use the more user-friendly process to install FreeDOS on a new computer. But if you want to install it yourself the \u201cold-school\u201d way, you can also run the installation steps manually. This can provide some additional flexibility and control because you install everything yourself. And now you know how to do it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s how to install FreeDOS the old-fashioned way, with every step done by hand.<\/p>\n","protected":false},"author":33,"featured_media":7678,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[340,5],"tags":[267],"class_list":["post-8699","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-freedos","category-linux","tag-freedos"],"modified_by":"Jim Hall","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8699","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=8699"}],"version-history":[{"count":3,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8699\/revisions"}],"predecessor-version":[{"id":8787,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8699\/revisions\/8787"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/7678"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}