OS Installation
It is assumed from here on that /dev/sda is the drive on which IronForge will be installed.
OS disk preperation
Create a new partition table on a dedicated drive.
The partition table must be of gpt type.
cfdisk -f /dev/sda
Create one 1 GB partition (/dev/sda1) for /boot and one for the OS files. Use all available space for the OS.
The file type for the first partition should be EFI system and the second should be Linux filesystem.
Boot partition
Format the boot partition /dev/sda1
mkfs.fat -F32 /dev/sda1
OS file system
IronForge uses LUKS in case the machine is stolen or lost.
cryptsetup luksFormat -s 256 -c aes-xts-plain64 /dev/sda2
Mount the OS partition:
cryptsetup luksOpen /dev/sda2 os
Use any file system besides ext4. I recommend xfs.
mkfs.xfs /dev/mapper/os
Mount the OS partition
mount /dev/mapper/os /mnt
Setup the initial file system hierarchy:
mkdir -pv /mnt/{bin,boot,etc,lib64,mnt,opt,proc,root,run,sys,tmp,usr,var}
Install UEFI shell
If your PC does not support UEFI shell you can install it easily.
This makes life easier as it enables autoexec.bat like workflows.
Download shellx64.efi
from the UEFI Shell releases and save it in /boot/EFI/shellx64.efi.
We will later need to enable that as a boot option.
UEFI startup script
The UEFI shell will execute startup.nsh in the root of the boot partition.
Customize as you find it required. The initrd is required to setup mounts.
cat > /boot/startup.nsh <<EOF
MODE 80 25
\EFI\ironforge\bzImage root=/dev/vg/os initrd=/EFI/ironforge/initrd.img ro quiet net.ifnames=0 video=efib
EOF
NOTE: The Linux admin guide
claims
that the bzImage needs to be called bzImage.efi with an .efi suffix,
however I have not seen that this is a requirement on any UEFI installation I
have access to.
Linux kernel
Grab a old kernel .config and run make oldconfig or preconfigure a new
minimal config by running make defconfig.
Continue to customize anything you need for the machine with:
make menuconfig
Compile the kernel:
make -j$(nproc)
Install the kernel:
install -D -v -m755 ./arch/x86/boot/bzImage /boot/EFI/ironforge/bzImage
Install the kernel modules. We assume here that the root partition is mounted at /mnt:
make INSTALL_MOD_PATH=/mnt modules_install
Image
Choose a complete /usr and /opt pair from the downloads
page. Both files must have the same release ID. Verify their published SHA-256
values before installing them under the release directory and selecting the
pair through releases/current:
release=YYYYMMDDHHMM
install -d "/mnt/var/ironforge/releases/$release"
install -m 0644 usr.sqfs "/mnt/var/ironforge/releases/$release/usr.sqfs"
install -m 0644 opt.sqfs "/mnt/var/ironforge/releases/$release/opt.sqfs"
ln -s "$release" /mnt/var/ironforge/releases/current
ln -s releases/current/usr.sqfs /mnt/var/ironforge/usr.sqfs
ln -s releases/current/opt.sqfs /mnt/var/ironforge/opt.sqfs
Replace YYYYMMDDHHMM with the selected release ID. On an existing IronForge
system, forge repo pull performs the download, verification, installation,
and activation safely. See Release layout and updates for the
complete update and rollback workflow.