Archboot

Archboot is a most advanced, modular Arch Linux boot/install image creation utility to generate reproducible bootable media for CD/USB/PXE, designed for installation or rescue operation. It is fully based on mkinitcpio, only runs in RAM and without any special filesystems like squashfs/erofs.
The project is developed by tpowa.

Archboot Image Releases

Download image files

x86_64 architecture

Release informationISO imagesSHA256SUMForum thread
LatestDownloadCheckForum link

aarch64 architecture

Release informationISO imagesSHA256SUMForum thread
LatestDownloadCheckForum link

Features of the images

TypeRAM to bootSecure Boot
support
WIFI
support
LAN
support
Rescue
operation
Package cache
for installation
ServerWorkstationLaptopSize
X86_64
Size
AARCH64
<date>-latest2500 MByesnoDHCP server neededyesyesyesyesno117 MB204 MB
<date>1300 MByesyesyesyesnoyesyesyes454 MB424 MB
<date>-local2500 MByesyesyesyesyesyesyesyes741 MB546 MB
  • If you have a fast internet connection with LAN connection and you have a running DHCP server, go for the "latest" image.
  • If you will not have an internet connection for installation, you should use the "local" image. It includes a local package repository for installation.

PXE booting / Rescue system

DownloadX86_64AARCH64
Kernelvmlinuz_archboot_x86_64vmlinuz_archboot_aarch64
Initrdinitramfs_x86_64.img
initramfs_x86_64-latest.img
initramfs_x86_64-local.img
initramfs_aarch64.img
initramfs_aarch64-latest.img
initramfs_aarch64-local.img
Microcodeintel-ucode.img
amd-ucode.img
amd-ucode.img
  • For PXE booting add the kernel,initrds and microcode to your TFTP setup, add rootfstype=ramfs to your kernel cmdline and you will get a running installation/rescue system.
  • For Rescue booting add an entry to your bootloader pointing to the kernel, initrds, microcode and add rootfstype=ramfs to your kernel cmdline.

Supported boot modes

Boot ModeX86_64AARCH64
MBR BIOS with GRUByesno
UEFI/UEFI_CD booting with GRUByesyes
UEFI_MIX_MODE booting with GRUByesno
Secure Boot with
included fedora signed shim
yesyes
  • It supports GRUB's iso loopback support.
variables used (below for example):
iso_loop_dev=PARTUUID=12345678-1234-1234-1234-123456789ABC
iso_loop_path=/dirname/<basename of archboot.iso>

With GPT, the PARTUUID can be obtained from the line of the command output.

Burning release or writing to disk

Hybrid image file is a standard CD-burnable image and also a raw disk image.

  • Can be burned to CD(RW) media using most CD Burning utilities.
  • Can be raw-written to a drive using 'dd' or similar utilities. This method is intended for use with USB thumb drives.
'dd if=<imagefile> of=/dev/<yourdevice> bs=1M'

Secure Boot support with shim package signed from fedora

  • Caveat:
    • This method is intended to use for dual booting with Windows, without losing the Secure Boot benefits for Windows.
    • This method will not make your system more secure.
    • It installs a bootloader which is not controlled by Arch Linux and breaks the concept of Secure Boot as is.
  • Please read this guide first for initial shim setup.
  • In order to boot in Secure Boot mode on first boot:
    • you need to add the hash of /EFI/BOOT/grubx64.efi to the MOK
    • you need to add the hash of /EFI/BOOT/vmlinuz_x86_64 to the MOK
  • Tools included for key management: KeyTool, HashTool, mokutil, sbsigntools, sbctl and mkkeys.sh
  • setup script supports the following Secure Boot layout:
    • shim from fedora is copied
    • creating new keys is supported
    • using existing keys from /etc/secureboot/keys in layout secureboot-keys.sh produces
    • MOK setup is done with keys
    • adding pacman hook for automatic signing
    • On first reboot you need to enroll the used keys to the MOK then your installed system is dual boot ready.
  • It has a support script for creating your own keys and backup the existing keys, which already include the 2 needed Microsoft certificates:

How to do a remote installation with OpenSSH?

  • During boot all network interfaces will try to obtain an IP address through dhcpcd.
  • root password is not set by default! If you need privacy during installation set a password.
'ssh root@<yourip>'

Interactive setup

You can run each point for doing the mentioned task. If you do a fresh install, it is recommended to run each point in the order as presented.

Changing keymap and console fonts

Setup network

Select Source

  • Local mode:
    • Local package database is autodetected
  • Online mode:
    • Latest pacman mirrors will be synced and you have to select your favourite mirror.
    • You will be asked if you want to activate the testing repository.
    • You can decide to load the latest archboot environment and cache packages for installation.

Changing timezone and date

Prepare Storage drive

Install Packages

  • You can modify the packages to install in /etc/archboot/defaults.
  • Pacman will install the packages for the first boot to your storage drive.

Configure System

Install Bootloader

For experts: quickinst installation

  • This script is for experts, who assemble the filesystems first and mount them in a directory.
  • quickinst will autodetect the packages to install for a minimal system.

Keep your image up to date

  • You can always bump your image to latest available possibilities.

Tools for backup and copying of an existing system

Archboot provides 2 additional scripts for doing those tasks.

  • internal backup / copying you can use:
  • internal or external backup / copying with rsync you can use:
rsync-backup.sh

Restoring an USB device to FAT32 state

  • When you have used the .iso image to create an USB installer, your USB stick is no longer useful for anything else.
  • Any remaining space on the stick (supposing you used a larger-than the .img file) is inaccessible.
  • Fortunately, it is easy to re-create a FAT32 partition on the stick so that the USB stick again becomes available for carrying around your data.
  • Take care about which device actually is your USB stick. The next command will render all data on <device> inaccessible:

FAQ, Known Issues and limitations

  • Please check the forum threads for posted fixes and workarounds.
  • Please run this script to get latest fixes from git:
  • Package XYZ is missing in archboot environment.
Install missing package with:
  • Why screen stays blank or other weird screen issues happen?
Some hardware does not like the KMS activation, use radeon.modeset=0, i915.modeset=0, amdgpu.modeset=0 or nouveau.modeset=0 on boot prompt.
  • Your system hangs during the boot process?
Any combinations of the boot options: "noapic nolapic acpi=off pci=routeirq nosmp nomsi" may be useful.
  • Why is archinstall not included in default environment?
Reason: It needs python3 which is a huge depend.
Fix: If you need archinstall run: pacman -Sy python3 archinstall
  • dmraid/fakeraid might be broken on some boards, support is not perfect here.
The reason is there are so many different hardware components out there. At the moment 1.0.0rc16 is included, with latest fedora patchset, development has been stopped.
mdadm supports some isw and ddf fakeraid chipsets, but assembling during boot is deactivated in /etc/mdadm.conf!
  • GRUB cannot detect correct bios boot order:
It may happen that hd(x,x) entries are not correct, thus first reboot may not work.
Reason: grub cannot detect bios boot order.
Fix: Either change bios boot order or change menu.lst to correct entries after successful boot. This cannot be fixed it is a restriction in grub2!
It may happen that UEFI boot entries are not correct, thus first reboot may not work eg. Ovmf UEFI is affected by this.
Reason: The UEFI implementation does not support how setup created the efibootmgr entries.
Fix: Add manual entries and delete wrong entries from your UEFI implementation.
  • Redisplay the Welcome to Arch Linux message:
Reason: The Welcome to Arch Linux (archboot environment) message is displayed once, before the user takes any action.
Fix: Switch to a virtual console [ALT+ F(1-6)] you have not used so far or run from within a shell prompt.
  • How much RAM is needed to boot?
It's an initramdisk which includes everything. Calculated size to boot the image:
initramdisk+kernelimage+unpackedinitramdisk=minimum RAM to boot
  • What is the difference to the archiso install image?
Featurearchbootarchiso
Developerstpowaarch-releng team
UEFI mixed mode
(32bit UEFI / 64bit system)
yesplanned
archinstallnoyes
setup/quickinst scriptyesno
Secure Boot
with fedora signed shim
yesno
Initramfs onlyyesno
Man/Info pagesnoyes
Localizationenglish onlyyes
accessibility supportnoyes
netctl supportyesno
Mobile broadband modem
management service (modemmanager)
noyes
Text browserelinkslynx
IRC clientweechatirssi
IRC and text browser preconfiguredyesno
Internal update featureyesno
Offline installation supportyesno
Image size<140-742MB>864MB
RAM to boot>1.3GB<1.3GB
Bootup speed2s slower2s faster
Build speedfasterslower
Image assemblinggrub-mkrescuexorriso
Image bootloadergrubsystemd-boot and syslinux
Reproducibilityyesno
Easy custom live CD creationnoyes

Take a look at the archboot screenhot gallery.

Development: GIT repository

GIT repository can be found at Arch Linux Gitlab or Github .

Bugs

Arch Linux Bugtracker

Create rescue system of running system

  • Create the initrd with your chosen profile:
  • Add your used kernel and initrd to your bootloader.

Create image files

Installation

  • Install the package on x86_64 hardware.
  • Install the package on aarch64 hardware.
  • If you want to build aarch64 images replace x86_64 with aarch64 in the commands and files below.
  • You can build aarch64 images on x86_64 hardware. The qemu helper needs to be installed archboot-qemu-aarch64 package.

Requirements

  • ~ 3GB free space on disk

Building a new release

This script creates every installation media with latest available core/extra packages and boot/ directory with kernel and initrds.

  • Run as root:
  • Finished you get the images and boot/ files in <directory>.

Rebuilding a release (reproducibility)

  • Run as root:
  • Finished you get the rebuild image and boot/ files in <directory>.

Create image files with modifications:

Explanation of the archboot image tools.

archboot-x86_64-create-container.sh

This script will create an archboot container for image creation.

  • Run as root:
  • You get an archboot container in directory.
  • To enter the container run as root:

Modify your container to your needs. Then run archboot-x86_64-iso.sh for image creation in container.

archboot-x86_64-iso.sh

  • Script for image creation from running system or for use in archboot container.
  • For normal image creation run as root:
  • Latest image: add -p=x86_64-latest to command above.
  • Local image: add -p=x86_64-local to command above.

Configuration files for image creation:

There are the following configuration files for ISO creation:

  • The default configuration file for packages, bootloader config and server setup.
/etc/archboot/defaults
  • The preset configuration files for the images, defines which kernel and mkinitcpio.conf is used.
  • These main configuration files contain the HOOKS, which are used for the initramdisks.

Setting up an archboot image server

Configuration file

/etc/archboot/defaults
  • You need to configure all your settings in the configuration file.

Requirements

  • You have a normal user, which has access to a working gpg setup with own signature.
  • You have a normal user with ssh access to the server, on which the images should upload.
  • Add the directories on the remote server, you want to upload to.

x86_64 architecture

  • Simple run:

aarch64 architecture

  • You have to skip the tarball creation step, on aarch64 hardware.
  • Install the archboot-qemu-aarch64 package, for building on x86_64 hardware.
  • On first time setup you need to create the pacman-aarch64-chroot tarball on x86_64 hardware.
archboot-pacman-aarch64-chroot.sh <build-directory>
  • Afterwards you only have to run for each release:

Server cleanup

  • The /etc/archboot/defaults file sets purging of old images after 3 months.

Testing image and files with QEMU

You can run QEMU tests at different stages of ISO creation:

UEFI GPT Secure Boot

  • Copy OVMF_VARS.secboot.fd to a place the user has access to it.
  • The file already includes a basic set of keys from fedora ovmf package.
  • Replace the bios option, with the following additional commands:

Addtional qemu parameters

  • You can test how much RAM is needed to bootup, eg. -m 1024 for 1GB RAM usage.
-m <memory>
  • KVM virtio network for tap0:
  • KVM virtio harddisk:
  • normal harddisk:
  • virtio graphic card
  • serial console only
-vga none

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.