Archboot

From ArchWiki
Jump to navigation Jump to search

Archboot is an advanced, modular arch boot/install image creation utility to generate bootable media for CD/USB/PXE, designed for installation or rescue operation.

It only runs in RAM, without any special filesystems like squashfs, thus it is limited to the RAM which is installed in your system.

Archboot Image Releases

  • Hybrid image file and torrent is provided.
  • Please check sha256sum before using it.
Release Release Information Image Image PXE/Initramdisks PXE/Initramdiks Forum thread
latest Check Download Check Download Check Forum link
2021.09 Check Download Check Download Check Forum link

Burning Release

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'

PXE booting / Rescue system

  • vmlinuz_archboot_x86_64 + initramfs_archboot_x86_64.img
  • intel-ucode.img or amd-ucode.img
  • For PXE booting add the kernel and initrds to your tftp setup and you will get a running installation/rescue system.
  • For Rescue booting add an entry to your bootloader pointing to the kernel and initrds.

Supported boot modes

  • It supports BIOS booting with syslinux.
  • It supports UEFI/UEFI_CD booting with systemd-boot and EFISTUB.
  • It support UEFI_MIX_MODE booting with grub.
  • It supports Secure Boot with prebootloader.
  • It supports grub(2)'s iso loopback support.
variables used (below for example):
iso_loop_dev=PARTUUID=XXXX
iso_loop_path=/blah/archboot.iso
menuentry "Archboot" --class iso {
loopback loop (hdX,X)/<archboot.iso>
linux (loop)/boot/vmlinuz_x86_64 iso_loop_dev=/dev/sdXX iso_loop_path=/<archboot.iso>
initrd (loop)/boot/initramfs_x86_64.img
}
  • It supports booting using syslinux's memdisk (only in BIOS mode).
menuentry "Archboot Memdisk" {
   linux16 /memdisk iso
   initrd16 hd(X,X)/<archboot.iso>
}

How to do a remote installation with ssh?

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

Interactive setup features

  • Network installation mode
  • Changing keymap and consolefont
  • Changing time and date
  • Setup network with netctl
  • Preparing storage disk, like auto-prepare, partitioning, GUID (gpt) support, 4k sector drive support etc.
  • Creation of software raid/raid partitions, lvm2 devices and luks encrypted devices
  • Supports standard linux,raid/raid_partitions,dmraid/fakeraid,lvm2 and encrypted devices
  • Filesystem support: ext2/3/4, btrfs, f2fs, nilfs2, reiserfs,xfs,jfs,ntfs-3g,vfat
  • Name scheme support: PARTUUID, PARTLABEL, FSUUID, FSLABEL and KERNEL
  • Mount support of grub(2) loopback and memdisk installation media
  • hwdetect script is used for preconfiguration
  • Auto/Preconfiguration of fstab, kms mode, ssd, mkinitcpio.conf, systemd, crypttab and mdadm.conf
  • Configuration of basic system files
  • Setting root password
  • grub(2) (BIOS and UEFI), refind-efi, systemd-boot, syslinux (BIOS and UEFI) bootloader support

Keep your image up to date

Leave setup and run this script. This way you can always bump your image to latest available possibilities. To see all options run:

update-installer.sh

Update archboot scripts

  • Gets latest archboot scripts from git repository: setup, quickinst, km, tz and other helpers.
update-installer.sh -u

Update archboot environment and package cache

  • This will create a complete new environment with latest packages and relaunch it through kexec immediatly.
  • You get restarted in 5 minutes on a fast internet connection.
Update only archboot environment
  • Requirement: 3000 MB RAM
update-installer.sh -latest
Update environment and keep package cache for installation
  • Requirement: 4000 MB RAM
update-installer.sh -latest-install

Create new image release

  • Requirement: 4000 MB RAM
  • This will create a new image release with latest packages in /archboot directory.
update-installer.sh -latest-image

Tools for backup and copying of an existing system

Archboot provides 2 additional scripts for doing those tasks.

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

Restoring an USB device to its original 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 commands will render all data on <device> inaccessible:
archboot-restore-usbstick.sh <device>

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:
update-installer.sh -u
  • Package XYZ is missing in archboot environment.
Install missing package with:
pacman -Sy <package>
  • 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 or nouveau.modeset=0 on boot prompt.
  • 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!
  • grub2 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!
  • 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?
    • It supports UEFI mixed mode (32bit UEFI / 64bit running system) booting.
    • It provides an additional interactive setup and quickinst script.
    • It runs a modified Arch Linux system in initramfs.
    • It is restricted to RAM usage, everything which is not necessary like man or info pages etc. is not provided.
    • It does not mount anything during boot process.
    • It uses netctl for network setup.

Development: GIT repository

GIT repository can be found here.

Bugs

Arch Linux Bugtracker

Create image files

Installation

Install the archboot package.

Requirements

  • ~ 3GB free space on disk

Create image files without modifications

archboot-x86_64-release.sh

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

  • Run as root:
archboot-x86_64-release.sh <directory>
  • Finished you get the image and boot/ files in <directory>.

Create image files with modifications:

Explanation of the archboot image tools.

archboot-create-container.sh

This script will create an archboot container for image creation.

  • Run as root:
create-container.sh <directory>
  • You get an archboot container in directory.
  • To enter the container run as root:
systemd-nspawn -D <directory>

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 tarball creation run as root:
archboot-x86_64-iso.sh -t

This tarball contains kernel and initrds.

  • For iso creation run as root:
archboot-x86_64-iso.sh -g -T=<tarball>

This creates an iso image.

Config files for image creation:

There are 2 main config files for iso creation:

/etc/archboot/x86_64.conf

This config file contains the HOOKS, which are used for the initramdisk. Modify it to your needs.

/etc/archboot/presets/x86_64

The main config file for the image, defines which kernel and mkinitcpio.conf is used and bootloader options.

Testing image and files with qemu:

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

kernel and initramdisk testing

qemu-system-x86_64 -kernel <yourkernel> -initrd <yourinitramdisk> -append "cgroup_disable=memory" --enable-kvm -usb -usbdevice tablet

Image testing BIOS mode

qemu-system-x86_64 -cdrom <yourisofile> -usb -usbdevice tablet --enable-kvm -boot d --enable-kvm

Image testing UEFI mode (64bit UEFI / 64bit running system)

qemu-system-x86_64 -cdrom <yourisofile> -usb -usbdevice tablet --enable-kvm -boot d --bios /usr/share/edk2-ovmf/x64/OVMF.fd

Image testing UEFI mixed mode (32bit UEFI / 64bit running system)

qemu-system-x86_64 -cdrom <yourisofile> -usb -usbdevice tablet --enable-kvm -boot d --bios /usr/share/edk2-ovmf/ia32/OVMF.fd

Addtional qemu parameters

  • You can test how much RAM is needed to bootup, eg. -m 1024 for 1GB RAM usage.
-m <memory>
  • Virtio network for tap0:
-net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no
  • Virtio harddisk:
-drive file=<yourimagefile>,if=virtio,format=raw
  • normal harddisk:
-hda <yourimagefile>