Installation Guide

From ParabolaWiki
(Redirected from Install)
Jump to: navigation, search

This guide assumes that the reader is familiar with the command line shell, and how to launch a terminal, if necessary. For a more user-friendly, mouse-centric install method, consider using the graphical installer on one of the LXDE LiveISOs.

This install method can be done using any Parabola LiveISO. It is not important which one. You do not need an "OpenRC" ISO in order to install an OpenRC system, or an "LXDE" ISO in order to install an LXDE system, for examples. The selection of specific ISO variants may vary from time to time; because those variations are not fundamental. For the purpose of installation, all Parabola LiveISOs are all equivalent.

Note: The install procedure diverges at several points, depending on the init-system that you choose (eg: SystemD, OpenRC). Throughout this guide, pay special attention to sections which distinguish between init-systems. If you have no preference, SystemD is the recommended option.
Note: "Why SystemD?" (you may ask). The suggestion is not related to any ethical or technical concerns. All init-systems have the same essential functionality; and all of Parabola's init-systems are fully-libre. SystemD happens to be the one that nearly every other distro uses; and is the best documented. Therefore, it is the easiest one about which to learn and find help. If you are interested to learn how to control your operating system more effectively, which Parabola greatly encourages, it is wise to learn SystemD first, then perhaps to decide if another would suit you better. Parabola allows you to change the init-system at any time. That is the essence of Init-Freedom!


1 Download

Download a Parabola GNU/Linux-libre ISO from the download page. These are provided with your choice of systemd or OpenRC as the default init system.

  • The 'dual' ISOs can be booted into either an i686 or x86_64 live system. The 'net-install' ISOs will boot into a live system but will require an active connection to the internet for installation. The 'complete' ISOs will boot into a live system as well, but are capable of installing a full Parabola system with or without a connection to the internet.
  • ISO images are signed and it is highly recommend to verify their signature before use. On Parabola GNU/Linux-libre, this can be done by using pacman-key -v <iso-file>.sig. On other systems: gpg --verify <iso-file>.sig. You may have to import the key from a keyserver with gpg --recv-keys <0x key ID>.
  • The ISO image can be burned onto a CD, written onto a USB memory stick, booted directly by a virtual machine, or booted directly from GRUB. It is intended for new installations only or to be used as a recovery system; an existing Parabola GNU/Linux-libre system can always be updated with pacman -Syu.
  • Checksums are provided for each edition in the accompanying SHA512SUMS and WHIRLPOOLSUMS files. They can be verified with: sha512sum -c SHA512SUMS and whirlpool-hash -c WHIRLPOOLSUMS.

2 Blind and visually impaired users

There is a ISO called TalkingParabola that is a derivative install CD based on TalkingArch and a respin of the Parabola ISO modified to include speech and braille output.

3 Creating the install media

3.1 Writing a Parabola ISO image to a CD/DVD

The Parabola Live ISOs can be burned to a CD or DVD most simply using a graphical tool such as 'brasero', 'k3b', or 'xfburn'. The 'cdrecord' utility can be used to burn a CD or DVD from the comand line.

3.2 Writing a Parabola ISO image to a USB drive

Warning: The following command will erase everything that is currently on the USB drive.
# dd if=[iso file] of=[usb device file] bs=1M && sync

[iso file] is the path to the ISO image file.

[usb device file] is the path to the USB device file. dmesg or lsblk --fs can be used to learn this path. It is often similar to device filenames of storage devices like hard drives and SSDs, e.g. /dev/sdb

Warning: It is very important to use the correct value for [usb device file] to avoid overwriting other storage devices.

4 Installation

4.1 Keyboard layout

For many countries and keyboard types appropriate keymaps are available already, and a command like loadkeys uk might do what you want. More available keymap files can be found in /usr/share/kbd/keymaps/ (you can omit the keymap path and file extension when using loadkeys).

4.1.1 Braille Support

TalkingParabola includes brltty, for those who own braille displays. The brltty package available on the TalkingParabola CD was compiled with as few dependencies as possible. If you wish to use braille, you will need to supply the brltty parameter at the boot prompt. Alternatively, you can start brltty from the shell, after the system has booted.

The brltty boot-time parameter consists of three comma-separated fields: driver, device, and table. The first is the driver for your display, the second is the name of the device file, and the third is a relative path to a translation table. You can use "auto" to specify that the driver should be automatically detected. You can read the brltty documentation for a fuller explanation of the program.

For example, suppose that you have a device connected to /dev/ttyS0, the first serial port. You wish to use the US English text table, and the driver should be automatically detected. Here is what you should type at the boot prompt:

arch32 brltty=auto,ttyS0,en_US

Once brltty is running, you may wish to disable speech. You can do so via the PrintScreen key, also known as SysRq. On my QWERTY keyboard, that key is located directly above the Insert key, between F12 and ScrollLock.


4.2 Partition disks

The choice of partitioning tools and layouts is a matter of preference, and beyond the scope of this install guide. See the partitioning guide for details and suggestions.

Remember to create any stacked block devices like LVM, LUKS, or RAID, if you choose to use those advanced partitioning technologies. You will also need to generate an initramfs and configure your bootloader properly to use it. Be aware that these all add complexity to your system, and therefore the potential for problems. Per the KISS principle, most people should not bother with them; but rather prefer a simple schema (eg: a MBR partition table, a single partition per OS).

4.3 Format the partitions

The choice of filesystems is a matter of preference, and beyond the scope of this install guide. See the filesystems guide for details and suggestions.

If you are using (U)EFI you will most probably need another partition to host the UEFI System partition. Read Create an UEFI System Partition in GNU/Linux.

4.4 Mount the partitions

Note: In the commands below, replace each /dev/<DEV_PART_N> with the device+partition paths of the corresponding partitions (eg: /dev/mmcblk0p2 for the second partition of a 'native' SD reader, /dev/sdb2 for the second partition of a 'usb mass storage' device). As with the previous partitioning/formatting steps, you will want to be extremely mindful of correctness.

Next, you must mount the target partitions. This guide uses /mnt as the mount-point of the root ('/') filesystem.

# mount /dev/<DEV_PART_2> /mnt         # root ('/') filesystem (eg: /dev/mmcblk0p2)

You should also create directories as mount-points for, and mount onto them, any optional partitions which you created in the "Partition disks" and "Format the partitions" sections (eg: /mnt/boot, /mnt/home, ...). The /home and swap partitions are not essential in this step; but if you created them, and you want them to be auto-mounted when the new system boots, you should mount them now also. eg:

# mkdir /mnt/boot
# mount /dev/<DEV_PART_1> /mnt/boot    # boot ('/boot') filesystem (eg: /dev/mmcblk0p1)
# mkdir /mnt/home
# mount /dev/<DEV_PART_3> /mnt/home    # boot ('/home') filesystem (eg: /dev/mmcblk0p3)
# swapon /dev/<DEV_PART_4>             # swap filesystem (eg: /dev/mmcblk0p4)

4.5 Connect to the Internet

A DHCP service is already enabled for all available devices. If you need to setup a static IP or use management tools such as Netcfg, you should stop this service first: systemctl stop dhcpcd.service. For more information read Network configuration.

4.5.1 Wireless

Run wifi-menu to set up your wireless network. For details, see Wireless Setup and Netcfg. Note that this program is part of netctl, so OpenRC ISOs come with networkmanager instead. To perform the same task, simply run nmtui connect.


4.6 Verification of package signatures

Warning: Check that the system clock is correct at this point, otherwise GPG key files' timestamps will be in the future and key-rings installation won't work

Because packager's signing keys might have changed since the installation media was published, it is often necessary to update the keys before beginning an install.

armv7h systems:

 $ sudo pacman --needed -Syy archlinux-keyring parabola-keyring archlinuxarm-keyring

i686 systems:

 $ sudo pacman --needed -Syy archlinux-keyring parabola-keyring archlinux32-keyring

x86_64 systems:

 $ sudo pacman --needed -Syy archlinux-keyring parabola-keyring


4.6.1 Errors during package verification

The most common error related to package signatures will be of the form:

error: some-package: signature from "A Packager <a-packager@example.org>" is unknown trust
:: File some-package.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (PGP signature))

If the package in question is 'archlinux32-keyring', run this command first, before installing 'archlinux32-keyring'.

# pacman -U https://www.parabola.nu/packages/core/i686/archlinux32-keyring-transition/download/

Otherwise, in a very rare circumstance, where a keyring package itself gives a verification error, you will need to disable signature checking temporarily.

Disable signature verification manually by modifying the line in /etc/pacman.conf:

# RemoteFileSigLevel = Never

After installing the keyrings, re-enable signature verification in /etc/pacman.conf:

# RemoteFileSigLevel = Required DatabaseOptional

If you get an error related to dirmngr, you can get rid of it with:

# mkdir /root/.gnupg && chmod go-rx /root/.gnupg && touch /root/.gnupg/dirmngr_ldapservers.conf

(running the previous command might also be needed in the newly installed system.)

It may be also possible that the system clock is behind and the keys are incorrectly marked invalid. To solve this, manually set the correct current time.

# date MMDDhhmm[[CC]YY][.ss]

Where:

  • MM is the month
  • DD is the day
  • hh is the hour
  • mm is the minutes
  • CC is the century
  • YY is the year
  • .ss is the seconds (they can be omitted, but please remember to also remove the leading dot in that case)

For instance if the current time is 32 seconds and 44 minutes past 18 (6 pm) on the 13th November 2013 then the command would be:

# date 111318442013.32

4.7 Install the base system

Before installing, you may want to edit /etc/pacman.d/mirrorlist such that your preferred mirror is first. This copy of the mirrorlist will be installed on your new system by pacstrap as well, so it's worth getting it right.

If you want to speed up your download process add ParallelDownloads=5 to /etc/pacman.conf

If you face GPG errors when running # pacstrap, mind the advice in the signature verification section above. This is a fairly common error that you may see in the future as well; so it is a good idea to become familiar with the process of refreshing the keyrings.

4.7.1 Systemd

This section describes the bare minimum requirements for every Parabola systemd system.

Note: If you are installing a systemd system, from one of the OpenRC LiveISOs, ensure that pacman is NOT subscribed to the nonsystemd package repo before beginning the install process. Edit /etc/pacman.conf to configure pacman's options, if necessary.


Install the Parabola systemd base system using pacstrap:

# pacstrap /mnt base

4.7.2 OpenRC

Note: If you are installing an OpenRC system, from one of the systemd LiveISOs, ensure that pacman is subscribed to the nonsystemd package repo before beginning the install process. Edit /etc/pacman.conf to configure pacman's options, if necessary.

This section describes the bare minimum requirements for every Parabola OpenRC system. There are additional requirements that apply when installing a graphical desktop. Those are noted in a later section.

Install the Parabola OpenRC base system using pacstrap:

# pacstrap /mnt base libelogind
Note: Most people will need libelogind or elogind since they provide 'systemd-libs' and 'systemd' respectively, which many applications depend on. If your setup fails, try to install libelogind first.

Beneath the OpenRC service manager, there needs to be a separate /sbin/init program, often called: the PID-1 provider. The OpenRC 'base' package group as installed above, contains openrc-init; which is fully adequate for most users. There are other compatible init programs however, that provide the openrc-pid1 pseudo-package if you have a preference. You can get an up-to-date list of providers by running expac -S '%n %P ' | sed -n '/ openrc-pid1[= ]/s/ .*//p'. Currently the options are:

After installing an openrc-pid1 provider, OpenRC should boot by default instead of systemd. Note that it will boot to a command line, as the service for a graphical display manager has not yet been installed.

You also have a choice of 'udev' implementations to set up hardware devices. As with the init program, a fully adequate one ('udev') is installed already with the nonsystemd 'base' meta-package. You can get an up-to-date list of choices by running expac -S '%n %P ' | sed -n '/ udev[= ]/s/ .*//p'. Currently the options are:

  • udev (the nonsystemd/base default): Gentoo's fork of udev
  • systemd-udev: The traditional udev implementation

4.8 Install a kernel

In order to have a fully bootable system, you will need to install a kernel. We recommend that you always have linux-libre-lts installed, even if you will normally use another. Additional kernels may be installed similarly.

# pacstrap /mnt linux-libre-lts

The linux-libre-lts kernel is the most stable and reliable kernel, and is fully adequate for most users. Unless you have particular reason to prefer another, this is an excellent choice for "everyday" use.

4.9 Install a network manager

In order to connect to the internet, you will need to configure your network devices. There are multiple ways to accomplish that; but the easiest is to install the NetworkManager service, which as the name suggests, will manage your network devices and connections automatically. This is an optional step, if you plan to manage your network using other tools.

# pacstrap /mnt networkmanager
  • If you are installing an OpenRC system:
# pacstrap /mnt networkmanager-openrc

4.10 Other packages

At this point, the system is very minimal - a great base for a customizing a special-case system, but not quite suitable for typical use. The 'parabola-base' meta-package contains several useful tools that were once standard, before the minimalist 'base' meta-package was introduced as the new standard base system. It includes the midnight-commander (mc) file manager, the vi and nano text editors, a man-page viewer, and support utilities for networking and file-systems, for examples.

Note: 'parabola-base' is currently applicable to systemd systems only. A 'parabola-base' meta-package is planned for non-systemd systems; but for now, do not try to install 'parabola-base' if you have the [nonsystemd] repo enabled.
# pacstrap /mnt parabola-base

4.10.1 Libre firmware

Some hardware devices such as the popular NetGear WNA1100 (aka: Wireless-N 150, aka: Atheros AR9271) require firmware (eg: ath9k_htc) from the linux-libre-firmware package.

# pacstrap /mnt linux-libre-firmware

4.10.2 Filesystem support

If you have a btrfs root, you probably want to install also btrfs-progs.

# pacstrap /mnt btrfs-progs

Or for f2fs, install f2fs-tools.

# pacstrap /mnt f2fs-tools

4.10.3 Wireless tools

If your wireless network is WPA protected, you'll need wpa_supplicant to connect to it:

# pacstrap /mnt wpa_supplicant
  • If you are installing an OpenRC system:
# pacstrap /mnt wpa_supplicant-openrc

4.10.4 Logs

Some applications are using syslog interface to write their logs in. You will need to setup syslog-ng-openrc additionally if you are using an OpenRC system:

# pacstrap /mnt syslog-ng-openrc

4.11 Graphical Desktop Environments

Note that this section only describes the essential pre-requisites for graphical Parabola systems. The commands below will not install any X-server, display manager, window manager, or desktop environment. There are many possible combinations to choose from; but that is beyond the scope of this guide.

4.11.1 Systemd

There are no special requirements during the initial install for using a graphical desktop with a Parabola systemd system.

4.11.2 OpenrRC

This section describes the bare minimum requirements for using a graphical desktop with a Parabola OpenRC system.


elogind is a systemd substitute package. systemd is an essential 'base' package on Parabola systemd systems. Obviously, systemd is not an essential 'base' package on non-systemd Parabola systems; and is not installed by default. However, many GUI programs expect that systemd and it's dependencies are installed, and would have un-met dependencies if systemd or a substitute is not installed. There are multiple systemd substitutes; so you will need to choose one. elogind is the recommended option. It can grant privileges for desktop operations, such as powering off and mounting USB devices, and also provides systemd stub libraries, and depends on the same packages as 'systemd', in order to satisfy GUI programs which refuse to run otherwise.

Note: There is discussion about a new 'nonsystemd/parabola-desktop' package, which would depend on a 'systemd' provider. For now, this caveat must be handled manually.
# pacstrap /mnt elogind

4.12 Install a bootloader

4.12.1 GRUB 2

  • For BIOS and EFI:
# pacstrap /mnt grub
  • Additional for EFI:
# pacstrap /mnt efibootmgr

4.12.2 Syslinux

# pacstrap /mnt syslinux


5 Configure the system

Generate an fstab with the following command (if you prefer to use UUIDs or labels, add the -U or -L option, respectively):

# genfstab -p /mnt >> /mnt/etc/fstab

Next we chroot into our newly installed system:

# arch-chroot /mnt

5.1 Set host and hostname

Add the following text to /etc/hosts, in the following form:

/etc/hosts
127.0.0.1	localhost
::1		localhost
127.0.1.1	MY_HOSTNAME.localdomain	myhostname

If the system has a permanent IP address, the final ('MY_HOSTNAME') entry should refer to that, instead of 127.0.1.1.

Replace 'MY_HOSTNAME' with your preferred host name. Your computer's hostname can be anything that you like, consisting of letters a-z, digits 0-9, and hyphens '-' (eg: alices-laptop). The system hostname is mainly informational, making it easier to distinguish computers on your local network. This name will also appear in your shell prompt - eg:

 alice@alices-laptop:~ $
5.1.1 systemd

On a systemd system, add the same chosen hostname to /etc/hostname, in the following form:

/etc/hostname
MY_HOSTNAME
5.1.2 OpenRC

On an OpenRC system, add the same chosen hostname to /etc/conf.d/hostname, in the following form:

/etc/conf.d/hostname
hostname="MY_HOSTNAME"

5.2 Set timezone and locales

  • Symlink /etc/localtime to /usr/share/zoneinfo/Zone/SubZone. Replace Zone and Subzone to your liking. For example:
# ln -sf /usr/share/zoneinfo/Europe/Athens /etc/localtime
  • Set locale preferences in /etc/locale.conf
  • Add console keymap and font preferences in /etc/vconsole.conf when using systemd, or in /etc/conf.d/keymaps and /etc/conf.d/consolefont when using OpenRC.
  • Uncomment the selected locale in /etc/locale.gen and generate it with locale-gen

5.3 Generate initial RAM-disk

  • If you need special boot features, such as for disk encryption, configure /etc/mkinitcpio.conf accordingly (see mkinitcpio). In any case, re-generate the initial RAM-disk with:
# mkinitcpio -p KERNEL

... where: KERNEL is the one that you chose in the "Install a kernel" step (eg: linux-libre, linux-libre-lts). If you have installed multiple kernels, run the same command again for each kernel.

5.4 GRUB configuration

Note:
  • If you want to install GRUB for the (U)EFI mode, you will need to make sure that:
    • The computer booted in (U)EFI mode (if /sys/firmware/efi exist, then it booted in (U)EFI mode)
    • The efivars module is loaded. (modprobe efivars will load it)
  • Installing GRUB on your disk:
    • BIOS:
# grub-install /dev/sdX

... where '/dev/sdX' in most cases, is the same disk that you mounted in the pacstrap step, typically the only physical disk in the computer. Note: this is NOT the '/dev/sdXN' partition that you mounted on /mnt (e.g. /dev/sda1), but the physical raw disk root itself (e.g. /dev/sda).

  • EFI:
# grub-install --efi-directory=/boot
  • To enable the GRUB bootloader at boot-time, install it to the boot disk, and generate an appropriate boot menu file: grub.cfg in the conventional location:
# grub-mkconfig -o /boot/grub/grub.cfg

5.5 Configure speech support (for blind and visually impaired users)

If you are using TalkingParabola and need start speech support when you boot the system, you will need to do:

  • Install espeakup and alsa-utils.
  • Save the state of the sound card, so that it will be retrieved on reboot:
# alsactl store
5.5.1 Systemd
  • Enable the espeakup systemd service by executing:
# systemctl enable espeakup.service
5.5.2 OpenRC
  • Enable the espeakup systemd service by executing:
# rc-update add espeakup default

5.6 Configure pacman

Edit /etc/pacman.conf and configure pacman's options, also enabling the repositories you need. See Pacman and Official Repositories for details.

Also consider using Pacman2pacman, a peer to peer package system, in order to reduce load on official Parabola servers.

5.6.1 Systemd

If you are running systemd rather than OpenRC, make sure that the nonsystemd repo is NOT enabled.

5.6.2 OpenrRC

If you are running OpenRC rather than systemd, make sure that the nonsystemd repo is enabled.

5.7 Service management

Most casual desktop users would rarely need to interact with the service manager; but it is a good idea to learn the basics. The process is the same, now while in the chroot, and afterward during normal use.

5.7.1 Systemd

Interaction with systemd is done through the systemctl command. Read a:systemd#Basic systemctl usage for more information.

5.7.2 OpenrRC

Systemd services normally must be manually "started" and/or "enabled" for auto-start. Interaction with OpenrRC is done through the rc-update, rc-service, and rc-status commands.

Newly installed services will need to be added to specific runlevels. The 'default' runlevel is the only one that most users will need. Note, however, that essential services are enabled by default (e.g. dbus, elogind, opensysusers and opentmpfiles). You will need to "chroot" into the target system first, in order to accomplish this. That will normally not be necessary, once the system is installed and running.

To activate the 'NetworkManager' service, for example:

# rc-update add NetworkManager default

5.8 Setup users, groups, and passwords

Set a root password with passwd:

# passwd

Create an unprivileged (normal/everyday) user login (replace '<YOUR_USER_NAME>'):

# useradd -m <YOUR_USER_NAME>
# passwd <YOUR_USER_NAME>

Add your user to any special groups, if needed. eg:

# gpasswd -a <YOUR_USER_NAME> wheel

See User management for advanced examples of users and groups.

5.8.1 systemd

There are no special requirements for users and groups with a Parabola/systemd system.

5.8.2 OpenRC

A Parabola/OpenRC desktop system requires unprivileged users to be in some extra permission groups. See the OpenRC article for details.

5.9 Final steps

Additional networking configuration may be needed for graphical wifi managers and other network management tools. See a:Network configuration and Wireless Setup; or ask for help on IRC, on the web forum, or on the mailing list, if you would like suggestions.

5.9.1 OpenRC

There are some subtle caveats to be aware of regarding OpenRC, in some system configurations, which have not been mentioned in this guide. The OpenRC article has some trouble-shooting advice for the most common problems. If you have a problem initially, with using your new OpenRC system, please read that article, first before reporting bugs.

6 Update the system

If you installed via the ARM Release Tarball, the RISC-V Release Tarball, or one of the "Complete" LiveISOs, you could upgrade the fresh system now. Otherwise, the fresh system is already up-to-date. Regardless, it is always safe to upgrade the system; and it is recommended to do so at least once per month.

Before upgrading the system for the first time, or anytime when a few months has past between upgrades, ensure that you have the current key-rings first:

armv7h systems:

 # pacman --needed -Syy archlinux-keyring parabola-keyring archlinuxarm-keyring

i686 systems:

 # pacman --needed -Syy archlinux-keyring parabola-keyring archlinux32-keyring

x86_64 systems:

 # pacman --needed -Syy archlinux-keyring parabola-keyring

Then upgrade the system:

# pacman -Syu

7 Un-mount and reboot

Exit the chroot, then un-mount any partitions which you mounted in the "Mount the partitions" step. Then you can reboot and login to the new system normally.

# exit
# swapoff /dev/<DEV_PART_4>    # if you mounted a swap partition (eg: /dev/mmcblk0p4)
# umount /mnt/boot             # if you mounted a separate /boot partition
# umount /mnt/home             # if you mounted a separate /home partition
# umount /mnt                  # you surely mounted a / partition
# reboot

8 Conclusion

Your new system is now fully functional Parabola GNU/Linux-Libre environment. Welcome to Fosstopia.

9 Acknowledgement

This wiki article is based on ArchWiki. We may have removed non-FSDG bits from it.

10 See also