User Tools

Site Tools


from-arch-install

This is how you can install obarun bare-metal from an arch installation or an arch live system.

First you must prepare a partition as instructed in the arch wiki Partition_the_disks

For simplicity we will refer to this prepared and mounted partition as the “target” /mnt and the arch system from which you will make the installation will be the “host” /

For EFI systems als follow the arch wiki EFI system partition and the obarun wiki entry uefi

Assumptions for this installation:

  1. User has partitioned, formatted, and mounted partitions on /mnt
  2. Network is functional
  3. Arguments passed to the script are valid pacman targets
  4. A valid mirror appears in /etc/pacman.d/mirrorlist
  5. You are in a root shell
  6. arch-install-scripts is installed in your system (includes arch-chroot and pacstrap)

One of the key differences with Arch is that Obarun has a few more repositories that are placed higher up in hierarchy within /etc/pacman.conf to give priority to Obarun's packages over arch. Pacstrap (pacstrap) is a program used by arch to install arch in another partition. Since the host's pacman configuration is for Arch, not Obarun, we must first add a step in order for pacstrap to work as if the host's pacman was an Obarun system's pacman.

1 Backup pacman.conf and modify

First backup your existing pacman.conf which needs to be modified

# cp -a /etc/pacman.conf /etc/pacman.conf.arch

Edit the current /etc/pacman.conf and add the following 3 lines right above the first arch repository (it should be either core or testing if activated)

#——– cut and paste between lines ————-

[obcore]
SigLevel = Never
Server = https://repo.obarun.org/obcore

#——— end —————

2 Sync pacman

You must first sync pacman for it to incorporate the core obarun repository first. The output should be in order as:


# pacman -Sy

obcore
core
extra
community

3 Create pacman lib directory in /mnt

# mkdir -p /mnt/var/lib/pacman

This is necessary for installing pacman to the target before running pacstrap, in order to use the current and correct Obarun pacman.conf by pacstrap.

4 install Obarun's pacman to target

# pacman -Sy pacman -r /mnt

Note: Although several obarun repositories exist, pacman and all of its dependencies come from either obcore (obarun's core repository) or arch's core and other repositories.

5 use pacstrap to install the base system and kernel

# pacstrap -c -G -i -M -C /mnt/etc/pacman.conf /mnt base linux

(feel free to choose kernel among the several in Obarun's and Arch's repositories and susbstitute linux above for the chosen one linux-lts linux-lts419 linux-hardened linux-zen .. )

The above command, pacstrap, and its modifiers make pacstrap populate the obarun and arch keyrings, using Obarun's pacman.conf as already found in /mnt/etc/pacman.conf and uses the host's /var/cache/pacman/pkg to save packages to be installed instead of the target's. Read pacstrap -h options if you want to store packages in the target's cache, but do not alter the -C /mnt/etc/pacman.conf option.

If you want additional packages you can either do this later through chroot or add them at the end of the above command (ie networking package of choice, text editor, arch-install-scripts, bootloader-grub/syslinux, etc. ). You may run the pacstrap command several times if you later remember something.

Select the closest mirrors to your location and remove the comment sign '#' from in front of them. Pacman hits the first uncommented server on the list and only if it fails goes to the next.

# $EDITOR /mnt/etc/pacman.d/mirrorlist

Initialize pacman, re-populate its gpg-keys and update the database

# arch-chroot /mnt pacman-key --init
# arch-chroot /mnt pacman-key --populate archlinux obarun
# arch-chroot /mnt pacman -Sy

Select the lingual group of your installation by removing the '#' (uncommenting - example: “en_US.UTF-8 UTF-8” for US English ) and pass the choice into the system:

# $EDITOR /mnt/etc/locale.gen

# arch-chroot /mnt locale-gen

Create an fstab entry of your new installation:

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

Create a root password

# arch-chroot /mnt passwd

edit your hosts as per your network needs

# $EDITOR /mnt/etc/hosts

edit your hostname, although it should also be set by configuring your boot module

# $EDITOR /mnt/etc/hostname

Create a boot tree and enable the default boot module

# arch-chroot /mnt 66-tree -n boot
# arch-chroot /mnt 66-enable -t boot boot@system
# sudo -E arch-chroot /mnt 66-env -t boot -r 'HOSTNAME=!myhost' boot@system
# arch-chroot /mnt 66-enable -t boot -F boot@system

Verify the boot tree was created and populated by the boot@system module

# arch-chroot /mnt 66-intree -zg

6 Optional boot module configuration

You can find out how to modify and configure your boot module boot@system here: boot and here: 66-env

# sudo -E arch-chroot /mnt 66-env -t boot boot@system  
# arch-chroot /mnt 66-enable -t boot -F boot@system

7 Misc. optional configurations

Install and set your boot loader as per obarun and/or arch wikis if necessary: grub syslinux

Obarun uses a safety issue for cases where a small mistake may lead into a failing boot process by making tty12 available as early as the boot process begins and is possible. Root is not allowed to login at tty12 tty12, only a user can. So you may choose to create a user for such occasions and issue a password for that user. It is up to you.

Your installation is complete

You may either reboot at this point or use arch-chroot to get into the installation and do more configurations or pkg installations as you need.

Welcome to Obarun

Don't forget

If the host system is not a live system but a regular installation, you must copy back the original pacman.conf from its temporary saved location

# cp -a /etc/pacman.conf.arch /etc/pacman.conf

from-arch-install.txt · Last modified: 2021/02/23 03:02 by obarun