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.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 grootTo 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.- 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
to /dev/ttyS0. To close 512 you would writeopen 512
If you need to pass a string as a parameter and that string contains a space, prefix the space with \. I.eclose 512
would be passed as one parameter wheremy\ 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 doingmy\ parameter containing\ a\ space
mytable = textutils.serialize(mytable):gsub(" ", "\\ ")
- Creating users:
useradd <username>
- Setting a users password:
passwd will prompt you to enter and confirm your password. Do not enter it as a parameter.passwd <username>
- 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
Please file bug reports at https://bitbucket.or...scaptos2/issues. You can submit issues anonymously without logging in or creating an account.