[Guide] - Crostini Multi Container to Debian ArchLinux Ubuntu 🐧

Upgrade the current Debian for faster performance

5775d24dc130f4deb6d4746f53f189ed12a7ccfb

Debian Buster > Bullseye > Bookworm > Sid > Trixie (unstable) :grey_exclamation:

Set your user password just in case it gets asked after (optional): sudo passwd your_user

sudo apt update && sudo apt upgrade -y && sudo apt install nano -y && sudo apt dist-upgrade -y && sudo dpkg --configure -a

This adds better compatibility to apps and faster performance.
Linux apps seems to install easier with less errors.
Its almost as if you’re running a more authentic debian.
Trixie is the more advanced version of debian and I believe google is adopting it sooner of later.


This is all you need basically Cros-Packages version and update the url to deb https://storage.googleapis.com/cros-packages/to_that_version

sudo nano /etc/apt/sources.list.d/cros.list #Resets everytime.
sudo nano /etc/apt/sources.list #changes are permanent

:100: Debian Bookworm aka Debian 12 Stable :dizzy: - The one that works. :white_check_mark:

sudo sh -c 'echo "deb https://storage.googleapis.com/cros-packages/124 bookworm main" > /etc/apt/sources.list.d/cros.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian bookworm main" > /etc/apt/sources.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list'
sudo apt update && sudo apt install nala -y && sudo nala upgrade -y && sudo dpkg --configure -a && sudo apt dist-upgrade -y && sudo dpkg --configure -a

:space_invader: Debian Sid - Development / Not stable. :alien:

sudo sh -c 'echo "deb https://storage.googleapis.com/cros-packages/124 sid main" > /etc/apt/sources.list.d/cros.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian sid main" > /etc/apt/sources.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian sid-updates main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian-sid bookworm-security main" >> /etc/apt/sources.list'
sudo apt update && sudo apt install nala -y && sudo nala upgrade -y && sudo dpkg --configure -a && sudo apt dist-upgrade -y && sudo dpkg --configure -a

:boom: Debian Trixie (Future Debian 13) (Google doesnt supports it yet / Unstable yet) :anger:

sudo sh -c 'echo "deb https://storage.googleapis.com/cros-packages/124 trixie main" > /etc/apt/sources.list.d/cros.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian trixie main" > /etc/apt/sources.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian trixie-updates main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian-security trixie-security main" >> /etc/apt/sources.list'
sudo apt update && sudo apt install nala -y && sudo nala upgrade -y && sudo dpkg --configure -a && sudo apt dist-upgrade -y && sudo dpkg --configure -a

From v122 - Google officially added bookworm to crostini running kernel 6.1.


:penguin: Cook your way into Debian 13: :sparkles: sudo passwd your_user

sudo sh -c 'echo "deb https://storage.googleapis.com/cros-packages/124 trixie main" > /etc/apt/sources.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian unstable main non-free non-free-firmware" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb https://deb.debian.org/debian trixie main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb http://deb.debian.org/debian/ trixie main contrib non-free" >> /etc/apt/sources.list'
sudo apt update && sudo apt upgrade -y

^Not gonna lie… you might have to repeat this and might not work.


Things you can play with… salute:

d3b8388cea47b182aba149ff19efa2315e10ec55_2_82x97 burp!


🖱️Manual Instructions:🖱️

Manually edit googleapi package to an more recent version ‘124’ and set it to trixie:

deb https://storage.googleapis.com/cros-packages/124 bookworm main

Into:

sudo nano /etc/apt/sources.list.d/cros.list

This cros.list CANT be changed ! If changed… after a reboot it will reset.

  • Just change it update it and leave it.
    I don’t know if there will be a flag that allows it to be changed permanently without reset.
    Screenshot 2024-02-02 16.36.43

deb https://deb.debian.org/debian bookworm main
deb https://deb.debian.org/debian bookworm-updates main
deb https://deb.debian.org/debian-security bookworm-security main

  • Next change: bullseye to bookworm in: sudo nano /etc/apt/sources.list
    Here is where things can coexist and stay permanent.
    Screenshot 2024-02-02 16.37.18

Let the magic happen:

sudo apt update && sudo apt install nala -y && sudo nala upgrade -y && sudo apt dist-upgrade -y && screenfetch

image


🖱️How to reinstall it:🖱️

crosh - Shell:

vsh termina
lxc stop penguin ; lxc delete penguin
exit

If it bugs out just delete penguin and start it again and dont forget to check for connection - force shutdown and repeat.


1 Like

List of available LXC live images

Crostini Ubuntu Penguin :white_check_mark:

For safety first keep the original debian penguin unchanged and just enable the #crostini-multi-container flag and add one more!

🖱️Add a Linux to your penguin sommelier first:🖱️

Crostini Vibes Enable and Become an LXC Expert:


Turn on the flag for multiple containers.
Go to Developers and add another container with a random name it will automatically create it with your ip.

🖱️Grant connection to your Linux container:🖱️

Start the terminal and grant you have access to the internet by doing sudo ping google.com if no return - then: Shut Down Crostini and start it again.


Repeat the process if needed.

Open Crosh and lets make the LXC Ubuntu Container:

  1. Start Vsh Termina
  • Press Ctrl+Alt+T to open the crosh terminal.
  • Type vsh termina.
  • If you see (termina) chronos@localhost ~ $, it means that Termina has started successfully.

vsh termina # vmc stop termina / vmc launch termina
lxc list
# Clone your ubuntu container 
lxc launch ubuntu:jammy ubuntu -c security.privileged=true
lxc exec ubuntu -- bash
# lxc stop / lxc delete / lxc start / lxc console
passwd #set a root password
🖱️User Optional:🖱️
sudo su root
sudo passwd root #set user root password

sudo adduser #newuser
sudo usermod -aG sudo #newuser
#sudo apt install nano
sudo visudo
#newuser ALL=(ALL:ALL) ALL
su #newuser

sudo sed -i 's/^# \(%wheel ALL=(ALL:ALL) ALL\)/\1/; s/^# \(%wheel ALL=(ALL:ALL) NOPASSWD: ALL\)/\1/' /etc/sudoers

Install Google Cros-Packages.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1397BC53640DB551
sudo apt update && sudo apt install nala git cabextract aptitude nano zenity screenfetch make python3-pip python3-apt python3-debian pandoc neofetch network-manager isc-dhcp-client isc-dhcp-server adwaita-icon-theme-full -y && screenfetch && lsb_release -a

#For ChromeOS use google packages instead: 
echo "deb https://storage.googleapis.com/cros-packages bookworm main" > /etc/apt/sources.list.d/cros.list && if [ -f /dev/.cros_milestone ]; then sudo sed -i "s?packages?packages/$(cat /dev/.cros_milestone)?" /etc/apt/sources.list.d/cros.list; fi
#I think both can co-exist
#For FydeOS use fyde packages instead:
echo "deb https://deb-mirror.fydeos.com/cros-packages bookworm main" > /etc/apt/sources.list.d/cros.list && if [ -f /dev/.cros_milestone ]; then sudo sed -i "s?packages?packages/$(cat /dev/.cros_milestone)?" /etc/apt/sources.list.d/cros.list; fi

sudo apt update && sudo nala install cros-garcon cros-host-fonts cros-notificationd cros-sftp cros-sommelier bash-completion bzip2 cros-sommelier-config curl dbus-user-session dbus-x11 file fuse git gnupg iputils-ping iptables less libxss1 man-db pulseaudio udev unzip usbutils vim wget xz-utils cros-apt-config cros-logging cros-sommelier-config cros-sudo-config cros-systemd-overrides cros-wayland gtk2-engines-pixbuf libgtk2.0-0 libgtk-3-0 gtk2-engines-murrine -y && sudo nala upgrade -y
#All done here! Lets start Crostini now.
🖱️Repo's bandage solution:🖱️
sudo rm /etc/apt/sources.list.d/cros.list to clear anything not google/fydeos/etc.
sudo nano /etc/apt/sources.list to clear things out.
cd /etc/apt/sources.list.d/ to see whats going on.

crosh - Browser Ctrl Alt T, type: shell
vmc container termina ubuntu --privileged true


🖱️Quick Start of the Penguin (Understand THIS):🖱️

Go to your Crostini Terminal open Ubuntu it wil likely fail the first time so force its opening a few times and remember to check if it has connection once open. (What it does… it tries to establish the sommelier connections to the lxc container and it kinda… fails easily).

Also: Starting the Debian penguin first kinda fixes the connections so then you can open this new changed linux

The third time is a win.


🖱️Network Fix (Most likely needed):🖱️
systemctl --user restart cros-garcon.service
systemctl --user restart sommelier{,-x}@{0,1}.service
#sudo apt install dhcpcd -y # or dhcpcd5
#Check the network by running (it can't be empty) with:
ip -4 a show dev eth0
#if no connection then:
sudo dhcpcd eth0
sudo dhclient
sudo systemctl disable systemd-resolved
sudo unlink /etc/resolv.conf
sudo touch /etc/resolv.conf
sudo systemctl restart networking
sudo /etc/init.d/networking restart
sudo ping 8.8.8.8
sudo sysctl -p
systemctl --user daemon-reload

🖱️Renaming containers (only optional)🖱️
#This is only needed if you want to replace the terminal other then add more.
#you gotta use your brain here a bit.. 
lxc list
lxc stop 'your_containers'
lxc rename penguin 'something_else' #to switch by the actual one
lxc rename ubuntu penguin #that is if you only want 1 crostini penguin container instead of the debian.
lxc restart penguin
#lxc stop ubuntu that is if u only created an named ubuntu lxc container and crostini
exit
exit

🖱️cros-guest-tools:🖱️

cros-guest-tools is the main thing here (just for reference)
sudo aptitude install bash-completion bzip2 cros-apt-config cros-gpu cros-logging cros-pulse-config cros-sommelier-config cros-sudo-config cros-systemd-overrides cros-wayland curl dbus-user-session dbus-x11 file fuse git gnupg iputils-ping iptables ess libxss1 man-db pulseaudio udev unzip usbutils vim wget xz-utils -y


🖱️Links for reference:🖱️

More info: https://linuxiumcomau.blogspot.com/2018/08/introduction-to-crostini-part-3-using.html
Alternative solution: https://github.com/jcdang/chromeos-ubuntu-sommelier
Extra info: https://blog.csdn.net/qq_37401091/article/details/127460700
Debian to Ubuntu Crostini: https://www.reddit.com/r/Crostini/wiki/howto/run-ubuntu/#wiki_install_crostini_packages
Very Good info: http://intertwingly.net/blog/2020/07/21/Ubuntu-20-04-on-Chromebook
Container privilege options: https://stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/

1 Like

List of available LXC live images

Crostini ArchLinux Penguin :white_check_mark:

For safety first keep the original debian penguin unchanged and just enable the #crostini-multi-container flag and add one more!

🖱️Add a Linux to your penguin sommelier first:🖱️

Crostini Vibes Enable and Become an LXC Expert:


Turn on the flag for multiple containers.
Go to Developers and add another container with a random name it will automatically create it with your ip.

🖱️Grant connection to your Linux container:🖱️

Start the terminal and grant you have access to the internet by doing sudo ping google.com if no return - then: Shut Down Crostini and start it again.

Repeat the process if needed.

  1. Start Vsh Termina
  • Press Ctrl+Alt+T to open the crosh terminal.
  • Type vsh termina.
  • If you see (termina) chronos@localhost ~ $, it means that Termina has started successfully.

Set Up the Arch Container - This installs archlinux into LXC container

  • Run the command below to install the ArchLinux container:
lxc list
lxc launch images:archlinux/current archlinux
lxc exec archlinux -- bash
#lxc stop / lxc delete / lxc start / lxc console

#set a root password
passwd

#Install basic requirements
yes y | pacman -Syu base-devel git gtk3 openssh xdg-utils xkeyboard-config base-devel git curl make neovim wl-clipboard fish base-devel pacman-contrib wayland xorg-xwayland devtools dhclient neofetch sudo screenfetch

Create your username and password ex: ‘archlinux’

sudo useradd -G wheel -m archlinux
sudo passwd archlinux

sudo sed -i 's/^# \(%wheel ALL=(ALL:ALL) ALL\)/\1/; s/^# \(%wheel ALL=(ALL:ALL) NOPASSWD: ALL\)/\1/' /etc/sudoers

exit
lxc exec archlinux su - archlinux
🖱️On arm64 you can just replace user 'alarm' (optional/skip)🖱️
grep 1000:1000 /etc/passwd
groupmod -n archlinux alarm
usermod -d /home/archlinux -l archlinux -m -c archlinux alarm

#sudo sed -i 's/^# \(%wheel ALL=(ALL:ALL) ALL\)/\1/; s/^# \(%wheel ALL=(ALL:ALL) NOPASSWD: ALL\)/\1/' /etc/sudoers
#or manually:

passwd archlinux #Set user passwd
visudo
# ^ Uncomment the line that says:
# %wheel ALL=(ALL) NOPASSWD ALL
:wq #(Press ESC and type :wq enter to save and exit)

usermod -aG wheel archlinux
exit 

#lxc exec container su - your_username
lxc exec archlinux su - archlinux

Install YAY and Crostini Interface

git clone https://aur.archlinux.org/yay.git
cd yay
yes y | makepkg -si

yay -S cros-container-guest-tools-git
exit

Exit Crosh - Start debian penguin to let it establish and then start your Archlinux clicking it 3 times.

Once it starts have fun et Voilá Sudo Pacman Treé Jolie.


🖱️Extras for pacman:🖱️
sudo nano /etc/pacman.conf
# ^ Optional: Update pacman config. I prefer to:
#   - uncomment #Color
#   - uncomment #VerbosePkgLists
#   - uncomment #ParallelDownloads = 5

sudo nano /etc/pacman.d/mirrorlist
# ^ Optional: Use a closer mirror. Eg, change
#   mirror.archlinuxarm.org => au.mirror.archlinuxarm.org
#
#   A full list of mirrors are in this page:
#   https://archlinuxarm.org/about/mirrors

🖱️Network Fix (Most likely needed):🖱️
#Check the network by running (it can't be empty) with:
ip -4 a show dev eth0
#if no connection then:
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
ping 8.8.8.8

🖱️Renaming containers: (only optional)🖱️
#Crosh Ctrl+Alt+T
vsh termina
lxc stop archlinux
lxc stop penguin
lxc rename penguin debian
lxc rename archlinux penguin
lxc restart penguin

🖱️Basic terminal troubleshoot:🖱️
Check your baseline repos: `sudo nano /etc/pacman.conf`
sudo pacman-key --refresh-keys
sudo pacman -S archlinux-keyring
sudo rm /var/lib/pacman/db.lck
---
🖱️Links for Reference🖱️

You can switch it to ArchLinux https://fydeos.io/docs/knowledge-base/linux-subsystem/archlinux/
Debian to Arch: https://shibumi.dev/posts/install-arch-linux-on-chromeos/
Baldrailers Github: https://gist.github.com/baldrailers/09ba52a17219ca1e8fbf233dc8a4b375/

Fedora:

vsh termina
lxc delete penguin --force
lxc launch images:fedora/30 penguin
lxc exec penguin – bash

dnf install -y sudo
USERNAME=$youruser
useradd $youruser -G wheel

dnf install -y cros-guest-tools
systemctl enable dbus-daemon && systemctl start dbus-daemon # Enable and start dbus-daemon
systemctl unmask systemd-logind
loginctl enable-linger $USERNAME # Enable linger for your user
systemctl enable cros-sftp # Enable integration services

systemctl --user enable sommelier@0 sommelier-x@0 sommelier@1 sommelier-x@1 cros-garcon cros-pulse-config
sudo sed -i ‘/I37/d’ /usr/share/X11/xkb/keycodes/evdev

https://blog.catprosystems.com/post/drafts/chromos-fedora/
https://www.reddit.com/r/Crostini/wiki/howto/run-fedora-linux/

Any LXC container into Penguin: https://ubuntu.com/blog/using-lxd-on-your-chromebook

source: https://discuss.linuxcontainers.org/t/using-lxd-on-your-chromebook/3823

ctrl-alt-t to access crosh
vsh termina (or vmc start termina)
lxc config set core.https_address :8443
lxc config set core.trust_password some-password

# create an Ubuntu container
lxc launch ubuntu:18.04 c1
# copy the lxc command from it
lxc file pull c1/usr/bin/lxc /tmp/lxc
# copy it to penguin
lxc file push /tmp/lxc penguin/usr/local/bin/
rm /tmp/lxc
lxc delete c1

# note the host ip (HOSTIP here after) in the ipv4.address line
lxc network show lxdbr0 

open termina

lxc remote add chromeos HOSTIP
(use the password some-password used for lxc config...)
lxc remote set default chromeos

all done.

test if it works:
lxc list

Fixing ''Download is Performed unsandboxed"

sudo chown -Rv _apt:root /var/cache/apt/archives/partial/
sudo chmod -Rv 700 /var/cache/apt/archives/partial/

vmc start –enable-gpu

Great guide: https://12101111.github.io/install-archlinux-on-fydeos/

Fedora Crostini penguin: https://asaba.sakuragawa.moe/2019/06/土製雙系統-chromebook-使用體驗與踩坑/