Install Crux

This page is being updated to crux 3.6

This document contain information and relevant links to documentation on how to install and configure a base (core collection and few from opt/contrib) system. After install the system can be configured to build ports or get precompiled software packages from repository.

Gnu/Linux Crux implements an infrastructure similar to that of BSD-based operating systems for package management.

Ports consist of a Pkgfile (which is a shell script), any patches required to adjust the program to work, md5sum hashes used to verify the integrity of the downloaded files and a footprint file listing the files to be included in the binary package.

These files are downloaded from a software repository, compiled, and installed using the prt-get frontend to pkgutils. The software sources are downloaded from the websites of their respective upstream at the address specified in the Pkgfile.

Project ports collections are maintained by git with branch model that uses the follow branches; master and develop. Build system fetch ports from the stable-X.Y branch. Current mirror files are from each collection stable-3.6 branch.

Distributions releases with gnu tool chain and linux kernel version, this table serves only as a reference.

Softwarestable-3.6SlackWare 14.2Hyperbola
Kernel Linux5.4.994.4.144.9.143-1
Make4.34.14.2.1-2
GCC10.2.05.3.06.3.0-1
Glibc2.322.232.25-1
Binutils2.35.22.262.28.0-2
Bison3.7.53.0.43.0.4-2
M41.4.181.4.171.4.18-1
GDB10.17.11.17.12.1-3
Libtool2.4.62.4.62.4.6-7
Automake1.16.31.151.15-2
Autoconf?2.712.692.69-4



1.1 Install core

Use core script setup-iso.sh to download, check and mount crux iso to inspect.

There is updated iso's available, allows to later save time updating ports.

1.1.2 Partition Layout

Partitions bios_boot and efi are only required when GPT is in use.

When installing on virtual machine disk images consider using back_file strategy to save space and create new machines based on fresh installation or any future point.

1.1.3 Install

When using iso method once the partitions are mounted on /mnt just run setup.

When installing into a chroot check following documentation;


1.2 Quick setup

Run

# prt-get depinst pkg-get

Edit /etc/pkg-get.conf

##
# /etc/pkg-get.conf
# pkg-get configuration file

# package repositories (remote)
# The first two are remote repoistories, the last is a local one
pkgdir           /usr/ports/packages|https://mirror.leetio.dev/packages

# runscripts: if "yes" pre-post install scripts are
# automatically executed. Handle with care.
runscripts     yes

preferhigher yes      # (yes|no)

Get packages list;

# pkg-get sync

Move old port drivers, this will change your ports from upstream to tribu.

# mkdir -p /etc/ports/upstream
# mv /etc/ports/*rsync /etc/ports/upstream

Install meta-core package;

# pkg-get depinst meta-core

Make sure meta-core and linux-gnu-4.19 post-install script auto-run. If not run them manually.

Update ports;

# pkg-get update ports
# cd /usr/ports
# rm -rf {core,opt,xorg,contrib}
# ports -u

Update system;

# pkg-get sysup


1.3 Configure core

Port meta-core post-install script automates following steps, check quicksetup.

With all core packages installed system can be now configured, once it's configured only kernel and bootloader are missing in order for system become boot-able and self hosted.


1.4. Linux, grub and dracut

Port linux-4.19 and linux-gnu-4.19 post-install automates following steps, check quicksetup.

Prepare system to reboot, install kernel and configure boot loaer.


1.5 Configure ports;

Configure ports and tools, it's not necessary to update or install packages at this point. It's possible to configure the system to only use already packaged software (binary packages), read build page for more information.

Pkgmk configuration

/etc/pkgmk.conf
Default pkgmk configuration.
/etc/pkgmk.conf.harden
Harden configuration, under testing.
/etc/prt-get.conf
Default configuration with common ports collections configured.

1.6 Post install

Read build page for more information on how update system, install packages, configure server and clients to use packaged ports (binary packages).

Read hardening page for better system configuration, installation and configuration of security related tools.

Pkgmk (build flags) harden configuration is a research effort, toolchain page covers ports that need changes or break.

Review kernel configuration, read Gentoo configuration guide and AMD64 specific configuration.



Notes

Note: Add goaccess tool for nginx analytics.

Note: Firefox and Python fails to build after reboot due to wrong /dev/shm permissions. Fix documentation and builders fstab;

# chmod 777 /dev/shm

Note: Check and test akosela install script.