Introduction: Create Your Own Operating System!


Nearly every true computer geek has, at some point, wanted to write an operating system. However, writing a custom kernel and other bits takes years of study, experience and patience. If you intend to keep your sanity, then the best course of action is to use someone else's code.

Cosmos*, or C# open source managed operating system, is a pre-made kernel that provides you with "OS legos" that allow you to quickly and easily create your own operating system.

You will need:

@ Microsoft Visual C# 2008.

@ A knowledge of the C# programming language (don't worry if you don't have this, it's a pretty easy language).

@ The Cosmos user kit (milestone 4).

Step 1: Getting the Software

Let's do a run down of the necessary software mentioned earlier.

Microsoft Visual C# can be downloaded free if you get the express edition. You can download it at http://www.microsoft.com/express/downloads/ You can also download the entire Visual Studio including visual basic and visual c++ as an ISO image (these can be tricky, see below for details on reading ISO images). Even on a blazing fast computer, downloading visual studio will take two hours at most, though.

WARNING: make sure that you get the 2008 edition and not 2010. This may seem backwards, but the Cosmos user kit has yet to support 2010.

The cosmos user kit is the platform that we will write our OS in. It's an all-in-one micro-kernel operating system that is written in 100% C#. You can download it at http://cosmos.codeplex.com/releases/view/35194



A note about ISO images:

If you opted to download the entire visual studio, then you're going to need to read the ISO image file. An ISO image is a map of a virtual DVD, using the same encoding as any other disk. You have two option: Use a program like nero or roxio to burn the image to a CD-ROM then insert that disk into your computer and download it (The latest Windows XP comes with Roxio, and Windows 7 comes with Nero pre-installed. Other than that, you will almost certainly find something on your computer that will burn a CD. Explore a bit), or you can use Daemon tools lite edition to read the file directly.


Daemon tools lite is free and can be found at http://www.daemon-tools.cc/eng/downloads

A: After downloading it, running the setup program, and re-booting, fire up Daemon tools and click Add File (the picture of the CD with a plus sign).

B: Find the image, and open it.

C: Now, select the file and click Mount. A popup (see pic')  will show you some options, click "run setup.hta". This will install Visual Studio. Alternatively, you can find setup.hta in the virtual drive that was created, located in My Computer under Devices with removable storage.

Step 2: Creating the Project

After downloading the file CosmosUserKit.MS4, run it and follow the setup instructions. Visual studio will warn you about unsigned code and potential danger and blah blah blah. Cosmos doesn't have any of that, so just click OK.

Now, if you open up Visual C#, and under the heading Recent projects, you will see the text "Create...project". Click this. It will be where we write all the code for the OS. Name it whatever you please. Now, you will see an option under My templates labeled CosmosBoot. Double click it to open up the Cosmos template, and then double click the "program.cs" text over on the right. You should see this text:

using System;
using Cosmos.Compiler.Builder;

namespace CosmosBoot1
{
    class Program
    {
        #region Cosmos Builder logic
        // Most users wont touch this. This will call the Cosmos Build tool
        [STAThread]
        static void Main(string[] args)
        {
            BuildUI.Run();
        }
        #endregion

        // Main entry point of the kernel
        public static void Init()
        {
            var xBoot = new Cosmos.Sys.Boot();
            xBoot.Execute();
            //There's supposed to be a bit of text here. Change it to Console.WriteLine("Hello world!");
        }
    }
}

In the next step we'll boot up our (very) basic OS.

Step 3: Boot!

Now, open up the debug menu, and click Start without debugging. There will be a white popup asking you various questions, but the defaults will suffice for now, so just click OK.

You should see a black console window with a lot of text. Eventually the operating system will finish booting and display "Hello world!". Congratulations, you just made an operating system! Well, okay, so it's not really an OS in the traditional sense, but it's a start.

In addition to providing the template, the Cosmos user kit installs a new Cosmos class. With this, you can do things like shutdown, reboot, and other OS-ey things.

Shutdown:

Cosmos.Sys.Deboot.Shutdown();

Reboot:

Cosmos.Sys.Deboot.Reboot();

NOTE: All the code for the OS will go under the xBoot.Execute() line of code.

Step 4: Conclusion

If you have questions or problems, keep in mind I'm only slightly more experienced with this then you are at this point. I'll try my best to help, though. I'll also be releasing another instructable sometime that more thoroughly explains the ins and outs of Cosmos + C#.
 
Have fun building your OS!

Comments

author
prabhulingg (author)2017-07-30

my diploma final year project is custmize the OS



Anyone can help.....¿




Plz Contact Me
gp9665204368@gmail.com

author
Arsen Gabrielyan (author)2017-07-18

OS Is cool yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay

author
Quadrivium (author)2017-07-12

The second link has been taken down, can anyone please provide the new location of this software version download?

author
AnkonB (author)2016-05-20

I am an enthusiast programmer and learned a lot of languages.

C#, VB, HTML, PAWN, PHP and so on..

I love to work on C# because it is too flexible and is nearly used everywhere.

I am making my own OS or most probably a prototype OS in Visual Studio using C#. I made a lot of progress and it looks too damn beautiful..believe me..to awesome..

I need some more people as all these years I have been working alone. Anyone interested then join me. New ideas will be appreciated too and designing too.
Thanks

-Ankon

author
adrishnaskar (author)AnkonB2017-05-31

Hello Ankan I am also with you. You can contact me on naskars233@gmail.com .

I know a lot of more about programming. I have experienced as a toper.

author
Alvin358 (author)AnkonB2017-04-08

Im in.. alvinjoereloaded@gmail.com

author
Rishabhg_23 (author)AnkonB2017-03-15

Hey
I would surely like to help

author
RishiM22 (author)AnkonB2017-03-12

Hey can I also join....

I would love to help. I know the basics of C# and am very eager to learn.

May I join?? I might not be the most helpful but I want to learn.

author
TheCreepyBox (author)AnkonB2017-03-04

YESS finally someone like me i would love to help

contact me: 54gorillaz@gmail.com

author
JaimeT38 (author)AnkonB2017-02-16

I am interested too. Contact me.

jaimet561@gmail.com

author
rizwan1 (author)AnkonB2017-02-15

yes i am inerested so when will we start

author
Sayyed ViquarA (author)AnkonB2017-01-22

hey sviquarahmed@gmail.com

author
BrandonK62 (author)AnkonB2016-05-23

I am doing the same exact thing! I love working with text-based systems and I made quite a few AI in my time (all of course using the all-flexible c#, with some c/c++ for intricate tasks). So yeah!

I'd love to join you in your efforts. you can email me at bksquared1024@gmail.com.

Sidenote: I just learned how to program several months ago; However I recently took the AP Computer Science C exam and did not take the class (essentially I self-studied for it). I have a good understanding of console-side programming (and pretty good at file I/O, and even then I'll still be happy to do some debugging to help) and I am beginning to learn WPF and graphical programming with c# (part of my Unity3d learning course).

Anyways (sorry for rambling), I'd be happy to join your team.

-BKSQUARED

author
hemandpaul08 (author)BrandonK622016-10-16

Finally found a man like you ! I am really interested in this work.I
would really love to work with you.Kindly let me work with you.We shall
gain succes together.thanks

my email: hemandpaul89@gmail.com

author
hemandpaul08 (author)AnkonB2016-10-16

Finally found a man like you ! I am really interested in this work.I
would really love to work with you.Kindly let me work with you.We shall
gain succes together.thanks

my email: hemandpaul89@gmail.com

author
manofsteel288 (author)AnkonB2016-10-09

Hey dude I am really interested in this I was thinking how can a single person make it. so can I join u

my mail: manofsteel288@gmail.com

author
Rana FaizanT (author)AnkonB2016-05-21

Hey man! Finally found a man like you ! I am really interested in this work.I would really love to work with you.Kindly let me work with you.We shall gain succes together.thanks

my email;fazi.fazi76@gmail.com

author
Vaishu9994 (author)Rana FaizanT2016-09-17

Im intrested to work with a project like this

author
GroverR (author)AnkonB2016-08-30

Can I Join?..

I'm still at the verge of learning c#, I already know all the basics of c#.

I made a CRUD program with SQL database but I still don't know whats the use of c# without windows-form.

So right now. I'm really eager to learn new thing about computer programming.

so may I join, just to learn? or you really need those who already know?

I also am a fast learner by the way :) I also have a github acc ;)

if allowed, you can contact me at: Zilex.Seryth@gmail.com

sorry for bad English :(

author
rikkaushikdas (author)AnkonB2016-06-18

Interested ....

author
Elderwolf123 (author)AnkonB2016-06-08

il help but i will need to learn C#, it would be a good learning curve

author

my email is jarrodtanner2@gmail.com if you want me to help

author
TautvydasK2 (author)AnkonB2016-06-08

Hey. Maybe you could use some help with the design and feel of the OS.

Email: tkarosa10@gmail.com

author
pæpşđ (author)AnkonB2016-05-26

I want to join u will u help me in this pls mail me in papsdedtroyer@gmail.com

author
OrnateManatee88 (author)2017-04-11

Hi dude, can you make a updated one plz, im reading this in 2017

author
hassaanahmad (author)2013-07-24

Friends I want to make a team using (Team Foundation Server) in Microsoft
Visual Studio 2010 Professional.
I am looking for a team
We should work together and make our new productions..

author
AaronC2 (author)hassaanahmad2014-09-11

Hi I'm Aaron. I have no computer programming knowledge but I have some really great ideas for UI design, but the problem is that I have no way to display them or ever have them come to fruition without someone with extensive programming knowledge. Thanks!

author
Alvin358 (author)AaronC22017-04-08

Me too like u...need help..

author
jonbrozich (author)hassaanahmad2013-10-08

Sir, I would also like to be part of that team.  But I only have visual basic 2010 express  and visual studio 2012 express. If you could please contact me at     joshbrozich@yahoo.com, that would be nice. Thank you.

author
lilses (author)jonbrozich2013-10-19

I am a extreme programmer. I hard code 24/7. No school. Would be cool if we can share some tips, work on something awesome;

author
Alvin358 (author)lilses2017-04-08

Lilses..can you help me?
Mail me at alvinjoereloaded@gmail.com

author
RobinH2 (author)lilses2015-01-12

hey. i need help making an os. can we team up sometime. i have some schooling with software (self and classroom) but, I would like some help. I am just learning JavaScript and C++, so i know the basics. Plz and Thanks

author
Sayyed ViquarA (author)RobinH22017-01-27

u r mail addres

author
Eth.main (author)RobinH22015-02-08

I can team up with you if you want :) I am a good programmer trust me :) add me on facebook: www.facebook.com/Eth.Main and anyone can add me if they need help or want to team up with me anytime,

author
braxton.nunnally (author)RobinH22015-01-26

Hey i could work with you hit me up on kik at AndroDevcd I know C++, javascript, really good at java..xml..

author
hassaanahmad (author)lilses2013-10-20

But before giving you the detail about what to do ....
Introduce yourself because we have to know each other...

author
hassaanahmad (author)jonbrozich2013-10-20

I am going to sending you a pending request on yahoo.
So that we can come in contact with each others..

author

hi

author

I would love to join you all ! i am CEO of Vision™ www.visionveb.blogspot.com

If anyone want to talk ! they can live chat on my Web ! :)

author
mnasreldin (author)hassaanahmad2014-10-09

Good email me at mohdn2001@gmail.com

author
PrinceR1 (author)hassaanahmad2014-10-04

Good spirit...I love to do this..inbox me now and lets start something rocksonprince4@gmail.com..Hope we become more than what we think in a few years to come..

author
JoeC2 (author)hassaanahmad2014-09-25

Hi,

I'm Joe, I am a 13 year old programmer with medium visual basic knowledge.

I can make programs like advanced web browsers, database tools, system information and tweaking utilities. etc. Have had about 7 years computer technic experience and about 2 years programming experience. (Self taught.)

Contact me if you please,

Joe Channing

RevolutionDevelopment@outlook.com

author
PedroR2 (author)hassaanahmad2014-08-29

Hi! I have a bit of skill on Visual Basic Programming, i can make medium difficulty Windows Applications, not a big fan of Visual Studio Online.

In a scale if 1 to 10, 1 being a dude who just made a .bat app, 10 being the best programmer at Microsoft, i think i'm a 5, 6. I'm learning C# at the moment!

Email: pedr1toh.007@gmail.com

author

Hi I'm Zac. I'm currently studying IT which involves programing, I'm
also studying python on Linux and JavaScript on mac, i have skills in HTML & CSS,
although i am still learning i have big aspirations and i would love to
join your team.
Email- zbprogramoffical@gmail.com

author
hrik2001 (author)hassaanahmad2014-04-19

My name is Rik. I am interested in helping your project. My skills are to make microsoft executable files work in MAC OSX. I know a bit of html. Can create website. Also create small mac apps. Email- 18sbhattacharya@aisdhaka.org

author
jakedf (author)hassaanahmad2013-10-01

i would like to be part of the team.
im a great inventor and i know how to reach the people if we need to.

author
hassaanahmad (author)jakedf2013-10-20

Introduce yourself!
And then i will tell you what to do...

author
vinupriya (author)hassaanahmad2014-03-31

Hi ,This is vinupriya.i love programming and i am intrested in creating a os.

I am really intrested in joining your team.

My email id:vpriyasmiles@gmail.com

author
pabdullah (author)hassaanahmad2014-01-16

Asalamualikum, My Name is Syed Hassaan Abdullah.Iam from India. Iam a class 12 student and I want to work with you...

author
hassaanahmad (author)jakedf2013-10-20

Okay but before i tell you what to do..
Let,s introduce yourself so we will come in contact with each other..
Sorry, But it is necessary...

About This Instructable

511,508views

140favorites

License:

Bio: What's to say? A student, a writer, a builder, all the many hats of which I don. A person is not a person until ... More »
More by dungeon runner:Create your own operating system!PAPER GAMING: Pencil warsPAPER GAMING: Sprouts
Add instructable to: