
   Archboot Guide

   July, 3rd 2013

   Tobias Powalowski <tpowa@archlinux.org>

   Contributors (Parts from old Arch Linux Installation Guide):
   Dennis Herbrich <dennis@archlinux.org>
   Judd Vinet <judd@archlinux.org>

Table Of Contents

    1. Introduction
         1. What is Arch Linux?
         2. What is Archboot
         3. What is the difference to the archiso install media?
         4. What are the supported boot modes of Archboot media?
         5. What are the Archboot Setup features?
    2. Archboot bootparameters
         1. What are general boot parameters?
         2. What are the video and framebuffer options?
         3. What are other included features of the environment?
    3. Installing Arch Linux with Archboot
         1. What you will need?
         2. Acquiring Archboot images
         3. Preparing Installation Media
         4. Booting the Install Media
    4. Common Installation Procedure
         1. Running Setup
         2. Set Keyboard And Console Font
         3. Set up Network
         4. Set Time And Date
         5. Prepare Storage Drive
             1. Auto-Prepare
             2. Partition Storage Drives
             3. Create Software Raid, Lvm2 or Luks encryption
             4. Set Filesystem Mountpoints
         6. Select Source
         7. Select Packages
         8. Install Packages
         9. Configure System
         10. Install Bootloader
         11. Exit Install
    5. System Configuration
    6. Useful links

Introduction

  What is Arch Linux?

   https://www.archlinux.org

  What is Archboot?

   * Archboot is a set of scripts to generate bootable media for CD/USB/PXE.
   * It is 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.
   * Git repository: 
     https://projects.archlinux.org/?p=archboot.git;a=summary
   * It is developed by tpowa.
   
  What is the difference to the archiso install media?

   * It provides an additional interactive setup and quickinst script.
   * It contains [core] repository on media.
   * 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 doesn't mount anything during boot process.
   * It supports remote installation through ssh.

  What are the supported boot modes of Archboot media?
   * It supports BIOS booting with syslinux.
   * It supports UEFI booting with gummiboot and EFISTUB.
   * 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
   * It supports booting using syslinux's memdisk (only in BIOS mode).
     
  What are the Archboot Setup features?

   * Media and 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,lvm2
     and encrypted devices
   * Filesystem support: ext2/3/4,btrfs,nilfs2,f2fs,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
   * Package selection support
   * Signed package installation
   * hwdetect script is used for preconfiguration
   * Auto/Preconfiguration of framebuffer, uvesafb, kms mode, fstab,
     mkinitcpio.conf, systemd, crypttab and mdadm.conf
   * Configuration of basic system files
   * Setting root password
   * Bootloader support: grub(2) (BIOS and UEFI),
     refind-efi, gummiboot, syslinux (BIOS and UEFI)

Archboot bootparameters

  What are general boot parameters?

   * earlymodules
      - load modules before hooks are executed
      - Usage:
        earlymodules=<comma-separated-array>
        earlymodules=ahci,ehci-hcd

   * disablehooks
      - disable a hook which is run during bootup
      - Usage:
        disablehooks=<comma-separated-array>
        disablehooks=arch_floppy,arch_cdrom

   * root
      - Using this option will boot you into your specified existing system.
      - Usage:
        root=/dev/<your-root-of-installed-system>
        root=/dev/sda3

   * advanced
      - This will override advanced hooks running order for your system.
      - Default order is arch_mdadm,arch_lvm2,arch_encrypt
      - Advanced hooks are: arch_mdadm,arch_lvm2,arch_encrypt
      - Usage:
        advanced=hook1,hook2,hook3
        advanced=arch_encrypt,arch_mdadm

  What are the video and framebuffer options?

   * ati/radeon, intel and nvidia cards will switch to KMS mode during boot.

   * uvesafb
     - enables uvesafb mode during boot and activates setup routine 
       to use it later on installed system.
     - you need to specify your supported resolution eg.:
       uvesafb=<resolution>-<depth>
       uvesafb=1024x768-16

   * fbmodule
     - Loads the fb module you specify durin boot process 
       and activates setup routine to use it later on installed system.
     - Use it like this fbmodule=<yourmodule>, e.g. fbmodule=cirrusfb

Installing Arch Linux with Archboot 

  What you will need?

   * a working knowledge of Linux and your system, especially your
     hardware
   * Archboot installation media
   * an i686-based or x86-64 computer (PPro, Pentium 2 or higher,
     Athlon/Duron, etc. Note that AMD K6, Transmeta Crusoe, CyrixIII, and
     VIA-C3 are NOT supported.)
   * some time to kill

  Acquiring Archboot images

   You can download Archboot images from any Arch Linux mirror:
   eg. ftp://ftp.archlinux.org/iso/archboot/

  Preparing Installation Media

   * Hybrid image file is provided, which includes
     i686 and x86_64 core repository. Please check md5sum before using it.
   * 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.

  Booting the Install Media

   Reboot your computer with the Arch Linux Archboot CD in the drive.
   Make sure your BIOS is set in a way to allow booting from your CD-ROM or 
   USB device. Refer to your motherboard manual or your system manufacturer
   for details if you have no clue how to do that.
   Once the CD or USB is booted from, you will see a boot prompt waiting for 
   you pressing a key or wait 30 seconds, explaining what your options are at
   this point. Most users can just hit Enter.

   At the end of the boot procedure, you should be dropped into a root
   shell with a handful of instructions filling the upper half of your
   screen. At this point you are ready to commence the actual
   installation, or do any manual preparation you consider necessary.

Common Installation Procedure

  Running Setup

   On first login /arch/setup is launched automatically. After an
   informational message you will be prompted to the main menu.
   
   When navigating the setup script, make sure that you select DONE from
   the submenus after performing each step. This saves any settings you
   make in preparation for the next step. Further, avoid arbitrary steps
   through the installation process as this can also confuse the
   installer.

   At any point in the install process, you can switch to your 7th
   virtual console (ALT-F7) to view the output from the commands the
   setup is running. Use (ALT-F1) to get back to your first console where
   the installer is running, and any F-key in between if you need to open
   another console to intervene manually for any reason.

  Set Keyboard And Console Font

   Use this menu to change your keyboard to your desired keymap 
   and console font.

  Set up Network

   Use this menu to configure your network.

  Set Time And Date
 
   Use this menu to change time and date of your running system.

  Prepare Storage Drive

   Prepare Storage Drive will lead you into a submenu offering two
   alternatives of preparing your target drive for installation.

   The first choice is Auto-Prepare, which will automatically partition
   your storage drive into a /boot, swap, and root partition, and then
   create filesystems on all three. These partitions will also be
   automatically mounted in the proper place. To be exact, this option
   will create:
     * a /boot ext2 partition
     * a swap partition
     * a root partition 
     * a /home partition with the remaining space

   AUTO-PREPARE WILL ERASE ALL DATA ON THE CHOSEN STORAGE DRIVE!
   Read the warning presented by the installer very carefully, and make
   sure the correct device is about to be partitioned!

   You will be asked if you want to use GUID (gpt) partition table.
   If you have no clue for what you will need it or plan to use grub(2),
   it's save to answer no.

   You will be asked if you want to use UUID for device name scheme.
   It is recommended to use UUID, in order to avoid name collisions or
   name switching of devices.

   If you prefer to do the partitioning manually, use the other two
   options, Partition Storage Drives and Set Filesystem Mountpoints to
   prepare the target media according to your specifications as outlined
   below. Then Return to Main Menu after a successful preparation.

  Partition Storage Drives

   You will be asked if you want to use GUID (gpt) partition table.
   If you have no clue for what you will need it or plan to use grub(2),
   it's save to answer no.

   You should select the disk(s) you want to partition, and
   you'll be dropped into the parted program where you can freely modify
   the partitioning information.

   You will need at least a root partition to continue the installation,
   and it's helpful to note somewhere which partition you're going to
   mount where, as you'll be asked exactly that in the next step.

  Create Software Raid, Lvm2 or Luks encryption

   Use this menu for the mentioned above special devices. 
   Help is provided in each submenu.

  Set Filesystem Mountpoints

   You should select this choice once the partition information is edited 
   to your liking with the previous menu selection, or already existent through
   whatever other means.

   You will be asked if you want to use UUID for device name scheme.
   It is recommended to use UUID, in order to avoid name collisions or
   name switching of devices.

   The first question to answer is what partition to use as swap. Select
   the previously created swap partition from the list, or NONE, if you
   don't want to use a swap partition. Using a swap file is not directly
   supported by the installer; Instead choose NONE here, finish the
   mountpoint associations, and activate a swap file on your desired,
   formatted partition with the swapon command.

   After setting up the swap partition, you'll be asked to specify the
   partition to be used as the root partition. This is mandatory.

   The association process is then repeated until you choose DONE from
   the list, ideally after all listed partitions have been associated
   with their intended mountpoints. The installer will suggest /boot for
   all following mountpoints after choosing swap and root.

   Every time you specify a partition to mount, you will be asked if you
   want to create a filesystem on the respective partition. If you select
   YES, you will be asked what filesystem to create (a matter of taste,
   really. Choose ext4 if you have no clue), and the partition will be
   formatted with the chosen filesystem, destroying all data in the
   process. It should be no problem, however, to say NO at this point to
   preserve any existing files on the partition.

   If you want to preserve existing data on a partition, you are strongly
   advised to create backups instead of hoping that nothing will go wrong
   during the install. Don't say I didn't warn you!

   You will be asked whether to create a filesystem on your swap
   partition, and since this partition uses a specific filesystem of it's
   own, you should always answer YES here.

   If you want to mount any other partitions, for example a separate
   /boot or /home partition, you will be able to do so. Simply
     * select a partition to mount
     * choose a filesystem (if you want to create one instead of keeping
       the data)
     * enter a unique mountpoint for the partition

   Repeat these steps until you're satisfied, then select DONE to create
   any filesystems and mount the partitions in their respective places.
   Before the actual formatting is done, the installer will present a list
   of all of your choices for review. After formatting and mounting all
   partitions, you may return to the Main Menu and proceed with the next step.

  Select Source

   If you have a fast Internet connection, you might  prefer the FTP/HTTP
   installation to ensure you get the latest packages, instead of using the
   potentially outdated media contents. Please note that you will probably
   run into trouble if you have a complex proxy setup with authentication
   when using the FTP/HTTP installation. If you  can't use a CD-ROM, USB device
   or any other medium you could mount at this stage, this is the only viable
   method of installing Arch Linux.

  Choose Mirror (FTP/HTTP method)

   You need to select a mirror for installing the packages, else the FTP/HTTP 
   installation will not work.

  Select Packages

   Select Packages will let you select the packages you wish to install
   from the media or your FTP/HTTP mirror.

   Whatever source you chose, after fetching the package list you'll be
   dropped into the package category selection screen.

   If you are presented an error while fetching the package database, you
   should either choose another mirror, make sure your network is
   working at all, and you didn't slip any typos into your custom server
   address. You might also have goofed mounting of your source media in
   the /src directory, if you chose that option. Read the messages
   presented to you carefully, in most cases all you need is a little
   tweaking of the directory layout on your source media or server,
   respectively.

   Now, once that is tackled, you have the opportunity to specify whole
   package groups from which you'd generally like to install packages,
   then fine-tune your coarse selection by (de)selecting individual
   packages from the groups you have chosen.

   Any packages in the BASE category should stay selected under all
   circumstances, and you should select any other group which contains a
   package you might need. Please note that the upcoming individual
   package selection screen will only offer packages which are in the
   categories you select here, so if you only select BASE, you won't be
   able to add any other packages than those in the BASE category.

   If you want to only select the bare minimum for installation, but be
   able to browse through all available packages nevertheless to see if
   anything interesting is there to add, you should select all package
   categories, but choose to NOT select all packages by default.

   The "Select all packages by default?" question can be easily
   misunderstood; Basically you are asked whether you want all the
   packages in the categories you just chose to be selected or not.
   If you select YES, the whole list of packages contained in the chosen
   categories will be displayed and selected, and your job will be to
   deselect what you do not want.
   If you select NO, the same list of packages will displayed, but only
   packages of the BASE category will be selected, and you'll have to
   explicitly select any other packages you want to install.

   Choosing NO helps to install a lean system!

   It is recommended that you install all the BASE packages, but not
   anything else at this point. Don't worry about getting all the
   packages you want - you can easily install more of them once the basic
   system boots by itself. The only exception to this rule is installing
   any packages you need for setting up Internet connectivity. These
   packages usually are:

   dhcpcd or dhclient
          Add if your machine is a DHCP client.

   isdn4k-utils
          Add if you use ISDN for dialup.

   ppp
          Add if you use an analog modem for dialup.

   rp-pppoe
          Add if you use DSL for pseudo-dialup.

   Once you're done selecting the packages you need, leave the selection
   screen and continue to the next step, Install Packages.

  Install Packages

   Install Packages will now install pacman and any other packages you
   selected with resolved dependencies onto your storage disk. Don't be
   surprised if more packages are installed than you selected! Those
   packages are dependencies for your selection, and the installer will
   not explicitly ask for permission to install these extra packages, as
   it assumes you know what you're doing.

   Error messages and debugging output is echoed as usual to terminal
   five (ALT-F7). During normal, successful operation, you shouldn't find
   much to read there, though. After the packages have been installed,
   proceed to the next step, Configure System.

   The media includes the latest kernel at the time the image was made.
   If you are using the FTP/HTTP Installation method, the kernel about to be
   installed will be the current version waiting on your FTP/HTTP source,
   and might therefore introduce changes and/or incompatibilities unknown
   at the present time. This is unlikely, but keep this in mind.

  Configure System

   Configure System allows you to edit the configuration files crucial
   for your newly installed system. Initially you will be asked whether
   to allow the hwdetect script to try and detect your hardware, and
   produce some (even more) sensible defaults for your configuration
   files. Unless you're having problems/crashes, you should let it have
   it's way, and work from what it generates.

   After this automatic preconfiguration you'll be asked for your
   favorite editor to use for manually fine-tuning the generated
   configuration files, either VIM or nano. When in doubt, choose nano.

   If you're in a real hurry, you may skip the following step of
   reviewing the configuration entirely and hope the defaults will work
   for you, but it's strongly recommended to iterate through the list of
   configuration files presented here and review the settings carefully.

  Install Bootloader

   Choose the bootloader you want to use, if you are unsure which one to use
   choose grub(2) bootloader.

  Exit Install

   Remove the media from your computer, type reboot at the
   command line and cross your fingers!

   Congratulations! Now you can proceed to getting into the nitty-gritty of
   configuring the interesting parts of your system, and adapt it to your
   needs!

System Configuration

   If you need help configuring a specific service, please read the 
   appropriate manpage or refer to any online documentation you need. 
   In many cases, the Archlinux Wiki and forums are a rich source for
   help as well.

   Arch Linux does not use any abstraction layers to administrate your
   system. As a result, you can usually stick to any instructions
   published by the author of a software, or whatever you find in a
   search engine of your choice, and it'll work out without confusing
   your system, because your system just does not care.

Useful links

  Archboot resourses
   Developer:        Tobias Powalowski <tpowa@archlinux.org>
   Latest version:   https://downloads.archlinux.de/iso/archboot/latest
   Development tree: https://projects.archlinux.org/archboot.git/

  Arch Linux resources
   Homepage:   https://www.archlinux.org
   Wiki:       https://wiki.archlinux.org
   Forum:      https://bbs.archlinux.org
   Bugtracker: https://bugs.archlinux.org
   AUR:        https://aur.archlinux.org
   Subversion: https://www.archlinux.org/svn

vim: ft=text autoindent tabstop=4 shiftwidth=4 expandtab
