Introduction
Welcome, brave soul, to the wild world of CRUX Linux—a minimal, source-based distribution for people who like to tinker, tweak, and generally mess around under the hood until everything purrs like a well-oiled supercomputer. If you’ve ever dreamed of building your system piece by piece from scratch, or you simply want to impress your friends with your terminal-fu, you’re in the right place. This guide is your trusty companion through every step of installing CRUX, garnished with just enough humor to keep you from dozing off during the partitioning stage.
Prerequisites
- Basic Linux knowledge: You should be comfortable with the command line, editors like vi or nano, and the concept of mounting file systems.
- Hardware: A compatible PC (i686 or x86_64), at least 512 MB RAM, and ~2 GB free disk space (more if you’re a package-hoarder).
- Backup: Please back up any precious data before hacking on partitions. Don’t say we didn’t warn you.
- Internet connection: Required for downloading the ISO and fetching packages from the CRUX repositories.
Step 1: Downloading CRUX
Head over to the official CRUX website and grab the latest ISO. You can choose between the full or the minimal image minimal is like a blank canvas, while full has a few handy scripts included.
Step 2: Verifying ISO Integrity
Verifying checksums is like checking your parachute before jumping. Use the provided SHA256 file:
sha256sum crux-3.-iso.tar.gz cat sha256sums.txt grep crux-3.
Confirm that both hashes match. If not, download again (and maybe have a word with your flaky mirror).
Step 3: Creating Installation Media
Plug in your USB stick and identify it (e.g., /dev/sdX) using lsblk. Then:
dd if=crux-3.-iso.tar.gz of=/dev/sdX bs=4M status=progress sync
Warning: This will wipe the device. No take-backsies.
Step 4: Booting into the Installer
Reboot your machine, select the USB device in BIOS/UEFI, and you should land in a minimal shell with basic tools. Breathe deep the fun begins now.
Step 5: Partitioning the Disk
We’ll use cfdisk (graphical in a text way) for simplicity. In this example, we’ll create three partitions:
| Partition | Type | Size | Mount Point |
|---|---|---|---|
| /dev/sda1 | EFI (if UEFI) or BIOS boot | 512 MiB | /boot (or EFI system) |
| /dev/sda2 | Linux swap | 2 GiB | swap |
| /dev/sda3 | Linux native | rest of disk | / |
Remember: swap is optional if you have enough RAM, but it’s nice for hibernation.
Step 6: Formatting Partitions
mkfs.ext4 /dev/sda3– for the root partition.mkswap /dev/sda2 swapon /dev/sda2– turn on swap.- If using EFI:
mkfs.vfat -F32 /dev/sda1else:mkfs.ext4 /dev/sda1.
Step 7: Mounting Partitions
mount /dev/sda3 /mnt mkdir /mnt/boot mount /dev/sda1 /mnt/boot
Step 8: Installing the Base System
CRUX provides a tarball of the base system. Extract it directly onto your target:
cd /mnt tar xpvf /path/to/crux-3.-packages/base-3..tar.xz
This is like unwrapping the core of your new OS. No fluff, no bloat.
Step 9: Chrooting into the New System
Switch into your new environment to configure it:
mount -t proc proc /mnt/proc mount --rbind /sys /mnt/sys mount --rbind /dev /mnt/dev chroot /mnt /bin/bash source /etc/profile export HOME=/root
Welcome to your new home. Feel free to redecorate.
Step 10: Configuring the System
/etc/fstab
/dev/sda3 / ext4 defaults,noatime 0 1 /dev/sda1 /boot ext4 defaults 0 2 /dev/sda2 none swap sw 0 0
Timezone amp Locale
ln -s /usr/share/zoneinfo/Region/City /etc/localtime echo LANG=en_US.UTF-8 >/etc/locale.conf
Network
echo hostname=cruxbox >/etc/rc.conf echo 127.0.0.1 localhost >>/etc/hosts echo 192.168.1.100 cruxbox.mydomain cruxbox >>/etc/hosts
Enable network services:
mkfifo /var/run/hostapd_ctrl mkfifo /var/run/wpa_supplicant
Step 11: Installing and Configuring a Bootloader
We’ll use GRUB2. First, install the grub package:
prt-get install -y grub
Then:
grub-install --target=i386-pc /dev/sda # BIOS # or for UEFI grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=crux grub-mkconfig -o /boot/grub/grub.cfg
Step 12: Installing Additional Software
Now that the bones are in place, flesh out your system with tools:
prt-get update prt-get install -y vim networkmanager sudo openssh
prt-get is CRUX’s package tool. For more, see Official pkgmgr wiki.
Step 13: Final Tweaks and Reboot
- Set the root password:
passwd. - Create a normal user:
useradd -m -G users,wheel -s /bin/bash usernameand thenpasswd username. - Enable sudo: uncomment %wheel ALL=(ALL) ALL in
/etc/sudoersusingvisudo.
Exit the chroot, unmount everything, and reboot:
exit umount -R /mnt reboot
If all went well, you should see the GRUB menu and boot into your spanking-new CRUX system. Time to log in and flex your muscles!
Conclusion
Congratulations, architect of your own digital destiny! You’ve wrestled with disks, tamed file systems, and conjured a lean, mean CRUX machine from raw source tarballs. Remember, CRUX rewards curiosity: explore its ports tree, adjust /etc/mk.conf for custom compile flags, and craft the perfect ~/.bashrc.
Your system is now as unique as you are—so go forth, install what you please, and don’t forget to have fun. And if anything breaks, well, that’s just another opportunity to learn. Happy hacking!
Leave a Reply