This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
TsarN's profile picture

UberOS - Unix-like OS

Started by TsarN, 22 January 2015 - 02:17 PM
TsarN #1
Posted 22 January 2015 - 03:17 PM
What is this
Well, this is another Unix-like operating system for ComputerCraft. It meant to be powerful and extensible. It currently has about 17000 lines of code and hosted on GitHub.

What features included?
  • Multithreading
  • Daemons
  • User accounts
  • Files permissions
  • Mount points
  • Symbolic links
  • Coreutils
  • Small bootloader
  • Ability to run on any device and boot from disks
  • Package manager
  • Signal system
  • Temporary filesystem(stores files in computer's RAM only)
Screenshots:
Spoiler


Links:
GitHub repo: https://github.com/TsarN/uber-os
Latest release: https://github.com/T...releases/latest

Pastebin installer (old, not recommended):
Spoilerpastebin run NaGc7k3D
Extracts the OS (base, packed on 2/27/2015) to location.
Username: root (no password)

Demo video:
Spoilerhttps://youtu.be/alKvJj3jDN0

Note: I don't know English very well, so I'm sorry for mistakes in this post.
Edited on 01 August 2015 - 04:17 PM
Lemmmy #2
Posted 22 January 2015 - 08:02 PM
I am actually impressed. This is probably one of the best attempts I've seen at a Unix-based operating system. I say attempts, you've pretty much nailed it. Unlike the majority of the other operating systems out there it isn't a tryhard attempt at making another Windows, Mac OSX or Ubuntu. This is a genuine Unix 'clone', you could say. A good replacement for CraftOS in shell-form. Good job, sir.
Edited on 22 January 2015 - 07:05 PM
tenshae #3
Posted 24 January 2015 - 05:32 AM
How long have you been working on this?
TsarN #4
Posted 24 January 2015 - 01:15 PM
How long have you been working on this?
I have started developing about 3 month ago, but there was a break, so I have been developing UberOS for 1.5 month now.
TsarN #5
Posted 27 January 2015 - 02:03 PM
Package manager, called "upt" is coming in 0.3! I hope, it will be released tomorrow :)/> .
Creator #6
Posted 24 February 2015 - 09:55 PM
Wow, I appreciate the work ou do for the community!!!
TsarN #7
Posted 25 February 2015 - 07:21 PM
Wow, I appreciate the work ou do for the community!!!
Thanks! :)/>
Endergreen117 #8
Posted 27 February 2015 - 04:28 AM
Is this open-source? If it is, I would love to start developing for it, and I am thinking of possibly integrating this into an OS as it's base (similar to how Ubuntu and other Linux distros use the Linux Kernel as a base, and add on from there).

EDIT: Also, there seems to be a problem with the makefile, as running make returns "make: *** [corelib] Error 2".
Edited on 27 February 2015 - 03:40 AM
TsarN #9
Posted 27 February 2015 - 07:03 AM
Is this open-source? If it is, I would love to start developing for it, and I am thinking of possibly integrating this into an OS as it's base (similar to how Ubuntu and other Linux distros use the Linux Kernel as a base, and add on from there).

EDIT: Also, there seems to be a problem with the makefile, as running make returns "make: *** [corelib] Error 2".

Yes, it's free and open source, so everybody can contribute. If you'd write any additional packages, make a pull request, so they will be available for everyone.

It seems, that you don't have lua installed on your system. GNU Make is also required.
Edited on 27 February 2015 - 01:18 PM
comp500 #10
Posted 27 February 2015 - 04:32 PM
Awesome! It'd be good to add some sort of custom upt repo system (like PPAs). What's the format for repo.db?
TsarN #11
Posted 27 February 2015 - 04:57 PM
Awesome! It'd be good to add some sort of custom upt repo system (like PPAs). What's the format for repo.db?

repo.db has two parts: packages and tree.
First part is list of packages, their versions and dependencies:

upt 0.4.0 uberkernel;corelib
means, that package, named "upt" is version 0.4.0 and depends on uberkernel and corelib

Parts are divided with
//DIRLIST

Second part is just recursive listing of "packages" folder:
D/uberkernel
F/uberkernel/Makefile

Letters before paths are node types: F for File, D for Directory.

That's all. Basically, repo.db is required, because GitHub restricts access to API to 60 requests per hour.
Edited on 28 February 2015 - 09:28 AM
Creator #12
Posted 27 February 2015 - 07:00 PM
After I install the OS wht do I run?
TsarN #13
Posted 27 February 2015 - 07:44 PM
After I install the OS wht do I run?
You have probably cloned the repo(or downloaded ZIP file). This is not enough, cause the system must be minified and put together. Funny thing, this can be easily done from inside UberOS. I have put pastebin installer, just follow instructions in topic.
TsarN #14
Posted 28 February 2015 - 08:33 AM
I have added support for custom repositories(a bit buggy, though). To add your repository, edit /var/lib/upt/db/general file. Like this:
name_here http://some_website.example.com/stuff/my_custom_repo_for_uber_os
This means, that you need to put
http://some_website.example.com/stuff/my_custom_repo_for_uber_os/name_here.db
file(like repo.db), and place your packages under
http://some_website.example.com/stuff/my_custom_repo_for_uber_os/packages/PACKAGE_NAME_HERE
comp500 #15
Posted 28 February 2015 - 08:39 AM
I have added support for custom repositories(a bit buggy, though). To add your repository, edit /var/lib/upt/db/general file. Like this:
name_here http://some_website.example.com/stuff/my_custom_repo_for_uber_os
This means, that you need to put
http://some_website.example.com/stuff/my_custom_repo_for_uber_os/name_here.db
file(like repo.db), and place your packages under
http://some_website.example.com/stuff/my_custom_repo_for_uber_os/packages/PACKAGE_NAME_HERE
good! I'll probably end up using packman though, I prefer it
biggest yikes #16
Posted 28 February 2015 - 05:39 PM
This.
Is.
Awesome.
You've totally won me over.
Edited on 28 February 2015 - 04:39 PM
TsarN #17
Posted 02 March 2015 - 09:01 AM
I am happy to announce, that kernel is now Beta! This means, that most of the APIs are stable and (probably) would not have incompatible changes. I will write some documentation soon.
ByteMe #18
Posted 02 March 2015 - 10:18 AM
hmm it used to work fine for me but now I get.
TsarN #19
Posted 02 March 2015 - 10:48 AM
hmm it used to work fine for me but now I get.

It seems, that you are using old version of bootloader(incompatible with current kernel). Try passing "root=" option to kernel or use latest version from GitHub.
Edited on 02 March 2015 - 10:25 AM
Geforce Fan #20
Posted 03 March 2015 - 01:23 AM
There is a HUGE security flaw in this. You can EASILY evade the password by booting to:
"/rom/programs/shell"
You should make them type their password FIRST.
TsarN #21
Posted 03 March 2015 - 07:59 AM
There is a HUGE security flaw in this. You can EASILY evade the password by booting to:
"/rom/programs/shell"
You should make them type their password FIRST.
Yes, this wasn't a bug. Admin should configure bootloader, so you can't boot to CraftOS.
So, bootloader now forces to boot from "/boot" only by default.
TsarN #22
Posted 19 April 2015 - 01:38 PM
New version is available (0.9.1)
Notable changes:

Added proper fs.find

Kernel now officially supports CC 1.6x - 1.7x
Fixed crash on CC 1.6 - 1.62
Coreutils now support wildcards
Coreutils now support -v (verbose)
Security and bug fixes
LDDestroier #23
Posted 19 April 2015 - 02:05 PM
Looks nice! I gotta try it out when I get the time.
Does multithreading work on regular computers?
TsarN #24
Posted 19 April 2015 - 02:18 PM
Does multithreading work on regular computers?
Yes, it does, but there are no tabs like in CraftOS. You can view all running threads by typing "ps". You can kill processes by typing "kill <process_id>".
Edited on 19 April 2015 - 12:19 PM
TsarN #25
Posted 22 April 2015 - 06:15 PM
Temporary filesystem implemented(tmpfs). It allows you to store files in computer's RAM(no disk writing). It is mounted to /tmp by default.
Creator #26
Posted 22 April 2015 - 08:24 PM
How did you do the tmpfs?

PS; This is my 400th post. I just feel good.
comp500 #27
Posted 24 April 2015 - 02:38 PM
How did you do the tmpfs?

PS; This is my 400th post. I just feel good.
Replace fs with an fs that stores files in a table.
Shefla #28
Posted 30 May 2015 - 01:25 PM
Hello, nice work here. :)/>

I'm also willing to make an unix-like os, would you mind if I borrow some parts of your code?
Looking at your repository I can't find any license informations.
TsarN #29
Posted 30 May 2015 - 02:17 PM
The license is GPLv3 MIT. You can use it's code, as long as you give credit and link.
Edited on 30 May 2015 - 02:11 PM
FUNCTION MAN! #30
Posted 30 May 2015 - 03:55 PM
Ew, gpl! Other than that, very nice.
TsarN #31
Posted 30 May 2015 - 04:10 PM
Oh, I never actually read GPL license -_-/>
But now I prefer MIT over it. So yeah, MIT
Shefla #32
Posted 30 May 2015 - 04:43 PM
MIT license for the win. :)/>
And of course I will let you know and give proper credits if I use part of your hard work.
DaKodiMaster #33
Posted 30 May 2015 - 10:07 PM
What exactly are the limits of this OS? I have no idea what Unix is and I don't think it can be logically explained.
FUNCTION MAN! #34
Posted 31 May 2015 - 01:57 AM
http://en.wikipedia.org/wiki/Unix
Kameko #35
Posted 01 June 2015 - 04:43 PM
This is a fantastic OS, I think it's my favorite among all the others. It really's true to the source material and it's pretty fun to use. I got kinda giddy when I made an account in it.
It also makes me want to make an NT-like OS just to compete with it.

What exactly are the limits of this OS? I have no idea what Unix is and I don't think it can be logically explained.

Unix is just a family of operating systems that specifies certain programs and other quirks, like it has to be multiuser and everything has to be a file. If you don't know what Unix is you probably don't want to use this OS in a practical application, but you should try it for fun. GNU/Linux and Mac OS X are both Unixes by the way. Windows NT isn't a Unix, it's design is based on VMS, but it was designed to supersede Unix, and shares few design choices with it (multiuser, PATH, CR/LF, it even had a Unix subsystem at one point).
TsarN #36
Posted 18 June 2015 - 03:01 PM
I added demo video, featuring new shell features, like "cat", "grep", piping and shell variables.
https://youtu.be/alKvJj3jDN0
tenshae #37
Posted 20 June 2015 - 04:45 PM
I added demo video, featuring new shell features, like "cat", "grep", piping and shell variables.
https://youtu.be/alKvJj3jDN0

It's nice to see you're still working on this.

It looks incredibly promising ;)/>
Zaklinatel #38
Posted 02 July 2015 - 05:59 AM
I'm russian speaking, so sory for my bad english.

What about some network protocols based on CC network interaction?
Once I tried to make something like that, and didn't find application, but now… Now we have UNIX-like OS ideally suited for a network.
I would like to see ssh, file trasfer protocols, HTTP maybe (sic! web-dev in minecraft cc world, o holyshit!), etc… Of course, all it needs a powerful API, so that we can do other network applications. And yes, this is all so ambitious.
So, since I'm a programmer, I could help you. And I WANT to help you.
How can I contact with you? Skype maybe?
Creator #39
Posted 02 July 2015 - 02:06 PM
About networking. Have you thought about joining ccTCP. There was a topic in the program section recently.
tenshae #40
Posted 03 July 2015 - 11:43 PM
An SSH-like utility should be created for this :D/>
TsarN #41
Posted 31 July 2015 - 12:25 PM
I think it's time for release. Kernel pretty much stable, all features implemented, most bugs fixed.
I don't have time for this project right now, so feel free to contribute on GitHub.
If you were using 0.9.x, please install fresh system. UPT may be broken for some reason.

About networking. I thought about implementing it, but I don't have much experience with CC networks. If someone implements it, it would be really nice.
Also thought about device sharing via udev. It's like you have printer connected to your computer, and someone connects to you, and can use your printer as his own. (/dev file appears, API calls automatically redirect via networks and so on).

I also started implementing GUI, and got something worked but this was my first experience, and I got messy code (you can find it in develop-ccute branch). May be someone can do something user-friendly GUI-based, based on UberOS. I even got a name for such project: "Ubertu" :D/>
JohnSmith41Junk #42
Posted 18 January 2016 - 01:39 AM
Awesome OS! Would it be possible to populate /dev with things like urandom (random character generator), and some other devices that normal *nix has? (if you need it, I can give you a full directory listing of /dev on my Ubuntu laptop)
TsarN #43
Posted 18 January 2016 - 07:08 AM
Awesome OS! Would it be possible to populate /dev with things like urandom (random character generator), and some other devices that normal *nix has? (if you need it, I can give you a full directory listing of /dev on my Ubuntu laptop)

Yes, it is possible, you just need to edit udev to include urandom and other stuff. Unfortunately, binary file operations are currently not supported by /dev and /tmp
JohnSmith41Junk #44
Posted 18 January 2016 - 09:43 AM
Cool, some other questions:
1. While booting, I get "[devfs] udev not found!" and "Unable to mount /dev/ram as devfs on /dev", but I don't see a /dev/ram. Is this normal?
2. The programs in the ROM are innaccessable unless I specifically do "./sys/rom/programs/whatever". Was that intentional? I can just create symlinks for the programs I use, but I was curious
3. Can you add wget or curl? I can make one for you if you want
TsarN #45
Posted 18 January 2016 - 12:10 PM
Cool, some other questions:
1. While booting, I get "[devfs] udev not found!" and "Unable to mount /dev/ram as devfs on /dev", but I don't see a /dev/ram. Is this normal?
2. The programs in the ROM are innaccessable unless I specifically do "./sys/rom/programs/whatever". Was that intentional? I can just create symlinks for the programs I use, but I was curious
3. Can you add wget or curl? I can make one for you if you want

1) This happens because of redundant line in /etc/fstab
2) This is intended. If you want access them faster, change PATH:
PATH=${PATH}:/sys/rom/programs
You'll need ush >= 0.5.0
3) I've added curl (very simple, just type
curl http://example.com >output.txt
, the > symbol means redirecting from standart output to file)
JohnSmith41Junk #46
Posted 18 January 2016 - 01:07 PM
Cool! If I can suggest another command, how about sudo? I think if this were used in a multi-user enviroment, you probably wouldn't want everyone running as root, but you also wouldn't want to have to switch to root to modify things.
TsarN #47
Posted 18 January 2016 - 03:07 PM
Cool! If I can suggest another command, how about sudo? I think if this were used in a multi-user enviroment, you probably wouldn't want everyone running as root, but you also wouldn't want to have to switch to root to modify things.

There is already "su" command (substitute user). You can change to any other user, by typing "su [user]". If user is not specified, then it will switch to root. It will ask for password, unless you are root.
FUNCTION MAN! #48
Posted 19 January 2016 - 07:58 PM
What about `su -c`?