Hur man integrerar Ubuntu 22.04 LTS med ChromeOS!
Hur man integrerar Ubuntu 22.04 LTS med ChromeOS!

Hur man integrerar Ubuntu 22.04 LTS med ChromeOS!

Av Mattias Vinberg när jag inte är på top =)

Start by entering the Chrome shell (crosh) by pressing CTRL+ALT+T, then enter the default termina VM:

vmc start termina

Rename the default penguin container:

lxc stop penguin --force
lxc rename penguin debian

Create a new Ubuntu container named penguin:

lxc launch ubuntu:22.04 penguin

Enter the new container (as root):

lxc exec penguin -- bash

Bring Ubuntu up to date:

apt update
apt upgrade

Now add the Crostini package repository to apt. This repository provides the Linux integration with Chrome OS:

echo "deb https://storage.googleapis.com/cros-packages bullseye 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
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 78BD65473CB3BD13
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
apt update

A work-around is needed for a cros-ui-config package installation conflict. First, install binutils to get the ar command:

apt install binutils

Then create the cros-ui-config work-around package:

apt download cros-ui-config
ar x cros-ui-config_0.13_all.deb data.tar.gz
gunzip data.tar.gz
tar f data.tar --delete ./etc/gtk-3.0/settings.ini
gzip data.tar
ar r cros-ui-config_0.13_all.deb data.tar.gz
rm -rf data.tar.gz

Now install the Crostini packages and the ”work-around” package, ignoring any warning messages. This will take awhile:

apt install cros-guest-tools ./cros-ui-config_0.13_all.deb

Delete the ”work-around” package:

rm cros-ui-config_0.13_all.deb

Last step =) Add user

killall -u ubuntu
groupmod -n gmail-username ubuntu
usermod -md /home/gmail-username -l gmail-username ubuntu
usermod -aG users gmail-username
loginctl enable-linger gmail-username
sed -i 's/ubuntu/gmail-username/' /etc/sudoers.d/90-cloud-init-users

Note: replace “gmail-username” with your own Gmail username or Linux Name.

Now please restart Linux =) and we are done

Kind Regards,
Mattias Vinberg

Lämna ett svar