The Beginner's Installation Guide

The intention with this guide is to show a very simple way of how to boot Hyperbola GNU/Linux-libre from an optical disk or any other medium capable, including then how to install it the easiest way possible onto your local harddrive.

This guide will therefore only provide the basic steps to get you as user started. For a more detailed insight please have a look on the reference installation guide.

Download and verify the live image

Once you have downloaded the Live image as described you should verify it following these guidelines. Make sure to change your settings in the BIOS so that your computer will boot from your chosen medium for the installation. We will mention further now two possible ways of preparations towards possible installation-mediums.

Write the image to your optical disk

To create a disk to use as your install medium, insert a blank (re-)writable disk, CD or DVD, into your disk-drive - sure to note that this drive needs therefore burning-capabilities and you have an optical drive. Next, you will need to mount the disk.

# mount sr0

The device sr0 should the first or only, if you only have one disk-drive. You will need to address the correct destination for the command to work.

# dd if=~/hyperbola-milky-way-v0.4.4-dual.iso of=/dev/sr0 bs=2048 conv=noerror && sync

Write the image to your USB-device

Change the directory to the folder where you saved the downloaded ISO-image and type the following into your terminal:

# dd if=hyperbola-milky-way-v0.4.4-dual.iso of=/dev/sdb bs=2048 && sync

To find out what’s the name of the USB device, type fdisk -l

You’ll probably see something like this:

Device             Boot    Start                  End              Sectors               Size        Id    Type
/dev/sda1                    2048                   8390655       8388608              4G           82    Linux swap /Solaris
/dev/sda2       *          8390656             976773167  968382512          461,8G   83    Linux
Device             Boot    Start                 End              Sectors                Size        Id    Type
/dev/sdb1       *           0                         1255423      1255424               613M      0     Empty
/dev/sdb2                     172                    63659           63488                   31M        ef    EFI (FAT-12/16/32)

From the above, sda is your harddisk, and the sdb is for example your USB-device where you’re going to write your ISO-image.

Also take a note of your partitions, you will come to need it when you’re creating the file system and mounting the root partition during the installation.

Once you’ve downloaded, verified and written the ISO-image to your preferred medium, you can move on to boot your computer from it.

Boot and install Hyperbola

Once your computer has successfully booted the chosen medium, type the following into you terminal:

# cfdisk /dev/sda

This will bring up a graphical partitioning tool. Use the Tab and arrow keys to navigate, use Enter for selecting an option and / or command. This is assuming that you want Hyperbola GNU/Linux-libre installed on your local harddisk. When starting the partioniniong on a complete fresh harddisk you will first need to select the label-type for your MBR (Master Boot Record). We assume in this guide that you keep it for the absolute defaults and therefore not including UEFI.

 Creation of MBR

Delete all the partitions so that you only see the label “Free Space”.

 Initial screen for Partitioning

Then make a new partition by choosing “New” and then set it “Primary” within options. Make this first partition a so-called Swap-partition. Regarding the size 1/4 of you computer’s memory should be enough. So with 8 GB of memory, your Swap-partition would then be 2 GB. You will also need to change the “Type” towards “Linux swap / old Solaris”.

The rest of the space should be made “Primary” as partition with the “Type” kept per default as “Linux”, choose the “Boot”-flag to make this partition bootable. Then choose “Write” and type ’yes’ to save your changes to disk. Afterwards you are ready to use the command “Quit”.

You will then have now the following partition-layout:

sda1       Primary  Linux  Swap / Solaris
sda2 Boot  Primary  Linux

Take note of the fact that the root-partition that you soon will mount, is the bootable one (in this example the concurrent device named sda2) that you made from the rest of the space after creating the Swap-partition.

Create a file system

If you’re not using an English keyboard, you can set your language by typing loadkeys followed by you language. Available keymap files can be found in /usr/share/kbd/keymaps/ (you can omit the keymap path and file extension when using loadkeys). For Swedish users for example, type:

# loadkeys se.

To create the ext4 file system, type:

# mkfs.ext4 /dev/sda2

Activate swap

You would need to write / create and activate the Swap-partition:

# mkswap /dev/sda1
# swapon /dev/sda1

Mount the root partition

Now mount your root-partition for installing the system:

# mount /dev/sda2 /mnt

Install the base system

To deploy all needed files and folders:

# pacstrap /mnt base

Generate an fstab

One of the most important files for your installed system to describe the whole file-system hierarchy:

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

Chroot and configure the base system

After you have finished the initial process of the installation you would need to enter your until now not finished system:

# arch-chroot /mnt

Locale

Type:

# nano /etc/locale.gen

Now choose your locale from what language you’re using. All locales are commented out (preceded by #) by default. Uncomment (remove the #) for your choice of locale. For US English, it should look like this:

# nano /etc/locale.gen
...
#en_SG ISO-8859-1
en_US.UTF-8 UTF-8
#en_US ISO-8859-1
...

After you’ve uncommented your language, run the command:

# locale-gen

Then create the /etc/locale.conf

# echo LANG=en_US.UTF-8 > /etc/locale.conf 

Then export your chosen locale

# export LANG=en_US.UTF-8

Keymap

As the locale, you need to setup the keymap in the file /etc/conf.d/keymaps:

keymap="us"

If you have an advanced usage of your keymap, you can watch the other functionalities, documented in the comments. You can find all the available keymaps in /usr/share/kbd/keymaps. Then run:

# rc-update add keymaps default
This only applies for CLI, is you are using X11, this won't affect your graphical environment.

Time zone

Create a symbolic link /etc/localtime to your subzone file /usr/share/zoneinfo/Zone/SubZone:

# ln -s /usr/share/zoneinfo/Zone/SubZone /etc/localtime

Example:

# ln -s /usr/share/zoneinfo/Europe/Oslo /etc/localtime

If you get ln: failed to create symbolic link ’/etc/localtime’: File exists, then run:

# ln -s -f /usr/share/zoneinfo/Zone/SubZone /etc/localtime

Hardware clock

Set the hardware clock to UTC

# hwclock --systohc --utc

Hostname

Usually it’s sufficient to set your hostname to localhost.

# echo localhost > /etc/hostname

Add the same hostname, i.e. localhost, to /etc/hosts.

Type:

# nano /etc/hosts
# <ip-address> <hostname.domain.org> <hostname>
127.0.0.1                localhost.localdomain     localhost localhost
::1                             localhost.localdomain     localhost localhost

Root password

Remember when you’re typing in your root password (as any password) into the terminal, it won’t show. Just carefully type in your chosen root password and repeat it when asked to.

# passwd

GRUB

Finally follow these steps:

# pacman -S grub
# grub-install --target=i386-pc --recheck /dev/sda

(Here do NOT append a partition number, i.e. /dev/sdaX)

# grub-mkconfig -o /boot/grub/grub.cfg

Unmount the partitions and reboot

Now for the final steps:

# exit
# umount -R /mnt
# reboot

Remember to remove your installation medium (your USB stick) before you reboot into your system. To log in, you type root and your password.

Congratulations! You have now installed Hyperbola GNU/Linux-libre onto you computer.

Post-installation

You will now have to create a user and get user privileges like doas. And of course you have to select your graphical environment. Look around in our wiki to find more information about those steps!