个人不是非常习惯debian的环境,更喜欢ubuntu所以计划把debian换成ubuntu,在这里记录一下过程:
创建 Ubuntu 容器
在设置中[启用 Linux]支持。然后首先通过按CTRL+ALT+T
进入crosh,然后输入
vmc start termina
进入 默认虚拟机: termina
关闭并重命名默认容器:penguin
lxc stop penguin --force
lxc rename penguin debian
创建一个名为 penguin的新 Ubuntu 容器:penguin
lxc launch ubuntu:23.04 penguin
进入新容器;
lxc exec penguin -- bash
获取默认 ubuntu 用户的组成员身份,然后删除用户
创建一个小脚本,使用该脚本将您的用户名添加到所有默认的 Ubuntu 组中,然后删除默认用户:ubuntu
groups ubuntu >update-groups
sed -i 'y/ /,/; s/ubuntu,:,ubuntu,/sudo usermod -aG /; s/$/ \$USER/' update-groups
killall -u ubuntu
userdel -r ubuntu
sed -i '/^ubuntu/d' /etc/sudoers.d/90-cloud-init-users
更新组件
在准备安装 Google 的 Crostini 软件包时,让我们首先更新 Ubuntu:
apt update
apt upgrade
安装 Crostini 库
将 Crostini 软件包存储库添加到 apt
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
ubuntu的虚拟机工具需要手动修复:
首先我们修复并安装cros-im
apt download cros-im
mkdir tmp-im
dpkg-deb -R cros-im*.deb tmp-im
nano tmp-im/DEBIAN/control # Now go to the Depends: section and at the end of the line change qtbase-abi-5-15-2 to qtbase5-dev
dpkg-deb -b tmp-im cros-im-fixed.deb
apt install ./cros-im-fixed.deb
rm cros-im*.deb
rm -r tmp-im
下载并修复cros-ui-config
apt download cros-ui-config # ignore any warning messages
mkdir tmp
dpkg-deb -R cros-ui-config*.deb tmp
rm ./tmp/etc/gtk-3.0/settings.ini
nano ./tmp/DEBIAN/conffiles # Now delete the /etc/gtk-3.0/settings.ini line then save and exit. Also delete any blank lines at the end of this file before saving.
dpkg-deb -b tmp cros-ui-config-fixed.deb
安装 Crostini 软件包
apt install ./cros-ui-config-fixed.deb cros-guest-tools
收尾
关闭容器:
shutdown -h now
重新启动 fydeos。