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
/etc/pacman.d/mirrorlist
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.
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)
[obcore]
SigLevel = Never
Server = https://cloud.server.obarun.org/$repo/os/$arch/
[obextra]
SigLevel = Never
Server = https://cloud.server.obarun.org/$repo/os/$arch/
You must first sync pacman for it to incorporate the [core]
and [obextra]
obarun repositories first. The output should be in order as:
# pacman -Sy
obcore
obextra
core
extra
/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.
# pacman -Sy pacman -r /mnt
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.
# 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
You can find out how to modify and configure your boot module boot@system here: boot and here: 66 configure
% sudo -E arch-chroot /mnt 66 enable boot@system
% sudo -E arch-chroot /mnt 66 configure boot@system
% sudo -E arch-chroot /mnt 66 reconfigure boot@system
Install and set your boot loader as per obarun and/or arch wikis if necessary:
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.
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.
Don't forget
If the host system is not a live system but a regular installation, you must copy back the originalpacman.conf
from its temporary saved location.
# cp -a /etc/pacman.conf.arch /etc/pacman.conf