Last Update: 2023-10-17

#Prerequisites

  1. Enable the Linux subsystem.
  2. Ensure a stable internet connection.

#Creating the Container

  1. Press Control + Alt + T to open the Crosh terminal.
  2. Enter vsh termina to access Vsh Termina.
  3. Execute the following command to create an Arch container:
    lxc launch images:archlinux/current archlinux
    
  4. After installation, enter the following command to access the container:
    lxc exec archlinux -- bash
    

#Configuring the Container

  1. Type passwd to set the root password.
  2. Install necessary packages:
    yes y | pacman -Syu base-devel git gtk3 openssh xdg-utils xkeyboard-config base-devel git curl make neovim wl-clipboard fish base-devel fakeroot pacman-contrib wayland xorg-xwayland devtools dhclient neofetch sudo
    
  3. Add a username and set a password:
    sudo useradd -G wheel -m demo
    sudo passwd demo
    

    demo is the default username. Please replace it as needed.

  4. To disable the sudo password, run:
    sudo sed -i 's/^# \(%wheel ALL=(ALL:ALL) ALL\)/\1/; s/^# \(%wheel ALL=(ALL:ALL) NOPASSWD: ALL\)/\1/' /etc/sudoers
    
  5. Type exit to leave the arch container.
  6. Re-enter the terminal using:
    lxc exec archlinux su - demo
    
  7. Install cros-container-guest-tools-git:
    git clone https://aur.archlinux.org/yay.git
    cd yay
    yes y | makepkg -si
    
    yay -S cros-container-guest-tools-git
    exit
    

#Adding ArchLinux in the Terminal

  1. Open the Chromium browser and enter chrome://flags. Find and enable the #crostini-multi-container Flag.
  2. In "Settings", click on "Developers", then "Manage Extra Containers". Enter the container name and click "Create".
  3. Set the container name to archlinux and click "Create".
  4. Restart FydeOS.

#Checking the Network

  1. Check the network configuration by entering:
    ip -4 a show dev eth0
    
  2. If there's no response, execute:
    sudo dhcpcd eth0
    sudo pacman -S dhclient
    sudo systemctl disable systemd-networkd
    sudo systemctl disable systemd-resolved
    sudo unlink /etc/resolv.conf
    sudo touch /etc/resolv.conf
    sudo systemctl enable dhclient@eth0
    sudo systemctl start dhclient@eth0
    

#Optionally Replace the Default Penguin Container with Arch

  1. Launch Crosh and enter:
    vsh termina
    
  2. Execute the following to replace the container:
    lxc stop archlinux
    lxc stop penguin
    lxc rename penguin debian
    lxc rename arch penguin
    lxc stop --force archlinux