Wednesday, October 13, 2010

Installing FreeDOS in GNU/Linux

FreeDOS is an open source replacement for MS-DOS. We are using th QEMU emulator to install FreeDOS in GNU/Linux. To install QEMU, enter the following command:

sudo apt-get install qemu

Now you need to download the FreeDOS ISO file.

Create a folder for installing FreeDos

mkdir /opt/freedos

In GNU/Linux file is every thing and we can even install an entire OS into a file, the only requirement being the file should be large enough to store what ever is intended to be stored in it.

so create a raw file named freedosfile.img roughly of size 400 MB using the dd command as follows:

cd /opt/freedos

dd if=/dev/zero of=freedosfile.img bs=1024 count=400000

Now to install the FreeDOS use the following command:

qemu -cdrom fdfullcd.iso -hda freedosfile.img -boot d

Now you can see a beautiful splash screen. From the followed menu select to boot from the CDROM. Now again a second menu appears. It gives options to initiate the FreeDOS installation or boot the live CD. At this stage if you are in two minds about installing FreeDOS, you can continue booting from the CD and in a few seconds will be placed in a FreeDOS shell.

To install FreeDOS on your hard disk select the option for installation.

Installation steps for FreeDOS

  • Select your language and keyboard layout.
  • Prepare the hard disk for FreeDOS 1.0 final by running XFDISK. You can also create a floppy boot disk at this juncture.
    Since the hard disk that freedos recognises is actually a file freedosfile.img which we passed via the command line, it is better to chose to create a single primary partition encompassing the whole file (disk). Once the partition was created, pressing F3 wrote the changes and prompted me to restart the computer - which of course is the emulator Qemu. The right thing to do here is to press Yes and the same boot process takes place as earlier and in a short time it provide a menu prompt asking to format the hard disk (the file) with fat32 file system.
  • Next the installer prompts to continue with the installation which includes :
    - agreeing to an end user licence (GPL)
    - installing the packages. Here we have the option of providing an alternate path to install, the default path being 'C:\fdos'.
The FreeDOS OS is split into 10 packages each pertaining to a particular aspect of the OS. They are as follows:
  1. base - Essential DOS utilities which reproduce the functionality of MS-DOS
  2. compress - Free file compression and decompression utilities (7zip, arj, bzip2, cabextract, gzip, tar, zoo ...)
  3. driver - Free drivers for network cards and usb
  4. edit - A collection of editors (emacs, vim, pg, setedit, ospedit)
  5. games - A good choice of free DOS games - Doom, Solitare, BumpNJump, nethack, tetris...
  6. gui - Gem Desktop (Very nice)
  7. lang - Free compilers and assemblers (Pascal,C,Basic,assembler,Fortran, debuggers,make tool...)
  8. media - Free multimedia applications (cdrtools, ogg vorbis, mpxplay,lame ...)
  9. net - Networking programs (wget, VNC, SSH client, lynx, arachne, mail client, wattcp - a free TCP/IP stack for DOS).
  10. util - Free file, directory and other utilities (fprot anti virus, locate, head, du, cal, dos32ax, tail, tee, 4dos, uptime ...)
It is prudent to select all the packages to enjoy the full functionality of FreeDOS. Next a list of programs from each package where we could fine tune our choice of programs is shown. More specifically, FreeDOS ships with two kernels - the stable one called 'sysx' and the unstable kernel named 'unstablx' and we could choose one from the other. The unstable kernel has support for Enhanced Mode Win3.1 and some DOS programs require this to work properly. So select the unstable kernel and the copying of files starts.

It will take about 15-20 minutes to install all the packages. Then FreeDOS starts configuring the parameters. Next it will prompt us to choose a packet driver. There is a packet driver for Qemu provided which we can select. Following which it will be  prompted to install the OpenGEM GUI.

Post installation, FreeDOS starts configuring certain aspects and asks a couple of questions such as the address of the mailserver, the email id and a few other parameters.

Starting to use FreeDOS in GNU/Linux

Once installation is over, boot FreeDOS in GNU/Linux using the following command:
qemu -hda freedosfile.img -boot c

Shortly you will be placed into c prompt

That's all

Enjoy the power of FreeDOS in your system.


Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes