How to run Fedora instead of Debian
Move the debian container out of the way
Press Ctrl+Alt+T to bring up crosh (Chrome OS Developer Shell)
lxc stop penguin --force
lxc rename penguin debian
Create the Fedora container
lxc launch images:fedora/31 penguin
Replace systemd-networkd if networking is broken
If you find you are unable to access the internet take these steps to replace systemd-networkd.
dnf -y install NetworkManager
systemctl disable systemd-networkd
systemctl disable systemd-resolved
systemctl enable NetworkManager
Stop and start the container to verify it comes up with a working network stack and proceed.
exec into the container
lxc exec penguin -- bash
dnf -y install sudo cros-guest-tools
Create user (match your Chrome OS username)
Enable sudo for your user
usermod -aG sudo $username
Enable linger for your user
systemctl unmask systemd-logind
loginctl enable-linger $username
Enable integration services
systemctl enable cros-sftp
sudo su - $username
systemctl --user enable sommelier@0 sommelier-x@0 sommelier@1 sommelier-x@1 cros-garcon cros-pulse-config
After 13 Jun 2020 this will be:
systemctl --user enable sommelier@0 sommelier-x@0 sommelier@1 sommelier-x@1 cros-garcon pulseaudio
Right click the Terminal app and choose Shut Down Linux (Beta).
Start the container again by clicking on the Terminal app. After a moment you should get a terminal to your new container with functionaing integration.
Use Chrome as the default browser
If you’d like to change the default browser for Linux applications to the ChromeOS Chrome edit
.config/mimeapps.list and add the following entries
Fix audio after 13 Jun 2020
You may have had working or intermittently working audio which suddenly changed to never working audio. The flaky cros-pulse-config service was replaced with configuration files that are dropped in place when you create a new user account. For an already existing user account you need to:
cp /etc/skel/.config/pulse/d* ~/.config/pulse
systemctl --user enable pulseaudio
After stop the Linux container, start it again, and audio should be working.
Upgrading between releases
Doing upgrades between releases in a container can present a minor challenge. Because /sys and /proc are mounted into the container they are read only to the container and because the VM hosting the container is not running the distro the permissions are different from what Fedora expects. When the filesystem package tries to install if will fail because it can’t update these permissions to what it specifies they should be. Therefore before starting an update you may wish to take some steps to make the process go smoother. Effectively what we do is install the RPM using cpio and then update db in separate steps to reflect that.
Perform a backup before performing these steps.
rpm -e --justdb filesystem --nodeps #(–justdb is EXTREMELY important for this step, excluding it will have catrastrophic results)
dnf -y install 'dnf-command(download)'
dnf download filesystem --releasever=31
rpm2cpio filesystem-3.12-2.fc31.x86_64.rpm > filesystem.cpio
rpm -ivh --justdb filesystem-3.12-2.fc31.x86_64.rpm
cpio -ivd < ~/filesystem.cpio
At this point if you run the following command you should see that pretty much all files and directories verify except the user and group permissions on those we epect:
rpm --verify filesystem-3.12-2.fc31.x86_64
Continue with an update:
dnf -y update --releasever=31
dnf -y distro-sync