Last active
January 29, 2021 18:36
-
-
Save alex2844/596995082ab43c3e3012cfce8254554d to your computer and use it in GitHub Desktop.
Ubuntu chrome os
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lxc start penguin | |
USER=$(lxc exec penguin -- ls /home) | |
lxc stop penguin --force | |
lxc delete penguin | |
lxc launch ubuntu:20.10 penguin | |
lxc exec penguin -- bash | |
echo "deb https://storage.googleapis.com/cros-packages stretch 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 update | |
apt upgrade | |
rm -rf /var/cache/snapd/ | |
apt autoremove --purge snapd gnome-software-plugin-snap | |
apt install binutils | |
apt download cros-ui-config | |
ar x cros-ui-config_0.12_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.12_all.deb data.tar.gz | |
rm -rf data.tar.gz | |
apt install cros-guest-tools ./cros-ui-config_0.12_all.deb | |
rm cros-ui-config_0.12_all.deb | |
apt clean | |
killall -u ubuntu | |
groupmod -n $USER ubuntu | |
usermod -md /home/$USER -l $USER ubuntu | |
usermod -aG users $USER | |
loginctl enable-linger $USER | |
sed -i "s/ubuntu/$USER/" /etc/sudoers.d/90-cloud-init-users | |
# sudo wget -O /usr/local/bin/adb https://github.com/alex2844/adb-ndk/raw/master/bin/adb.bin && sudo chmod +x /usr/local/bin/adb | |
# sudo wget -O /usr/local/bin/fastboot https://github.com/alex2844/adb-ndk/raw/master/bin/fastboot && sudo chmod +x /usr/local/bin/fastboot | |
shutdown -h now | |
logout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment