Syndicate the Cosmos Blog Feed.

Getting Started

Known Issues

Please read!

Since Milestone 2 has been released we have discovered the following issues:

  1. Invalid Opcode - On some runs you may receive an invalid opcode after booting Cosmos. Simply rerun again. On slower machines the frequency of this occurrence is quite high, often 75%+ on my 1.2 GHz machine, while it occurs less than 5% of the time on my quad core machine. This has been fixed for Milestone 3. If you wish to develop further, please install the developer kit (our live source) instead of the user kit which also has this fix included.
  2. Vista Users - The current release by default tries to write to the program files directory during build. This fails on Vista. Workarounds:
    1. Change the folder during install and install Cosmos to a writable directory such as a sub folder of the Documents and Settings Folder.
    2. Copy the complete Cosmos directory including all sub directories to a writable directory, and update Cosmos registry key (search)

Let's Go!

In this article I will introduce you to the Cosmos User Kit. Cosmos supports two types of developers:

  1. User Kit Developers - Developers who want to use Cosmos to make their own distribution of Cosmos.
  2. Kernel Developers - Developers who want to add to the Cosmos kernel, device drivers, etc.

This article discusses the User Kit. The User Kit allows developers to make custom operating systems easily, without the need to worry about building all of the necessary pieces of the kernel, etc. One might think of the Cosmos User Kit as an "Operating System Lego Set"

Why would someone want to build custom distros? In the future, we will also have a Cosmos "user build" for end users. But there are many scenarios in addition to just being fun why developers would want to build a custom OS distro.

Installing the User Kit

This tutorial is also available as a video.

First download the latest build. Currently it is around 5 MB. Then follow these steps:

  1. Make sure you have Visual Studio 2008 (any version, including the free express editions) installed. At this time we only support C#, but will support VB.NET and others in the future.
  2. Make sure Visual Studio 2008 is not running.
  3. Execute CosmosUserKit.exe.

When you get to the end of the installation, another dialog will appear.

When you click next a warning will appear. Click Yes. If you have previously installed Cosmos, it will also ask you if you wish to replace the existing template, also say yes to that.

After successful installation, start Visual Studio 2008. Then click File, New Project. Select CosmosBoot.

If you are not using Visual Studio Express, this dialog will look a little bit different.

This creates a new bootable Cosmos project.

Open Program.cs. You can see a basic shell exists. The shell just emits some basic text. Later you can expand it or look at some of the demos on CodePlex.

To boot the Cosmos project press F5 in Visual Studio. The project will build itself, then boot it in VMWare, QEMU, VPC, make an ISO, or boot over the network.

First you will see some activity in a console window.

Next the build options window will appear. If you have VMWare or VPC you can select those. We use QEMU most of the time as it has special debug support. QEMU is included in the Cosmos User Kit, so you can accept the default and select Build.

Next Cosmos will continue building. Depending on your machine speed this may  take anywhere from 2 to 40 seconds to complete.

When it is done, Cosmos will boot in QEMU! This is not simply a console Window. QEMU is a full x86 emulator that can boot Windows, Linux and more. QEMU has actually booted Cosmos directly! If you want further proof, try the ISO or PXE routes and boot Cosmos on your real hardware.

More Demos

Shortly we will post more demos, including Guess the number, Eliza, and more. Here is a screenshot from the Guess demo. It is currently available from the kernel source tree.

Updates

USB boot support is completed and will be available in Milestone 3. For milestone 2, you will need to perform some manual steps if you wish to prepare Cosmos on a USB stick or external hard drive.

What's Next?

We are working on PCI enumeration, Ethernet, TCP/IP, extended file system support and more! Once we have TCP/IP, we will also be using the C# version of Indy in Cosmos.

Is it real?

Yes of course. Here is an example using PXE (Network boot) to boot a real PC. More screenshots.