This guide is for those who want to install either CRUX or __Source Mage GNU/Linux__. It was written so it can be used by both, only diverging on the particular details.
* __CRUX__: A ports based, BSD style init scripts, distro following true KISS principles (Keep It Simple, Stupid).
* __Source Mage GNU/Linux__: Without 3rd party patches, sensible defaults or masked packages, free from obfuscated and pre-configured code, use clean dependencies as they came from upstream developers and can also use flags.
* Temporarily change keyboard (available configurations can be found in the directories "_/usr/share/kbd/keymaps/_" for __CRUX__ and "_/usr/share/keymaps/i386/qwerty_" for __Source Mage GNU/Linux__)
In these examples we make only two partitions but you can extend this if you know how. The partitions are one root partition, later mounted to "_/mnt/drive_" with "_mkfs.<ROOT_FILESYSTEM>_" format, and one boot partition, later mounted to "_/mnt/drive/boot_" and with "_mkfs.<BOOTLOADER_FILESYSTEM>_" format unless is __UEFI__ in which case "_mkfs.vfat_" is the only format available and will be mounted to "_/mnt/drive/boot/efi_" instead.
* On __CRUX__ run "_setup_", and if on UEFI select on setup grub2-efi (if using GRUB 2), efibootmgr, and elfutils from opt (only select core, and say yes when you're asked if you want to select individual packages). And if you are not using LILO de-select it from core.
* The "_vmlinuz_" file makes reference to the kernel image, you can rename it or simlink to it in all cases, the only rule is you have to make sure the name is referenced correctly in the bootloader. By default it can have names like "_vmlinuz-linux_", "_vmlinuz-<KERNEL_VERSION>_" and so on. The same with "_initramfs.img_", it can be "_initramfs-<KERNEL_VERSION>.img_" and such.
* All bootloader examples have included other OS inside what is called "_stanzas_".
* Inserting "_password=<PASSWORD>_" inside an OS stanza will protect with a password that OS, but inserting "_password=<PASSWORD>_" just before the stanzas and outside any of them will protect with a password the bootloader itself (notice the space inside stanzas)
* Add repo location to /etc/prt-get.conf (order sets precedence)
`nano /etc/prt-get.conf`
* Add "prtdir /usr/ports/<REPO>"
* Populate repo
`ports -u <REPO>`
* Enable pre-/post-install scripts in "_/etc/prt-get.conf_" (usually safe to run repeatedly, usually used to rebuild caches and add system users when installing certain software)
`nano /etc/prt-get.conf`
* uncomment line "_runscripts yes_"
* Ignore footprint mismatches due to new files (usually not a bad thing)
`nano /etc/pkgmk.conf`
* Set line "_PKGMK_IGNORE_NEW="yes"_"
## CRUX COMMANDS
### Automated installation of ports
* Populate ports tree (is empty by default)
`ports -u`
* Automatically download and build a package with its required dependencies ignoring signature mismatch
`prt-get -in depinst <PORT>`
* Remove a package
`prt-get remove <PORT>`
* Search package
`prt-get search <PORT>`
* Get info from package
`prt-get info <PORT>`
* Get dependency info from package
`prt-get depends <PORT>`
* Update all packages
`prt-get sysup`
* List all installed packages
`pkginfo -i`
### Manually dowloading and installing
* Go to apropriate directory for all these tasks
`cd to /usr/ports/<REPO>/<PORT>`
* To download a package
`pkgmk -d <PORT>`
* To install a downloaded package
`pkgmk -i <PORT>`
* In case of signature mismatch
`pkgadd -f <PORT>`
* To clean directory from downloaded package and build
`pkgadd -c <PORT>`
* To remove installed package
`pkgrm <PORT>`
## SOURCE MAGE GNU/LINUX COMMANDS
* To get a manual
`cast smgl-setup`
`man smgl-setup`
* To change general things like the color scheme
`sorcery`
* To update the package manager
`sorcery update`
* To update the package list
`scribe update`
* To check for any changes in the architecture specs
`cast smgl-archspecs`
* To rebuild everything from source
`sorcery rebuild`
* To recompile the kernel
`cast -r linux`
* To get a list of spells needing upgrade
`sorcery -q`
* To upgrade the spells themselves known to be available for upgrade
`cast --queue`
* To check for broken installations
`cleanse --fix`
* After casting new spells you need this to have apropos, man -k, and whatis