Easy to use Arch Linux chroot environment with some functionalities to integrate it with your existing Linux installation.
Go to file
2020-11-03 22:45:26 +07:00
exp More musl workarounds. 2020-11-02 19:36:27 +07:00
pacman_hooks Add pacman hook for installing kernel in host. 2020-11-02 21:34:26 +07:00
runit/archbox Basic functionality 2020-10-27 13:12:14 +07:00
archbox.bash Pulseaudio dirty fix on musl-based distros. 2020-11-02 16:51:43 +07:00
archbox.conf Provide a way to bring custom enviroment variables to chroot. 2020-10-29 13:07:50 +07:00
archboxcommand.bash Provide a way to bring custom enviroment variables to chroot. 2020-10-29 13:07:50 +07:00
chroot_setup.bash Fix a typo 2020-11-01 06:51:53 +07:00
copyresolv.bash Basic functionality 2020-10-27 13:12:14 +07:00
install.sh Change install script. 2020-11-03 22:45:26 +07:00
README.md Update README.md 2020-11-02 19:41:09 +07:00
remount_run.bash More musl workarounds. 2020-11-02 19:36:27 +07:00

Archbox

Installs Arch Linux inside a chroot enviroment.

Why?

Ever since I'm running some niche distros like Void, Solus, I had a problem finding softwares I need in their not-so-large repositories, also I don't like how flatpak and snap works. so i decided to create an Arch Linux chroot enviroment everytime I distrohop. Why Arch Linux? They have a really, really good repositories, oh and don't mention how big AUR is.

Installation

Installing Archbox

It's pretty easy, just run install.sh as root.

Installing chroot enviroment

Before creating chroot enviroment, edit your username in /etc/archbox.conf, then do :

sudo archbox --create <archlinux tarball download link>

Removing chroot enviroment

IMPORTANT, Make sure you've unmounted everything in chroot enviroment, if you're unsure which partitions must be unmounted, remove the init script and reboot, then delete the folder.

Entering chroot enviroment

To enter chroot, do :

archbox --enter

Executing commands in chroot enviroment

To execute commands inside chroot envirotment, do :

archbox <command>

for example, to update chroot, do :

archbox sudo pacman -Syu

Automount filesystem

If you use runit, copy archbox folder inside runit/ to whatever your distro store runit services and symlink it to whatever your distro store running runit services, if you don't use runit, you may need to create your own init script, or create a cronjob that runs on boot.

Optional steps

You may want to add this if you don't want to run archbox chroot without password :

Sudo

%wheel  ALL=(root) NOPASSWD: /usr/local/share/archbox/bin/archbox,/usr/local/share/archbox/bin/copyresolv,/usr/local/share/archbox/bin/remount_run

Doas

Idk you're on your own

Misc

Lauching apps via rofi

Instead of opening terminal everytime you want to run application inside chroot, you may want to launch rofi inside chroot, install rofi and do :

archbox rofi <rofi options>

Prompt

If you use bash with nerd font you could add a nice little Arch Linux icon in your prompt, add :

[[ -e /etc/arch-release ]] && export PS1=" $PS1"

to your ~/.bashrc

Adding enviroment variables

Edit ENV_VAR in /etc/archbox.conf. For example, if you want to use qt5ct as Qt5 theme, edit it like this :

ENV_VAR="QT_QPA_PLATFORMTHEME=qt5ct"

An example with multiple enviroment variables.

ENV_VAR="QT_QPA_PLATFORMTHEME=qt5ct GTK_CSD=0 LD_PRELOAD=/var/home/lemniskett/git_repo/gtk3-nocsd/libgtk3-nocsd.so.0"

Known issues

Void Musl (or any Musl-based distros, need confirmation)

Although /run is mounted in chroot enviroment on boot, XDG_RUNTIME_DIR is not visible in chroot enviroment, remounting /run will make it visible. do :

archbox --remount-run

after user login, Also you need to kill every process that runs in XDG_RUNTIME_DIR when you log out, if you use startx you need to reinstall archbox with --exp flag and use startx-killxdg instead of startx. Tested in Void Linux musl.