Menu

Forking

Ninja OS

This is the official guide to fork Ninja OS into your own distro. Ninja OS was more or less designed to be easy to modify and fork off into new projects. Reasons for making your own fork could be anything from disagreement with configs, need/want for programs not installed, or maybe you just want a customized OS with your own artwork and graphics. All are acceptable. If you are going to seriously redistribute Ninja OS with your modifications its seriously recommended you fork.

For those not happy with the default packing list, we even maintain a handful of extra programs in the official NinjaOS repo. These include programs that might later be installed by default, but are discluded for a variety of reasons.
[Repository]

Skills you need to have to make a port

  1. General linux expertise. You need to be able to administer a GUI linux box, and one without a GUI.
  2. Expertise with parent distribution Arch Linux
  3. Learn to use larch and figure out the quirks and bugs.

Download larch profile and test

  1. set up your development box with linux, python and larch.

  2. get the Ninja OS larch profile. If you plan on actually making a working for, use the git version. It can be found here on gitorious. While we maintain larch.tar.gz's with the profile, given parent Arch Linux's rolling release nature, they probably won't work as intented, if at all. They are provided for refrence only.

  3. import it into larch and make sure you can build it, and make sure your working copy of Ninja OS.

Strip and Replace Ninja OS Branding

1.
now in the "Make Medium" tab, click "edit medium files".
Under cd-root/boot/isolinux/ there is a file called ninjaboot.jpg. delete this file.

Make a replacement as a JPG file that is precisely 640x480 pixels with your new OS's logo. IT should have the name of the OS and a version number. Its recommended you use GIMP or photoshop or any other editor that lets you save project files, and keep a master file outside the program you can easily change version numbers, then export to jpg. leave the jpg in cd-root/boot/isolinux/

Now get a sha256 hash sum of your new menu background jpg.

2.
update the version file in rootoverlay/var/LIVEOS_VERSION.TXT. Click on larchify -> edit overlay.

TEMPLATE - http://pastebin.com/KuD4MGvm

This is where most scripts will read from to determine the name and version. be sure to update the sha256 sum as described in the template with the sha256 from step1. If you plan on writing your own scripts, here is some bash boiler plate to read the name and version of a Ninja OS derivative.

EDIT: We now have liveos_boilerplate.sh. This handles standard variables, associated with versioning. add:
. /usr/share/scripts/liveos_boilerplate.sh
to the top of your shell scripts:

This will let your script use $OSNAME, $OSVERSION, $OSSLUG. OSSLUG returns a UNIX-fied version of $OSNAME. respectively in shell scripts. Also $BOOTPART gives you the name of the boot partition, and $BOOTDEV gives the device name

3.
Strip branding off scripts.

Go over every script in /usr/share/scripts to look for refrences for Ninja OS in the comments.(shouldn't be any, just in case), and everything in /etc/ and /usr/local/bin/, just to be sure.

4.
replace GPG key. In git, and as of version 0.7.6, there is a public gpg key located in rootoverlay/usr/share/ninja_os_public_key.gpg.

The key is also imported into the key ring for "user". You most likely want to replace this key with your own. This is the same public key used to sign Ninja OS files.

Customize

edit as you see fit. everything in the rootoverly/ directory will by placed in the root partition of the running system when you hit the "larchify" button. this is where you add, put, and update anything you want on root that is not install via package manager.

the addedpacks file is a list of packages to be installed from the package manager. included with Ninja OS are a few extra packages compiled from Arch Linux's Arch User Repository and stored in the AUR directory. Arch Linux supports 64 bits, but larch and Ninja OS as of now only compile for i686. Extra packages are listed commented out in addedpacks.

user configurations are placed in rootoverlay/etc/skel and show up in /home/user when the system is actually run.

AUR - Is not directly used by larch, but its an included Arch Linux repository full of extra packages not included in mainline Arch Linux.

Maintenance

rootoverlay/etc/CLI-APPS-LIST is a list of command line oriented packages that will display when someone types ninjaos on the command line. edit these.

rootoverlay/var/lib/misc/ is where all hashes are stored for integrity_check make sure these get updated when their respective pieces of software get updated.

AUR - Make sure you keep up with compiles, with the latest versions for your custom software. Arch is rolling release. Keep your repo fresh.


Related

Wiki: Home
Wiki: Repository

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.