Installing CRUX

Supported Hardware / Requirements

Packages on the official CRUX ISO image are compiled with optimization for x86-64 (AMD Athlon 64, Intel Core, Intel Atom) or newer processors. Do not try to install it on an i686 (Pentium-Pro, Celeron, Pentium-III) or lower processor, since it simply will not work.

A minimum of 192MB system memory is required to install CRUX from CD-ROM or removable flash drive. It is possible to perform a custom chroot installation with only 16MB of RAM.

The kernel used during installation, i.e. when booting from the CRUX ISO image (El Torito), is compiled with the following disk controllers and USB support:.

In order to install CRUX, your disk controller must be present in the list above. If your hardware is not supported or you have other problems installing CRUX, you might find a solution in the CRUX wiki.

Installing From CD-ROM or removable flash drive

Download the CRUX ISO image (crux-3.4.iso). To ensure that the download was successful, examine its checksum using md5sum.

$ md5sum crux-3.4.iso

Compare the output with the file crux-3.4.md5, which can be found in the same directory as the ISO image on the download site. If the checksums match, the download was successful and you can continue by burning the ISO image to a CD or writing it to a removable flash drive.

The ISO image is bootable, just insert the newly-written CD or removable flash drive and reboot your computer. Press Enter at the boot prompt (you might have to adjust the root= parameter, depending on your hardware configuration).

You will be automatically logged in as as root on tty1 (root has no password set).

Create (if necessary) and format the partition(s) you want CRUX to be installed on.

$ fdisk /dev/sd?
$ mkfs.???? /dev/sd??
$ mkswap /dev/sd??

Note

Please keep in mind that SATA harddisks are usually detected as SCSI devices. The first SATA disk is called /dev/sda instead of /dev/hda. For more information about harddisk naming conventions please refer to the Linux Partition HOWTO.

The amount of disk space required depends on how many packages are selected to install. It is recommended to have at least a 1G root partition (CRUX will use about 200MB-500MB, depending on your configuration).

Note: UEFI

For UEFI installation a GPT disklabel and an EFI system partition (ESP) are required in most cases. The ESP does not need to be very large (100MiB for example) and should be formatted with a FAT32 filesystem and flagged as bootable. When using UEFI the boot loader/manager will be installed in the ESP rather than the traditional method of installation into the Master Boot Record (MBR).

CRUX supports all the filesystems supported as root filesystems by the linux kernel: btrfs, ext2, ext3, ext4, JFS, reiserfs and XFS.
Further, it is highly recommended to separate the system data from user data, i.e. use a separate partition for /home (and possibly /var) since that will make your life a lot easier the day you want to upgrade/reinstall/remove your system.

Note

Make sure the appropriate userspace filesystem-tools are installed. xfsprogs, btrfs-progs, jfsutils and reiserfsprogs can be found in the opt repository.

Note

Make sure that any BIOS Virus Protection option is DISABLED as this option may prevent fdisk from writing new partitions correctly.

Mount the partition on which you want to install this distribution.

$ mount /dev/sd?? /mnt

If you want the installation to span more than one partition, mount those partitions as well. For example, if you want to have a different partition for /home or /var, then do:

$ mkdir /mnt/var
$ mount /dev/sd?? /mnt/var

Activate your swap partition(s).

$ swapon /dev/sd??

Type setup to start the package installation script. The script will ask where you mounted your new root partition and which packages you want to install. Select the packages you wish to install; it is recommended to install all the packages from core.

Note: UEFI

If installing a UEFI system make sure to select the efibootmgr and grub2-efi packages from the opt collection during the package selection phase.

After the packages have finished installing, the setup script will display an installation log. Make sure the last line in the log says “0 error(s)”.

If you missed/forgot to install certain packages, you can just mount the CRUX installation media and use pkgadd to install them.

Replace /boot/efi with the location of the mounted ESP. If efibootmgr was selected during the package selection phase grub-install will automatically create a boot entry and make it active.

More information about UEFI and other boot loader/manager options can be found in the CRUX wiki at https://crux.nu/Wiki/UEFI.

Remove the CRUX installation media from your computer and reboot from harddisk.

Upgrading From CD-ROM or removable flash drive

Download the CRUX ISO image (crux-3.4.iso). To ensure that the download was successful, examine its checksum using md5sum.

$ md5sum crux-3.4.iso

Compare the output with the file crux-3.4.md5, which can be found in the same directory as the ISO image on the download site. If the checksums match, the download was successful and you can continue by burning the ISO image to a CD or writing it to a removable flash drive.

The ISO image is bootable, just insert the newly-written CD or removable flash drive and reboot your computer. Press Enter at the boot prompt (you might have to adjust the root= parameter, depending on your hardware configuration).

You will be automatically logged in as as root on tty1 (root has no password set).

Mount your CRUX root partition.

$ mount /dev/sd?? /mnt

If your installation spans over more than one partition, mount these partitions as well. For example, if you have a different partition for /var, then do:

$ mount /dev/sd?? /mnt/var

Activate your swap partition(s).

$ swapon /dev/sd??

Type setup to start the package installation script. The script will ask you where you mounted your root partition and which packages you want to upgrade. To avoid running into trouble (e.g. a new version of some library isn't 100% backwards compatible), it is a good idea to upgrade all packages.

Note

The setup script uses the /etc/pkgadd.conf of the target system to determine which files to upgrade, and which files to not upgrade. The files that are not upgraded are put in /var/lib/pkg/rejected/ (Section "Upgrading a Package").

When the setup script has upgraded the selected packages an upgrade log will be displayed. Make sure the last line in the log says “0 error(s)”. If you missed/forgot to install certain packages, you can just mount the CRUX installation media and use pkgadd to install them (e.g. pkgadd /mnt/crux/opt/package#1.0-1.pkg.tar.gz).

Now it's time to compile your kernel. The kernel compilation requires that you “chroot” into your CRUX installation.

Note

There is a shortcut command for creating the chroot environment: setup-chroot. This will execute all these steps at once.

udevreads files in/sys/*and/proc/*. Make sure that those pseudo filesystems are enabled in your kernel configuration and available during system-startup. Also note that udev doesn't automatically mount/dev/pts. Terminal applications such asxterm(1)will not work if you forget to mount it. We highly recommend you check your fstab file:''