Chromebook Adventures

A chromebook you say?

I've been in need of a new personal laptop for a while and inspired by this post from @kennwhite I decided that I would get a Chromebook. I put a couple of different models on a wishlist including the one in that blog post, but my siblings opted to get me a nicer one with more cores, more RAM, and more storage for my birthday (thanks!!) (In fact, it's the same one that Kenn appears to be trying next.)

I have a few notes to add to that blog post as it pertains to my use cases including an open problem which, if I solve it, will trigger an update to this post with the solution.

Additional Useful Apps

In addition to many of the apps recommended by Kenn, here are some additional ones that have proven useful:

  • VNC Viewer works very nicely for connecting to the VNC console of some VMs on my SmartOS box.
  • aSPICE/aSPICE Pro is an Android app that I can run on my Chromebook and works better than the HTML5 Chrome app that requires websockets and hasn't been updated in a while. (That said, it's possible that throwing up a zone with a webserver with the latest HTML5 client and the websockets proxying might be a good thing for me to explore at some point.) I bought the paid version a while back to use on my phone/tablet because I was using it so much.
  • Chromebook Recovery Utility but not for the reason you might think. It turns out you can use it to write any image you download to a USB stick. It took me a bit too much searching to find the details so I'm collecting them here.

Writing USB sticks under Chrome OS

Creating a bootable USB stick from Chrome OS

In keeping with Kenn's philosophy of not undermining the security mechanisms of Chrome OS, I had to figure out how to flash images to a USB stick without using dd. This somewhat obscure forum posting held the key, but I will spell it out here for the sake of those who search for this in the future:

  1. Install Chromebook Recovery Utility
  2. Download whatever ISO/USB image you want to write to your USB stick.
  3. This is the key: Rename the file to end with .bin
  4. Insert your USB stick
  5. Launch the Recovery Utility
  6. Click the gear icon in the upper right hand corner
  7. Select "Use local image"
  8. Use the file picker to select your file
  9. Select your USB stick from the drop-down list
  10. Click "Continue"
  11. Read the warning and be certain you want to overwrite that USB stick (you've been warned!!)
  12. Click "Create now"
  13. Wait for it to complete

This should work with any standard ISOhybrid image which seem to be all the rage for Linux distros and the like, but should also work for e.g. a SmartOS USB stick image.

Missing Features

IPMItool

(This section assumes you read about the termux bits in Kenn's post)

I built my SmartOS box with a server-grade motherboard. It has IPMI and I love being able to connect to the Serial Over LAN to do administration since it sits in a corner with no keyboard or monitor. Unfortunately I couldn't find an existing binary package for IPMItool. There wasn't one for termux, so I installed a toolchain in termux, downloaded the IPMItool sources, and tried to build it.

Turns out that some lovely code from 2003 assumes the presence in libc of getpass(3c) (or getpassphrase on platforms that have it). Also turns out that the Chrome OS / Android libc (not totally sure what's at play) doesn't have that function.

I think the solution will either be to manually patch in an implementation cribbed from somewhere else on the internet, or figure out how to use gnulib to provide that functionality. I think there's an example of someone doing something similar here but I didn't dig deeply enough into their tooling to figure it out yet.

If any of you have done this sort of thing before, I'll happily write up the solution here in exchange for guidance on how to do it (and perhaps help build a termux package for it to share the love.)

EDIT (2017-10-01): It looks like I managed to leverage gnulib after all.
EDIT (2017-11-05): Better late than never, the follow up post.