Jump to content




VorbaniOS - A *nix kernel/OS


19 replies to this topic

#1 Scoopta

  • Members
  • 23 posts
  • LocationCalifornia, United States

Posted 21 March 2017 - 01:50 AM

THIS POST HAS BEEN MOVED TO: https://forums.compu....php?topic=21.0


Summary

A *nix like operating system. This operating system is under heavy development and might not be perfectly stable. This might be considered by some to be overkill for minecraft but I like it and if you don't...don't use it. More features will be coming. The usability isn't perfect but that will come in time. The big thing about this OS is it's kernel not the userspace. The userland tools are pretty terrible. Ideally someone will build an OS on top of this kernel. If you do that all I ask is that you give me credit for the kernel. It would also be nice if you filed a proposal on bitbucket instead of shipping a modified kernel but that's not a requirement...just a request. There is only a certain amount of CraftOS compatibility. The fs api is mostly compatible however other APIs like peripheral don't exist at all but are replaced with a more *nix like device file approach. If you NEED the peripheral API for CraftOS applications there is a wrapper for it but it's not the best and does have some issues. Once you have the OS installed you can add the following to /etc/pacman/sources.list
HolyCloudNinja vorbani-addons default
and then run
pacman install vLibs
to download it. I would recommend you just directly send commands to the devices as described in the usage section. Anything in /lib that has lib in the start of its name will be automatically loaded at boot. I wouldn't recommend installing this on a computer that already has files on it as those will not be accessible from the OS and unless you're on Minecraft 1.7 or earlier disks containing startup are disabled making accessing your old files impossible. There is a convert system call and corresponding command that can convert CraftOS files but they must already be visible to user space. I.e. on a disk in a folder called root or already in the user space file system on the computer. pastebin and edit are no longer shipped with the OS but must be installed from the official repositories using
pacman install edit
You can replace edit with pastebin to install pastebin.

Installing

You will need to have CCTweaks installed for the OS to run. At least in MC 1.7.10.
pastebin run 56nnyZrK
root's default password is groot
To update the OS run the update command. If you want to run an even more unstable build you can run update development which will switch you to the development tree which is even more unstable than the stable tree.
You can also fresh install the development tree by doing
pastebin run 56nnyZrK development
If you're interested in building your own OS around the kernel there is an OSDK tree for this purpose. The OSDK ships with a bootloader, kernel, and bare-bones init daemon which will open itself in an editor on boot. That's all it ships with and it is only intended for developers. It can can be installed with
pastebin run 56nnyZrK OSDK
The kernel shipped with the SDK tracks development closer than stable does however it still lags behind development. You can find a system call reference here: https://bitbucket.or.../System%20Calls. As I've already said modifying the kernel is not recommended and the kernel internals will never be documented. If you want to modify the kernel you're flying solo. This SDK is designed for building a user space(including init daemon) not for kernel modification.

Usage

  • Mounting disks: In order to access the contents of a disk you must first mount it. Floppy disks will have a device file in /dev with a name that starts with fd. There is a mount command to facilitate mounting disks and a umount command to un-mount disks. I.e mount /dev/fd0 /mnt will make the contents of /dev/fd0 available in /mnt. /dev/fd0 being the first floppy disk to be inserted. The second will be /dev/fd1 and so on. Disks containing files made outside the operating system will not be accessible as they have no on disk permissions and probably won't even be visible to opendir(fs.list)
  • Accessing peripherals: Peripherals aren't treated the way CraftOS treats them. They're treated like files. Disk drives don't actually have device files but rather the disks inside them do, printers will show up with parallel port device files I.e /dev/pp0, /dev/pp1, etc. All other peripherals of any type from any mod(modems, computers, etc) will show up as rs232 device files I.e /dev/ttyS0, /dev/ttyS1, etc. To call a function on a peripheral(printers included) you would write the function's name to the device file followed by a space with the parameters I.e. let's say you wanted to open channel 512 for the modem at /dev/ttyS0. You would write
    open 512
    to /dev/ttyS0. To close 512 you would write
    close 512
    If you need to pass a string as a parameter and that string contains a space, prefix the space with \. I.e
    my\ parameter\ containing\ a\ space
    would be passed as one parameter where
    my\ parameter containing\ a\ space
    would be passed as 2 because the space between parameter and containing has no \ so the result would be two parameters. If you need to pass a table as a parameter serialize it using text utils and then escape spaces with a \. This can be done easily by doing
    mytable = textutils.serialize(mytable):gsub(" ", "\\ ")
  • Creating users:
    useradd <username>
  • Setting a users password:
    passwd <username>
    passwd will prompt you to enter and confirm your password. Do not enter it as a parameter.
  • We use POSIX permissions. When files are created they are owned by the user who created them with permission 750. You can use chmod to change the permissions or chown to change the owner(if you are root). If you are not root you must own the file and can only change the group for the file but must leave the owner the same or nothing will happen.
  • The kernel has a few systemcalls, I.e. setuid that require special file permissions. If you have a program that needs to change the current user it must be owned by root and have special permission 6 just like in a POSIX environment. I.e. a file owned by root with permission 755 would mean anyone can read and execute it but only root can edit it. A file with permission 6755 would additionally mean that the program can call setuid to change the current user to any user it wants. Please note if you're running the program as root it can setuid regardless of it's on disk permissions. This is not a bug. Doing this is not recommended because once you set the user to a non-root user you can't go back to root because the program is no longer running as root and lacks the on disk permission required to get it back. If you make a setuid capable program I'd advise against calling any apis as regardless of their own permissions they can setuid because the program calling them can. I'd also recommend using protected execution as covered in the next bullet point for setuid programs as running arbitrary code that can setuid just because you can is less than ideal.
  • Package management is done with the pacman utility. You can use pacman install to install packages and pacman purge to uninstall packages. By default only one repo is available but more can be added by editing /etc/pacman/sources.list. Each repo needs to be on its own line. The format is as follows:
    <bitbucket username> <bitbucket repo name> <hg branch>
  • Packaging software: to setup a repository that can be accessed by the operating systems package manager you must make a mercurial repository on bitbucket. Inside the repository you put folders representing packages. Each folder in the root of your repository corresponds to a package and the names of those folders will be used as the package names. Everything inside of a package's folder corresponds to a filesystem location. For example if my package was called testpkg and put a program called test in /bin the structure from the root of the repository would look like so: testpkg/bin/test. You can put a lua script called postinst in the package I.e testpkg/postinst and it will get run after your package has finished installing. This can be used to make system calls to chmod or chown the installed files or do other things. Please note this script gets run as root so use with caution. All a user has to do to install your package is add your repo to their sources.list as shown above and then pacman install <package name> in this example
    pacman install testpkg

Submitting Issues

Please file bug reports at https://bitbucket.or...scaptos2/issues. You can submit issues anonymously without logging in or creating an account.

Edited by Scoopta, 13 August 2018 - 12:03 AM.


#2 DubbelSoftware

  • Members
  • 62 posts

Posted 21 March 2017 - 07:09 PM

Nice, its good, but can you not make a help command for users that dont know the commands??
I never have used Unix, so possible that can you do in a new update?

-DubbelSoftware

#3 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 21 March 2017 - 07:36 PM

Whilst this OS doesn't seem quite my cup of tea, I'm very impressed by the work that has gone into it, and the feature set.

One thing I noticed is that you're storing file permissions in the file name itself. This seems a little ugly a solution. One thing I'd suggests is using something like Lyqyd's metadata format: this is a nicer solution to the file permissions system, as well as having some form of compatibility with other systems (well, the ones which use it).

#4 Scoopta

  • Members
  • 23 posts
  • LocationCalifornia, United States

Posted 21 March 2017 - 09:05 PM

View PostDubbelSoftware, on 21 March 2017 - 07:09 PM, said:

Nice, its good, but can you not make a help command for users that dont know the commands??
I never have used Unix, so possible that can you do in a new update?

-DubbelSoftware
I can definitely add a help command.

View PostSquidDev, on 21 March 2017 - 07:36 PM, said:

Whilst this OS doesn't seem quite my cup of tea, I'm very impressed by the work that has gone into it, and the feature set.

One thing I noticed is that you're storing file permissions in the file name itself. This seems a little ugly a solution. One thing I'd suggests is using something like Lyqyd's metadata format: this is a nicer solution to the file permissions system, as well as having some form of compatibility with other systems (well, the ones which use it).
I thought about using some form of metadata originally but I couldn't think of a really elegant way of doing it. Primarily because moving files would involve going through and updating a metadata file and I never particularly liked the idea of a files location representing its permissions but maybe I'll switch to that because you're right. Using the file name is terrible. If I do that it probably won't be one of the top priorities.

Edited by Scoopta, 21 March 2017 - 11:57 PM.


#5 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 21 March 2017 - 11:13 PM

Sounds pretty interesting. Is the CLI much different from CraftOS?

Maybe renaming it to Vorbani Kernel might be more appropriate :P

#6 Scoopta

  • Members
  • 23 posts
  • LocationCalifornia, United States

Posted 21 March 2017 - 11:24 PM

View PostDubbelSoftware, on 21 March 2017 - 07:09 PM, said:

Nice, its good, but can you not make a help command for users that dont know the commands?? I never have used Unix, so possible that can you do in a new update? -DubbelSoftware
There is now a help command in the latest development build. It should get merged into stable soon. There are a few other things I'll probably end up doing before I merge it though.

View PostDave-ee Jones, on 21 March 2017 - 11:13 PM, said:

Sounds pretty interesting. Is the CLI much different from CraftOS?

Maybe renaming it to Vorbani Kernel might be more appropriate :P
XD yeah maybe. The shell is terrible. If someone wants to give me a new one I'd be glad to get my hands on a decent one. Maybe I could port the CC shell. So to answer your question yes the shell is quite different. This is an entire OS but the kernel is the only halfway noteworthy thing about it. The userland tools such as shell aren't the best primarily because I haven't put a lot of time into them. That's not to say the kernel is not buggy or good because it's not very mature but it's the thing I'm working on most.

Edited by Scoopta, 21 March 2017 - 11:26 PM.


#7 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 23 March 2017 - 12:52 AM

View PostScoopta, on 21 March 2017 - 11:24 PM, said:

View PostDubbelSoftware, on 21 March 2017 - 07:09 PM, said:

Nice, its good, but can you not make a help command for users that dont know the commands?? I never have used Unix, so possible that can you do in a new update? -DubbelSoftware
There is now a help command in the latest development build. It should get merged into stable soon. There are a few other things I'll probably end up doing before I merge it though.

View PostDave-ee Jones, on 21 March 2017 - 11:13 PM, said:

Sounds pretty interesting. Is the CLI much different from CraftOS?

Maybe renaming it to Vorbani Kernel might be more appropriate :P
XD yeah maybe. The shell is terrible. If someone wants to give me a new one I'd be glad to get my hands on a decent one. Maybe I could port the CC shell. So to answer your question yes the shell is quite different. This is an entire OS but the kernel is the only halfway noteworthy thing about it. The userland tools such as shell aren't the best primarily because I haven't put a lot of time into them. That's not to say the kernel is not buggy or good because it's not very mature but it's the thing I'm working on most.

Porting the CC Shell isn't too hard...IF you weren't changing the File System and using your Kernel's language instead of CC's...:P
Yeah, a decent kernel is quite rare around these forums :P

#8 Scoopta

  • Members
  • 23 posts
  • LocationCalifornia, United States

Posted 23 March 2017 - 06:02 AM

View PostDave-ee Jones, on 23 March 2017 - 12:52 AM, said:

View PostScoopta, on 21 March 2017 - 11:24 PM, said:

View PostDubbelSoftware, on 21 March 2017 - 07:09 PM, said:

Nice, its good, but can you not make a help command for users that dont know the commands?? I never have used Unix, so possible that can you do in a new update? -DubbelSoftware
There is now a help command in the latest development build. It should get merged into stable soon. There are a few other things I'll probably end up doing before I merge it though.

View PostDave-ee Jones, on 21 March 2017 - 11:13 PM, said:

Sounds pretty interesting. Is the CLI much different from CraftOS? Maybe renaming it to Vorbani Kernel might be more appropriate :P/>
XD yeah maybe. The shell is terrible. If someone wants to give me a new one I'd be glad to get my hands on a decent one. Maybe I could port the CC shell. So to answer your question yes the shell is quite different. This is an entire OS but the kernel is the only halfway noteworthy thing about it. The userland tools such as shell aren't the best primarily because I haven't put a lot of time into them. That's not to say the kernel is not buggy or good because it's not very mature but it's the thing I'm working on most.
Porting the CC Shell isn't too hard...IF you weren't changing the File System and using your Kernel's language instead of CC's... :P/> Yeah, a decent kernel is quite rare around these forums :P/>
The language is still very much lua and CC lua at that because changing that out requires far too much effort but the file system is not CC at all. As far as a decent kernel...hopefully with time that's what this will be haha.

Edited by Scoopta, 23 March 2017 - 06:03 AM.


#9 Scoopta

  • Members
  • 23 posts
  • LocationCalifornia, United States

Posted 09 April 2017 - 04:47 AM

View PostSquidDev, on 21 March 2017 - 07:36 PM, said:

Whilst this OS doesn't seem quite my cup of tea, I'm very impressed by the work that has gone into it, and the feature set.

One thing I noticed is that you're storing file permissions in the file name itself. This seems a little ugly a solution. One thing I'd suggests is using something like Lyqyd's metadata format: this is a nicer solution to the file permissions system, as well as having some form of compatibility with other systems (well, the ones which use it).
The current dev tree now has a metadata system that isn't as kludgy. It's not lyqyd's. I basically just store all the metadata into a table and then serialize it and then unserialize it to get the data back when needed.

#10 CLNinja

  • Members
  • 191 posts

Posted 09 April 2017 - 07:07 AM

Alright! If you're on the dev tree and have pacman, you can edit /etc/pacman/sources.list and add this to it:

HolyCloudNinja vorbani-addons default

And then run

pacman install vLibs

and you get most of the peripheral API installed, along with autoloading of connected peripherals into device files.

#11 086

  • New Members
  • 1 posts

Posted 09 April 2017 - 03:30 PM

and uhh..
how do you get rid of it?
completely bricked my computer and a floppy with a startup won't erase it, and i can't access lua to reset the label

#12 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 10 April 2017 - 12:34 AM

If a computer won't boot from disk, then you should be able to place the whole system into a disk drive and use another computer to wipe it.

#13 CLNinja

  • Members
  • 191 posts

Posted 11 April 2017 - 02:10 AM

View Post086, on 09 April 2017 - 03:30 PM, said:

and uhh..
how do you get rid of it?
completely bricked my computer and a floppy with a startup won't erase it, and i can't access lua to reset the label
I'll refer to what bomb bloke said, but if that doesn't work and you're in singleplayer, go into the save files and remove startup. If you're on a server, either ask the owner to do it, or you may be screwed.

#14 Scoopta

  • Members
  • 23 posts
  • LocationCalifornia, United States

Posted 11 April 2017 - 02:15 AM

View Post086, on 09 April 2017 - 03:30 PM, said:

and uhh.. how do you get rid of it? completely bricked my computer and a floppy with a startup won't erase it, and i can't access lua to reset the label
There isn't really a way to remove it. One other thing. Define bricked because if there's a bug I'd like to know about it assuming it hasn't already been fixed in the latest dev tree. Also "I wouldn't recommend installing this on a computer that already has files on it as those will not be accessible from the OS and unless you're on Minecraft 1.7 or earlier disks containing startup are disabled making accessing your old files impossible."

#15 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 12 April 2017 - 01:50 AM

View PostScoopta, on 11 April 2017 - 02:15 AM, said:

... disks containing startup are disabled making accessing your old files impossible.

Again: in builds of CC where startup can be disabled, computers can also be used as floppy disks.

#16 Scoopta

  • Members
  • 23 posts
  • LocationCalifornia, United States

Posted 12 April 2017 - 02:35 AM

View PostBomb Bloke, on 12 April 2017 - 01:50 AM, said:

View PostScoopta, on 11 April 2017 - 02:15 AM, said:

... disks containing startup are disabled making accessing your old files impossible.

Again: in builds of CC where startup can be disabled, computers can also be used as floppy disks.
I didn't know that when I made the original post and my point in quoting myself was to say "I already warned that this might be an issue"

#17 CLNinja

  • Members
  • 191 posts

Posted 12 April 2017 - 07:15 PM

I've updated libperiph to have full functionality for the peripheral API. Peripheral.find now works, and multiple peripherals can now be attached.

#18 rahph

  • Members
  • 81 posts

Posted 28 June 2017 - 09:04 PM

I made a program for this OS that makes all the colours look nice and bright. It requires a github version of computercraft for palettes. To install it on VorbaniOS, run
pacman add rahph\ assortedtools\ default\
And then
pacman install libvibrant

Color comparisons as well as a CraftOS version coming soon ;-)

#19 CLNinja

  • Members
  • 191 posts

Posted 15 July 2017 - 02:43 PM

libperiph is now defunct. If you are using the OS and need backwards compatible peripheral support, pacman install libmod after pacman add HolyCloudNinja\ vorbani-addons\ default

#20 CLNinja

  • Members
  • 191 posts

Posted 06 November 2017 - 06:34 PM

Newest patch includes disabling of the debug API





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users