• Please review our updated Terms and Rules here

I'm feeling like accomplishing something ambitious...

TandyMan100

Veteran Member
Joined
Jan 7, 2009
Messages
632
Location
At my computer
Does anyone know of a good place to start for creating your own *nix OS? I would like to use this as an oppertunity to learn C. Is there any good places to start and get some information for this? I would like to base it on a standard unix kernal and filesystem so that I can still run linux apps on it.

Help appreciated.
 

Vlad

Moderator
Joined
Jul 3, 2005
Messages
2,241
Location
United States
Look up Linux From Scratch. That'll get you into the inside workings and all that. You basically start from the beginning and put it all together which sounds like what you're looking to do.
 

chuckcmagee

Veteran Member
Joined
Jul 28, 2006
Messages
1,992
Location
Nevada
Back in 1976, a young guy conned my then boss into paying him to write a operating system. They don't say "26 MAN YEARS of work" for nothing. I tried to tell my boss that the amount of work in writing a OS from scratch was almost unbelievable. Mind you, I had made extensive modifications to assembler code in a IBM COBOL compiler by then. That task alone took me almost 6 months of 12 to 14 hour days, 7 days a week.

Anyway, as you guessed, one day it became clear that the young guy that said he would produce disappeared from sight (as in ran with the money).

Linus started in, what? 1991. Here we are in 2009, and Linux is finally becoming a fairly good product. Still has plenty of rough spots. My point? People really, really have no concept of just how much work writing a O.S. from scratch is. Device drivers are a prime example. It can take one or two people 5 years to finally get the code just right, and that's just a tiny chunk of code for one device.
 

mbbrutman

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,269
Which is why I giggle when somebody says that Windows sucks. ;-0

Yeah, everything is relative. But they all take an enormous investment in time and effort, and require very high levels of skills.
 

Mike Chambers

Veteran Member
Joined
Sep 2, 2006
Messages
2,621
well you didn't lie, that IS ambitious. the more distros, the better but it will definitely be a royal pain in the blank. if you ever get this done, i'll try it but you have a lot of work to do if you want it to get me to switch from debian. :p
 

barythrin

Veteran Member
Joined
Oct 5, 2005
Messages
6,256
Location
Texas
but it will definitely be a royal pain in the blank

Ooh..ooh I know! Ass! Royal pain in the ass. Right? ;-)

I've typed about it before so I won't bore everyone with the same old news but yeah me a friend a few years (hmm.. that "few years" has probably grown a bit) ago tried writing our own OS from scratch. Quite an interesting project. I'd say a lot was kind of fun, but when you get to those "why isn't this working like it should?" stunts for several days with no progress it wears on you a lot. For obsolete systems and simple stuff, or even a bootable game it would still be fun. Bringing things up to current hardware and resources, that's when it became a lot of blank stares and rereading of paper. We though "ok, we'll change the processor into protected mode memory. What'll that be an instruction or something?" ... "um.. memory matrix.. wait *I* have to map out memory myself?? bleh" and the project died around there. We had it working after looking at other folks code and had it reading FAT12,16,32 file systems and added a debugger (something we actually needed to figure out some of our own coding errors). We used a few operating system development books, including Andrew Tanenbaum's texts, and a few books on assembly/hardware to get our BIOS/hardware interrupts down. The interesting part was we couldn't use DOS interrupts so it kept us in only a segment of our books on assembly. I was surprised how many people just assume if you write assembly you'd be in a Microsoft OS.

So yeah we already had an appreciation of "Yes, we may not like the marketing or costs, but MS does have the leading operating system and we agree why." but afterwards a better understanding of the work needed and done. It's doable and fun but to get a releasable product, and to compete with what's out right now is extremely low probability.
 

Mike Chambers

Veteran Member
Joined
Sep 2, 2006
Messages
2,621
Ooh..ooh I know! Ass! Royal pain in the ass. Right? ;-)

I've typed about it before so I won't bore everyone with the same old news but yeah me a friend a few years (hmm.. that "few years" has probably grown a bit) ago tried writing our own OS from scratch. Quite an interesting project. I'd say a lot was kind of fun, but when you get to those "why isn't this working like it should?" stunts for several days with no progress it wears on you a lot. For obsolete systems and simple stuff, or even a bootable game it would still be fun. Bringing things up to current hardware and resources, that's when it became a lot of blank stares and rereading of paper. We though "ok, we'll change the processor into protected mode memory. What'll that be an instruction or something?" ... "um.. memory matrix.. wait *I* have to map out memory myself?? bleh" and the project died around there. We had it working after looking at other folks code and had it reading FAT12,16,32 file systems and added a debugger (something we actually needed to figure out some of our own coding errors). We used a few operating system development books, including Andrew Tanenbaum's texts, and a few books on assembly/hardware to get our BIOS/hardware interrupts down. The interesting part was we couldn't use DOS interrupts so it kept us in only a segment of our books on assembly. I was surprised how many people just assume if you write assembly you'd be in a Microsoft OS.

So yeah we already had an appreciation of "Yes, we may not like the marketing or costs, but MS does have the leading operating system and we agree why." but afterwards a better understanding of the work needed and done. It's doable and fun but to get a releasable product, and to compete with what's out right now is extremely low probability.

interesting, do you have a copy anywhere i could try on one of my ancient machines? :)

and yes, MS operating systems are entirely under rated. i'm a linux fanboy, but truth be told, windows is pretty amazing and as far as ease of use for the average user it is far superior in every way to linux. linux is perfect for technogeeks and server admins, but most people want an OS that "just works" ... and MS has done a ridiculously good job of making that possible.
 

DreadStorm

Experienced Member
Joined
Mar 16, 2008
Messages
161
Location
Greer, SC
I had dreams once of making an operating system. Up until the time I had fun with Toshiba's DOS 4.01 that I mentioned in another post. It was then that I realized how difficult it would be when I decompiled it.

Anyone that dares such an undertaking has my full support.....and my sympathies. heh
 

Ole Juul

Veteran Member
Joined
Aug 15, 2008
Messages
3,982
Location
Coalmont, BC, Canada
Does anyone know of a good place to start for creating your own *nix OS? I would like to use this as an oppertunity to learn C. Is there any good places to start and get some information for this? I would like to base it on a standard unix kernal and filesystem so that I can still run linux apps on it.

There's a standard unix kernel?

I'm not a programmer, but Andrew Tanenbaum's books are obviously classic if you want to "write" an OS - thats what Linus did. However, it sounds more like you're looking to put together another Linux distribution in which case you might want to go with Linux From Scratch by Gerard Beekmans. Actually, why now join one of the many many little distributions that realy really need more manpower? :)
 

TandyMan100

Veteran Member
Joined
Jan 7, 2009
Messages
632
Location
At my computer
Group Project!

Group Project!

Perhaps we could all band together and create a Vintage Computer Linux Distro!! Those of you wizard programmers could keep busy, and us n00bs could *gasp* learn something! I wouldn't be much help with the kernal, but I might be able to help with the GUI. We should model it after a classic gui. What do you guys think? It could come pre-installed with DOSBox and MESS, and perhaps more.

So, what GUI should it be modeled after, what software should come on it, and ARE YOU UP TO THE CHALLENGE?!?!?!?!?
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
39,715
Location
Pacific Northwest, USA
There's a standard unix kernel?

Linux isn't Unix and I think Linus Torvalds would be the first to tell you this. There are some strong resemblances in the implementation, but they're different OSes. Linux probably would not be anything other than a footnote if it weren't for the collateral developed over many years by Unix.

The closest thing to a "standard" Unix are those using the "Berkeley" system (e.g. 4.2BSD) as their basis (FreeBSD, BSD386, NetBSD, OpenBSD). Source code is available for most of these. BSD is also the basis ISTR of Mac OS X.

Of these, NetBSD is probably the one that most vintage computer users will find useful--it runs on most relatively recent (even "vintage") 32-bit platforms. The web site is http://www.netbsd.org

However, if you've got an old PDP-11 system, there are still sources and binary distros from The Unix Heritage Society.
 

Vlad

Moderator
Joined
Jul 3, 2005
Messages
2,241
Location
United States
UNICOS and Sun Solaris are pretty close to Sys V but no one around here is going to have a use for UNICOS (that I know of) and Solairs is a pain for a home user. (Package management makes me want to stab something) OpenSolaris is friendlier to someone who wants to get closer to UNIX but I just stick to the BSD's. I don't know enough about Irix beyond it was fun to play with but I'd assume it’s a descendent of Sys V somehow as well. Shame its EOL.

Also "Linux" isn't an OS, its just a kernel so you're gonna need a compiler and tool chain to get much further. :rolleyes:
 

Vlad

Moderator
Joined
Jul 3, 2005
Messages
2,241
Location
United States
I'll admit I had toyed with the idea of doing this before but I never had the time to bother with it. Could be interesting though, I've seen other online communities band together to make a Linux based OS before. It'd take a lot of time and effort to do it right though.

TandyMan100 said:
Perhaps we could all band together and create a Vintage Computer Linux Distro!!
 

TandyMan100

Veteran Member
Joined
Jan 7, 2009
Messages
632
Location
At my computer
I'll admit I had toyed with the idea of doing this before but I never had the time to bother with it. Could be interesting though, I've seen other online communities band together to make a Linux based OS before. It'd take a lot of time and effort to do it right though.
Perhaps we could modify an existing Linux disto, then? Or we could start with something small, like a floppy linux disto that just boots up and gives you a text-mode menu interface? That would be the best starting point. Start with a floppy linux disto, and the build it into something more, something.... ...spectacular, something.... ....that's ours.

I'm a good inspirational speaker :rolleyes:
 

mbbrutman

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,269
Perhaps we could modify an existing Linux disto, then?

Why? What problem are you trying to solve, or what need are you trying to fill?

There are so many things that I would have as a higher priority. Scanning old documentation, preserving old software, and picking up the skills needed to keep these old 8 and 16 bitters running. The world don't need another Linux distribution, there are already more out there than there are Linux users.
 

Vlad

Moderator
Joined
Jul 3, 2005
Messages
2,241
Location
United States
That's the main reason I never bothered with it. Too many other things take priority over making the billionth and a half distro.
 
Top