Rebuilding my Chromebook’s Linux Envionment

My regular travel laptop is a 15-inch Lenovo running Gnu/Linux. A couple of years ago, I decided to get something a little smaller, lighter, and cheaper. I didn’t want to take the 15-inch laptop if I didn’t need to. I use it mostly for conference presenting and running VMs. Replacing it would be a pain.

I ended up getting an Acer Chromebook 11, the C740 model, for vacation and easier travel. I liked that model because you could replace the original storage with something larger by swapping out the SSD. I also like dit because I could install Debian to it with Crouton.

I set up the device up to Debian Buster and the xfce4-desktop. Other than not using the device enough to remember all commands to launch the chroot Linux environment, it worked well. To help remember how to launch Linux, I have the following saved

to a text file on the device.

Since it had been a bit since I used the Chromebook, I thought I would upgrade it. Heck, it was going to get an update from Google anyway. The upgrade started ok but went off the rails.

I dropped into the Linux chroot with the startxfce4 command and then started a terminal window and ran

which worked ok. Then I thought, why not upgrade to Bullseye instead. So after changing /etc/apt/source.list to point to testing/bullseye, I updated and tried to upgrade again. It looked like it worked, but I started to have some problems. Unfortunately,

couldn’t save the day.

The first problem was the XFCE application launcher kept crashing. It appeared to be related to another problem with an outdated library package. I don’t remember which library now, and I don’t have the search history since I was in the chroot environment, which got deleted—more on that in a bit.

It turned out the library was preventing upgrading the system. Updating the library package’s base version solved both problems. I was back up and running at that point and upgraded to Bullseye, even though the chroot environment was still called buster.

Then I added in some other toys like bash-completion, VScode, pyenv, git, and whatnot. Bash-completion, however, broke everything. I couldn’t even get the chroot environment to boot. It kept throwing the following error on boot.

A troubleshooting step I didn’t know at the time was I could have tried to kick off the chroot environment at the command line by using the following command.

Which may have allowed removing bash-completion to see if that fixed the problem. But as I said, I didn’t know that command at the time.

While trying to fix the bash-completion issue, the Chromebook OS update finished, and I updated crouton, wondering if that was part of the problem with laughing the chroot. Unfortunately, those added more problems, like not being able to run the crouton command from the shell. The GitHub page for Crouton is excellent. So is the Crouton Cheat Sheet. The GitHub page actually talked about the new problem I was having.

After multiple failures, an hour or more wasted, and not knowing how to get into the chroot environment to use the chroot Command-Line Interface, I decided to erase Buster and start over with Bullseye.

So I go through the process of

And get a whole new error. XFCE starts and then gives an error about dbus-launcher not being found and can’t continue.

Googling for the answer, I came across an error report from a few years ago and a slightly different way to install the chroot environment. While I liked the install instructions provided by Dennis:fromGA’s post, I did change the order, so Xorg starts by default; it didn’t help. I was still getting the new dbus-launcher error on the GUI.

Three or four attempted re-installs and going through issue 2970’s post, and I saw it was possible to enter the chroot and access the CLI directly, no GUI needed. Besides thinking, “what awesome black magic is this,” it gave me more options to troubleshoot my issues.

For dbus-launcher, I found I had to install the dbus package dbus-x11. No idea why it wasn’t installed during the installation process, but it was missing. So a quick

got the system working. Once it was working, I could boot into a nice new happy Bullseye chroot environment on my Chromebook. Well, kind of.

One thing I did note, some people on GitHub were posting about Black Screens on their Chromebooks. I don’t know if I had the same problem, or if mine was different. But when using either

it appears that the chroot environment takes longer to shutdown.

A few times, it was shutting down from those modes I thought it hung. It gave the unmount message I was used to logging out from Xorg, but it just sat there on the screen with no prompt. So I would hit ctrl-c to get back to the prompt. When I’d try to start Xorg, I would get the black screen and needed to hold the power button to reboot the whole Chromebook.

It was then just a matter of getting git, pyenv, re-copying in my GitHub ssh keys, setting up the global gitignore for my user, and VSCode to get to where I needed to be. But I once again have a great little travel device to take with me that is lighter and cheaper than the big travel laptop when I just want to do little things, like surf the web or work on some Python. Or sit upstairs and play on a computer while watching TV.

Oh, for the global gitignore, Martin Hujer’s blog post. I came across it last week after uploading .vscode to a private repo I use for a Python class I’m taking.

Leave a Reply

Your email address will not be published.