šŸ‘½ Lee Tusman

ā† Nosebook šŸ‘ƒšŸ““

Linux on low power laptops šŸ’»

08 Nov 2022

10-minute read

Chromebook booted into GalliumOS
Chromebook booted into GalliumOS, dithered low bandwidth and retro style image

Recently at the request of a student I helped secure her a laptop that she could use in my intro computer science class as she was looking to get into the major and didnā€™t have a functional computer at home, just a phone. My school does laptop loans, locked-down Macs, but we decided to build up a Linux machine she could use as well, and that would let her explore the operating system and write her own software, which is much easier on Linux. Since I use Linux myself, I thought Iā€™d write a little about it.

I asked friends for suggestions of where to get a near-free functional computer, and I received a suggestion to look in local thrift stores for old Chromebooks. Unfortunately, thatā€™s not really a viable option in NYC. There are few thrift stores around, and those that do generally do not sell electronics, much less old Chromebooks.

But Craigslist is thriving here, and I saw a variety of cheap Chromebooks for sale. Would they be powerful enough to run Processing? By default the ChromeOS is not really able to run programs to write your own software. Itā€™s just a minimal cloud-based computer attached to Google services. I looked online. It looked like it was very possible to boot up an alternative Linux OS, particularly a Debian-based distro, but it was not definitive (For the nerds: technically ChromeOS is a stripped down Linux system). There were some listed options for using a chroot to run Ubuntu, but it appeared slow and everything was years old. I wasnā€™t sure the current state. I also saw a variety of difficult options for installing Ubuntu (or another *buntu on top of ChromeOS).

With a little searching I wasnā€™t filled with confidence as it was immediately clear you canā€™t just flash an ISO to a USB, launch an installer and call it a day. No. For this reason, I decided to install it myself in case I got stuck for hours or days in the process.

I found someone on Craigslist looking to part with a near-new Chromebook. I met up with them at Grand Central, and ended up trading $40 for the laptop. Thatā€™s a bargain!

I read a dozen websites and fora trying to come up with a plan. It looks like years ago it was pretty easy to flash Ubuntu and there were many options. Now Google has really locked down the computer. The main approach is to:

  • Turn on insecure legacy boot
  • Update firmware
  • Other stuff

Steps

Start up the Chromebook and connect to WIFI.

I have a Samsung Chromebook 3 which comes withe Braswell firmware. When I looked it up, I read it must be updated.

I rack my brain and decide I will try to run Linux off an external drive and see if thatā€™s viable.

Turn off secureboot So we can boot off a USB

Procedure:

  1. Enable developer mode
  2. Turn off verified boot
  3. Enable dev usb boot

Details:

Boot into recovery mode

Press Escape + Refresh key (3 buttons to the right of escape) + Power button. Let go of power and itā€™ll start up in Recovery Mode.

When it starts up it tells me to insert a USB. Nah, not yet. Press Ctrl-D to turn off verified boot. Wait 10 seconds and when prompted I press enter. Itā€™ll reboot and asks me to hit enter again to confirm. I make sure it says OS Verification is OFF. Press Ctrl-D again. It begins reflashing my drive and booting into developer mode. It takes about 5 minutes.

Enable Dev usb boot

Eventually it starts back up and I see the traditional welcome screen on ChromeOS. I skipped signing in and clicked Sign in as Guest in the bottom left so I donā€™t need to make a Google account.

When I finally get into the desktop environment I open the Terminal with Ctrl-Alt-T.

I type shell and enter to get a Linux command line.

I switch to bash with root privileges to make changes to booting by typing sudo bash and hitting enter.

I get the typical warning about sudo ā€˜with great power comes great responsibilityā€™ mumbo jumbo. I type enable_dev_usb_boot and enter. A success message appears.

Set up dev boot legacy

I open the terminal with Ctrl-Alt-F2 (right arrow). I login to ā€˜chronosā€™. No password. I type sudo crossystem dev_boot_legacy=1 and then my prompt. First weird thing occurs. The prompt tells me instead to try dev_boot_altfw instead. Hmm. I run sudo crossystem dev_boot_altfw=1 and get no error so maybe this is alternative firmware and it worked?

Update firmware

Iā€™m on a Samsung Chromebook 3 which runs Intel Braswell, so I saw it needed its firmware updated. I ran the update firmware automation script from mrchromebook.tech.

cd; curl -LO mrchromebox.tech/firmware-util.sh
sudo install -Dt /usr/local/bin -m 755 firmware-util.sh
sudo firmware-util.sh

This brings up a menu.

I tried to select 2 Install/Update UEFI Firmware but I couldnā€™t because WriteProtect was enabled since I wasnā€™t able to take off the back of the machine to remove a screw. But I could do 1) and update the current Legacy BIOS firmware.

Make a flash drive iso

I downloaded a GalliumOS iso even though itā€™s not maintained anymore. I had been thinking Iā€™d download Lubuntu but against my better judgement I decided to try Gallium since it was built specifically for Chromebook. I used Balena Etcher to write the iso to USB.

GalliumOS

Start up with your USB drive loaded with linux

Once written to disk, I plugged in the USB drive to the Chromebook and start up in recovery mode by pressing Escape + Refresh + Power to start up.

Press Ctrl-U to start from the USB. Or was it Ctrl-L?

It starts up and I run the installer, which is self-explanatory like picking keyboard, city and the like. It takes just a few minutes. I shut down and remove the USB installer. Fingers crossedā€¦.

Startup

It works! Each time the computer is turned on we need to run Ctrl-L to escape the regular startup process and boot into Gallium.

Once itā€™s started, I have a really nice looking desktop and the machine (despite being pretty low power) is fast! I opened up the terminal and sudo apt updated and sudo apt upgraded. Then I tried out the package manager App Grid Software Center and installed LibreOffice, Solitaire, Tetris and some other software for my student. There was already a variety of basic apps for playing music, displaying images, file manager, etc. I visited the Processing website and downloaded the latest version, 4.0.1 and downloaded it. I used tar to uncompress and then ran the bash installer file. This installed Processing to the desktop and placed its icon in the launcher menu under Development. I wrote a basic Processing Hello World program, tested it ran, and saved it.

Lastly, I downloaded a picture of my college and set it as the desktop background. Before class I presented the computer to my student and she was excited to get it. She began using it that day.

I hope it will be useful for her classes, browsing the web, doing homework and practicing coding in Processing.

Other flavors of *Buntu

There are a variety of other Ubuntu-derived free Linux distros.

Lubuntu

In the summer I was an artist in resident at a museum. Thereā€™s a drawer with old tech gear, including mixers, speakers and cables. I set up a temp recording studio to work on electroacoustic music with a friend. In a drawer we also found an old computer, a HP Envy, I think from 2010. It has Windows on it, but I had to start up in Safe mode to even try it out because I didnā€™t know the admin password, and the computer didnā€™t have ā€˜service pack 1ā€™ installed which prevented the browser from being updated! When I finally got the darn thing running I saw it had Windows 7. Okay! So my next step: wipe the computer and put a new Linux OS on it. But which one?

Since the laptop I found is 13 years old, I needed a lightweight distro. I wanted the computer useable by friends here without any previous Linux experience, and I didnā€™t think a minimal tiling window manager like i3 would be a good experience for them. So I thought I remembered that Lubuntu was the lightweight Ubuntu - so should I try that?

The projectā€™s goal is to provide a lightweight yet functional Linux distribution based on a rock-solid Ubuntu base. Lubuntu provides a simple but modern and powerful graphical user interface, and comes with a wide variety of applications so you can browse, email, chat, play, and be productive. Lubuntu was formerly a distribution for low-end hardware, but we have refocused.

I downloaded the iso, wrote it to usb with dd, plugged it into the laptop and restarted. In a minute it was up and running. I double clicked the installer and about 10 minutes later I was up and running. I had never used Lubuntu before, which comes with Openbox as its window manager, which I donā€™t think Iā€™ve used before. But it was obvious what to do: Open the menu in the bottom left. I found the menu categories and built-in basic apps pretty usable. I found the qt-terminal, sudo apt updated and sudo apt upgraded, quickly downloaded some basic programs (neovim, curl, w3m, tldr, kate, kitty, amfora, canā€™t remember what else) and some basic art/music programs (krita, audacity, puredata, rhythmbox, love2d).

For a 13 year old laptop, the thing is fast. Installing with aptitude is almost as quick as my much more modern laptop. This old clunky computer practically flies. Because Iā€™ve used Ubuntu so long I didnā€™t feel like I needed to learn anything. I have two complaints so far that I havenā€™t solved: itā€™s not obvious to me how to pin programs to the built-in taskbar. And I canā€™t seem to get the keyboard keys for special characters on the Danish keyboard to perfectly match the US keyboard set, but itā€™s close enough. But those are the only issues Iā€™ve had so far. Sound works great. The audio interface I plugged in seemed to work fine. I recorded an album of field recordings using a handheld memo voice recorder, then mixed on the computer. And everything looks pretty nice. Iā€™d recommend a similar setup in a heartbeat!

various bots Ā· Radio - Free - Aarhus

Lubuntu official site
Lubuntu on Wikipedia