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)
vsh terminalxc stop penguin --forcelxc 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.
dhclientdnf -y install NetworkManagersystemctl disable systemd-networkdsystemctl disable systemd-resolvedsystemctl enable NetworkManagerunlink /etc/resolv.conf
Stop and start the container to verify it comes up with a working network stack and proceed.
Setup
exec into the containerlxc exec penguin -- bash
install cros-guest-toolsdnf -y install sudo cros-guest-tools
Create user (match your Chrome OS username)useradd $username
Enable sudo for your usergroupadd sudousermod -aG sudo $username
Enable linger for your usersystemctl unmask systemd-logindloginctl enable-linger $username
Enable integration servicessystemctl enable cros-sftpsudo su - $usernamesystemctl --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
Restart Fedora
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
[Default Applications]text/html=garcon_host_browser.desktopapplication/xhtml+xml=garcon_host_browser.desktopx-scheme-handler/http=garcon_host_browser.desktopx-scheme-handler/https=garcon_host_browser.desktop
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/pulsesystemctl --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=31rpm2cpio filesystem-3.12-2.fc31.x86_64.rpm > filesystem.cpiorpm -ivh --justdb filesystem-3.12-2.fc31.x86_64.rpmpushd /cpio -ivd < ~/filesystem.cpiopopd
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=31dnf -y distro-sync
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1589968