[指南] - Crostini Multi Container 到 Debian ArchLinux Ubuntu企 🐧

🖱️如需本指南的更新后续内容,请 Fyde 为我翻译:▼

可用 LXC 实时图像列表

克罗斯蒂尼免费企鹅 :白色复选标记:

为了安全起见,首先保持原来的 debian penguin不变 ,只需启用 #crostini-multi-container 标志并再添加一个!

🖱️ 先给你的企鹅侍酒师添加一个Linux:🖱️

克罗斯蒂尼氛围启动并成为 LXC 专家:

打开多个容器的标志。
转到开发人员并添加另一个具有随机名称的容器,它将自动使用您的 IP 创建它。

🖱️授予与您的 Linux 容器的连接:🖱️

启动终端并通过执行 sudo ping google.com 授予您对互联网的访问权限 如果没有返回,则 :关闭Crostini并重新启动它。

如果需要,请重复该过程。

打开 Crosh 并制作 LXC Ubuntu 容器:

  1. 开始 Vsh 结束
  • Ctrl+Alt+T 打开 Crosh 终端。
  • 类型vsh termina
  • 如果看到(termina) chronos@localhost ~ $ ,则表示 Termina 已启动成功。

vsh termina # vmc stop termina / vmc launch termina
lxc list
# 克隆你的 Ubuntu 容器
# FydeOS 不能有 security.privileged 容器,openFyde 可以。
lxc launch ubuntu:noble ubuntu -c security.privileged=true
lxc exec ubuntu -- bash
# lxc stop / lxc delete / lxc start / lxc console
passwd # 设置 root 密码
🖱️ 用户可选:🖱️
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
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

#这两个包可以共存:
sudo sh -c 'echo "deb https://storage.googleapis.com/cros-packages/ bookworm main" >> /etc/apt/sources.list.d/cros.list'
sudo sh -c '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 aptitude 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
#全部完成!现在开始启动Crostini吧。
🖱️ Repo的绷带解决方案:🖱️
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 浏览器 Ctrl Alt T,输入:shell
vmc container termina ubuntu --privileged true


🖱️ 企鹅快速入门(明白这个):🖱️

转到Crostini 终端, 打开 Ubuntu,第一次可能会失败 ,因此强制打开几次 ,并记住在打开后检查是否有连接。(它的作用…它尝试建立与 lxc 容器的侍酒师连接,但它有点…很容易失败)。

另外:首先启动 Debian penguin 可以修复连接,这样你就可以打开这个新更改的 linux

第三次就胜利了。


🖱️ 网络修复(最有可能需要):🖱️
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

🖱️ 重命名容器(仅可选)🖱️
#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 是这里的主要内容(仅供参考)
sudo aptitude install bash-completion bzip2 cros-apt-config cros-gpu cros-logging cros-pulse-config cros-sommelier-config cros-sudo-config cros- systemd-覆盖 cros-wayland curl dbus-user-session dbus-x11 文件熔断 git gnupg iputils-ping iptables ess libxss1 man-dbpulseaudio udev unzip usbutils vim wget xz-utils -y


🖱️参考链接:🖱️

更多信息:https://linuxiumcomau.blogspot.com/2018/08/introduction-to-crostini-part-3-using.html
替代解决方案: https://github.com/jcdang/chromeos-ubuntu-sommelier
额外信息: https ://blog.csdn.net/qq_37401091/article/details/127460700
Debian 到 Ubuntu Crostini: https://www.reddit.com/r/Crostini/wiki/howto/run-ubuntu/#wiki_install_crostini_packages
非常好的信息: http://intertwingly.net/blog/2020/07/21/Ubuntu-20-04-on-Chromebook
容器权限选项: https://stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/


1 个赞