Introduction to Source Mage GNU/Linux
Welcome, intrepid voyager of the free-software cosmos, to the sprawling universe of
Source Mage GNU/Linux (often affectionately called Sorcery).
If you relish the idea of building your system package-by-package from source code,
tweaking every compiler flag and library dependency to perfection (or until your coffee
goes cold), then you’ve come to the right place. In this gargantuan guide, we’ll walk
through installing Source Mage step by step—no wizards required, just you, your CPU and
a healthy dose of patience.
Why Choose Source Mage?
- Pure source-based: You compile everything from source, giving ultimate control.
- Minimalism: By default youll have only what you need—nothing more.
- Granular optimization: Set CFLAGS, CXXFLAGS and LDFLAGS to bewilder your neighbors.
- Community-driven: The friendly folks at Source Mage are always around to help.
Prerequisites
Before you begin, ensure you have the following:
| Item | Recommendation | Why? |
|---|---|---|
| Architecture | x86_64 (64-bit) | Most modern machines allows big binaries and more RAM usage. |
| RAM | 2 GB or more | Compilation can be memory-intensive, especially for large packages. |
| Disk space | At least 20 GB | Source and build directories can balloon quickly. |
| Internet | Stable, high-speed | Downloading sources on-the-fly requires a decent connection. |
| Time | Variable (hours to days) | Compiling everything is rewarding, but its a marathon, not a sprint. |
Step 1: Obtain the Source Mage ISO
Head over to the official mirror list at
https://wiki.sourcemage.org/en/Source_Mage_ISO
and grab the latest ISO. Verify the checksum with sha256sum to avoid mysterious “invalid magic” errors.
- Download ISO:
wget http://mirror.example.com/sourcemage/sourcemage.iso. - Verify:
sha256sum sourcemage.isoand compare with the published value. - Burn to USB:
dd if=sourcemage.iso of=/dev/sdX bs=4M status=progress.
Step 2: Boot into the Live Environment
Insert the USB, reboot, and select the USB drive in your BIOS/UEFI boot menu. You’ll land in
a minimal live environment with a text-based console (no flashy graphics, sorry).
Make sure you have network connectivity:
# ping -c 3 sourcemage.org
If you get replies, you’re golden!
Step 3: Partitioning Your Disk
Here’s a typical partition scheme:
| Partition | Mountpoint | Size | Filesystem |
|---|---|---|---|
| /dev/sda1 | /boot | 512 MB | ext2 |
| /dev/sda2 | swap | 4 GB | swap |
| /dev/sda3 | / | rest of disk | ext4 (or your favorite) |
fdisk /dev/sda(orpartedif you prefer).- Format:
mkfs.ext2 /dev/sda1mkswap /dev/sda2 swapon /dev/sda2mkfs.ext4 /dev/sda3
- Mount:
mount /dev/sda3 /mntmkdir /mnt/boot mount /dev/sda1 /mnt/boot
Step 4: Bootstrapping the Base System
Sorcery uses a single script called bootstrap. It sets up the chroot environment
and installs the bare essentials.
- Download bootstrap:
wget http://mirror.example.com/sourcemage/bootstrap.sh - Make executable:
chmod x bootstrap.sh - Run it:
./bootstrap.sh /mnt
This process will fetch, compile and install dozens of packages: from gcc to
glibc—the whole shebang. Grab another coffee or three.
Step 5: Chroot into Your New System
Once bootstrap completes:
mount --bind /dev /mnt/devmount --bind /proc /mnt/procmount --bind /sys /mnt/syschroot /mnt /bin/bash
You’re now living inside your future Source Mage install.
Step 6: Configuring Source Mage (mage)
The mage tool is Source Mage’s package manager. First things first: update your mage
repository metadata.
# mage sync
Next, configure your build options in /etc/mage.conf. Set your preferred CFLAGS,
CC, and MAKEOPTS (number of parallel jobs). A sensible example:
CFLAGS=-O2 -march=native
MAKEOPTS=-j4
CC=gcc
Now, install your kernel and essential tools:
mage install world— this builds everything in the “world” set, including the kernel source.mage install grub— to install GRUB bootloader.
Note: This may take several hours. Resist the urge to dismantle your laptop.
Step 7: Kernel Compilation Installation
- Go to kernel source:
cd /usr/src/linux. - Config:
make menuconfig(ornconfig,xconfig). - Compile:
make(dual-core?make -j2). - Install modules:
make modules_install. - Install kernel:
cp arch/x86/boot/bzImage /boot/vmlinuz-.
Be sure to update /boot/grub/grub.cfg or rerun grub-mkconfig.
Step 8: Bootloader Setup
With GRUB installed, configure it as follows:
- Edit
/etc/default/grubfor default timeout and kernel parameters. - Regenerate config:
grub-mkconfig -o /boot/grub/grub.cfg. - Install to MBR/EFI:
grub-install /dev/sda(or appropriate--target=x86_64-efifor UEFI).
Success means you’ll see GRUB’s menu at reboot.
Step 9: First Boot Post-Install Tasks
- Exit chroot:
exit, then unmount/mnt/dev,/mnt/proc,/mnt/sys, and/mnt. - Reboot:
reboot. - Log in as
root. Don’t forget topasswdto secure your account. - Create a regular user:
useradd -m -G wheel yourname passwd yourname.
Grant sudo by uncommenting %wheel in/etc/sudoers(visudo).
Handy mage Commands Tips
mage status— see outdated packages in your world.mage update— sync and upgrade everything (like a champ).mage clean— remove old build files, reclaim disk space.mage info packagename— details on any sorcery package.mage slot list— if you need multiple versions of a library.
Remember: always mage sync mage update regularly, lest your system turns into a haunted crypt of bitrot.
Wrapping Up
Congratulations, you’ve wrestled with compilers, tamed your kernel and harnessed the arcane powers
of Source Mage GNU/Linux! While the journey is longer than a commercial distro install,
the rewards are deep knowledge, unstoppable customizability, and the smug satisfaction of true DIY
computing. Should you need more guidance, consult the official Wiki at
https://wiki.sourcemage.org or join the IRC channel
#sorcery on Libera.Chat.
Now go forth, mix up your CFLAGS, tweak your world file, and may your builds finish
without mittens or tantrums. Happy compiling!
Leave a Reply