How to fix as I've accidentally deleted most of under /etc dir. which gave:
opentmp-setup : Failed to copy files to /etc
... (many files under /etc)
on booting
It's so hard to figure out the solution as even pacman -Syyu cannot do a help
It's last message on boot, kind of :
Error failed to start opentmp-setup
First, (re)install pacman and artix-mirrorlist to re-create pacman.conf and pacman.d/mirrorlist (also archlinux-mirrorlist, if you had the Arch repos enabled, and edit pacman.conf accordingly). Then, re-install all your packages: pacman will re-instate missing files/directories in /etc without touching existing/modified ones. You may need to re-initialize the keyrings (https://wiki.archlinux.org/title/Pacman/Package_signing#Initializing_the_keyring) first.
# pacman -Sy `pacman -Qqn`
some warnings ok ?
Packages (3) archlinux-mirrorlist-20200920-1 artix-mirrorlist-20211027-1 pacman-6.0.1-2
Total Installed Size: 4.78 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
(3/3) checking keys in keyring [#######################################] 100%
(3/3) checking package integrity [#######################################] 100%
(3/3) loading package files [#######################################] 100%
(3/3) checking for file conflicts [#######################################] 100%
(3/3) checking available disk space [#######################################] 100%
warning: could not get file information for usr/include/alpm.h
warning: could not get file information for usr/include/alpm_list.h
warning: could not get file information for usr/share/bash-completion/
...
warning: could not get file information for usr/share/pacman/proto.install
warning: could not get file information for usr/share/pkgconfig/
warning: could not get file information for usr/share/pkgconfig/libmakepkg.pc
warning: could not get file information for usr/share/zsh/
warning: could not get file information for usr/share/zsh/site-functions/
warning: could not get file information for usr/share/zsh/site-functions/_pacman
(1/3) reinstalling artix-mirrorlist [#######################################] 100%
(2/3) reinstalling pacman [#######################################] 100%
(3/3) reinstalling archlinux-mirrorlist [#######################################] 100%
OK, now solved booting into desktop
Next!