u/unix21311 discovered errors in the procedure

After the recent video to demonstrate this type of installation many of the errors encountered by unix21311 
were confirmed and corrected (we hope) in this wiki entry.
This commit is contained in:
joborun linux 2023-10-18 13:40:39 +00:00
parent ef42d51e78
commit 1d5e5512a9

View file

@ -31,7 +31,7 @@ One of the key differences with Arch is that joborun and Obarun have a few more
###### Create pacman lib directory in /mnt ######
<pre>
# mkdir -p /mnt/var/lib/pacman
# mkdir -p /mnt/var/lib/pacman/sync
</pre>
This is necessary for installing pacman to the target in order to use the current and correct joborun pacman.conf.
@ -41,16 +41,12 @@ This is necessary for installing pacman to the target in order to use the curren
<pre>
# pacman -Sy pacman --config /tmp/pac-inst.conf -r /mnt
<pre>
# pacman -Sy --config /tmp/pac-inst.conf base opensysusers** linux(***) -r /mnt
# pacman -S base opensysusers** --config /tmp/pac-inst.conf -r /mnt
# /mnt/usr/bin/arch-chroot /mnt
</pre>
** Sysusers should be used in lack of systemd to set systemd IDs for special users like systemd does. With the use of s6 and 66 obsysusers is a dependency and replaces opensysusers. Basically it is the same script and runs through a pacman hook reading a sysusers.d directory for users settings by any software that require to execute something as a special system user (neither a regular user or root).
*** You have a choice of joborun's special linux-lts (5.10) or linux (5.15) and if you need linux/linux-lts headers add them to the list. Same for linux-firmware, especially if you have an AMD machine with Radeon gfx card, you will not get anything on screen without it. There are also less frequently maintained kernel's 4.9 5.4 6.2 6.4 6.5 ...
We highly recommend linux-lts (5.10) as a very well developed kernel expiring in 2026, while 5.15 is expected to last only till 2024. So 5.10 is a longer LTS, while 5.15 is a relative short term LTS. Current late lts is 6.1 carried by Arch while 6.2 is current stable. So the choices are wide.
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. ).
We are trying to make sure you have a fully functional system to boot and login to console, then you can install whatever you like.
@ -69,10 +65,23 @@ The following is about the same as running joborun-setup from (jobo-setup) pkg.
Initialize pacman, re-populate its gpg-keys and update the database
<pre>
# arch-chroot /mnt pacman-key --init
# arch-chroot /mnt pacman-key --populate joborun archlinux obarun
# arch-chroot /mnt pacman -Syu
</pre>
# /mnt/usr/bin/arch-chroot /mnt # (zsh or bash not specifying defaults to bash)
# pacman-key --init
# pacman-key --populate joborun archlinux obarun
# pacman -Syu
# pacman -S linux*** grub
# joborun-setup
# exit
# reboot
</pre>
*** You have a choice of joborun's special linux-lts (5.10) or linux (5.15) and if you need linux/linux-lts headers add them to the list. Same for linux-firmware, especially if you have an AMD machine with Radeon gfx card, you will not get anything on screen without it. There are also less frequently maintained kernel's 4.9 5.4 6.2 6.4 6.5 ...
We highly recommend linux-lts (5.10) as a very well developed kernel expiring in 2026, while 5.15 is expected to last only till 2024. So 5.10 is a longer LTS, while 5.15 is a relative short term LTS. Current late lts is 6.1 carried by Arch while 6.2 is current stable. So the choices are wide.
_______________________________________________
The following are minimal configurations, if you run joborun-setup you will be guided doing the same and not forget any important steps, like a password for the user to be able to login to the system once booted.
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:
@ -82,7 +91,7 @@ for US English ) and pass the choice into the system:
</pre>
<pre>
# arch-chroot /mnt locale-gen
# /mnt/usr/bin/arch-chroot /mnt locale-gen
</pre>
If you are working in chroot don't expect the change in locale to be automatic, you must either restart a shell, or exit and re-enter, or in a booted system relogin. By reboot it will for sure change the language.
@ -90,13 +99,15 @@ If you are working in chroot don't expect the change in locale to be automatic,
Create an fstab entry of your new installation:
<pre>
# /mnt/usr/bin/arch-chroot /mnt
# genfstab -U /mnt >>/mnt/etc/fstab
# exit
</pre>
Create a root password
<pre>
# arch-chroot /mnt passwd
# /mnt/usr/bin/arch-chroot /mnt passwd
</pre>
edit your hosts as per your network needs
@ -109,6 +120,7 @@ edit your hostname, although it should also be set by configuring your boot modu
<pre>
# $EDITOR /mnt/etc/hostname
# $EDITOR /mnt/etc/rc.conf
</pre>
@ -136,17 +148,20 @@ You may either reboot at this point or use arch-chroot to get into the installat
#### Note: 2 ####
Thanks to [[u/unix21311 | https://www.reddit.com/user/unix21311/]] a detail that escaped us, not actually using a different distro to do the installation, till pacman and mirrorlists are installed in the chroot the flag --config /mnt/etc/pacman.conf must be used for your local pacman to be reading a different configuration and repositories than what is native. So the 2nd step of installation was modified. In the first step you use the pacman.conf that is temporary to install joborun's pacman, the 2nd step is using the chroot's own new pacman.conf.
#### Note: 3 ####
Many more thanks to [[u/unix21311 | https://www.reddit.com/user/unix21311/]] for pointing out more errors on the instructions, such as opentmpfiles missing from the base package and not being installed before 1st boot, and installing the kernel from inside a proper arch-chroot instead of using pacman externally from host which fails to produce /boot/ images.
<pre>pacman -Syu -r /mnt</pre>
uses the native (host's) pacman to install into the chroot /mnt
uses the native (host's) pacman and mirrorlist to install into the chroot /mnt
<pre>pacman -Syu --config /tnp/alternative-pacman.conf -r /mnt</pre>
uses this alternative pacman.conf stored somewhere else
<pre>/mnt/usr/bin/arch-chroot /mnt pacman -Syu</pre>
is a much better and safer way to do an upgrade of the system than the previous command, all because some hooks on pacman pkgs need a process based on the tmpfs systems that are only available through the proper chroot the arch-chroot script provides.
<pre>sudo arch-chroot /mnt pacman -Syu</pre>
uses the pacman installed into /mnt (target) and therefore /mnt/etc/pacman.conf