Can a $200 Chromebook run linux? Darren finds out with a Crouton! Plus - The ins and outs on LED - Shannon explains. All that and more, this time on Hak5!
Linux Your Chromebook
All this talk about KVM and OpenVZ had me looking into a project I had previously shelved - and that's running a Ubuntu Linux in a Chrooted environment on a Chromebook.
Chromebooks are awesome because they're light and cheap and run Chrome and SSH - but that's where it ends.
It's nice being able to hit CTRL+ALT+T and get a Crosh terminal, but really aside from SSH and Ping, there isn't much of use.
Which is where Crouton comes in. Crouton stands for Chromium OS Universal Chroot Environment. It's a set of scripts that make it easy to setup Ubuntu or Debian on a Chromebook in a chroot environment.
Chroot is a unix tool that allows for isolated filesystems. It's used by the OpenVZ project, and then some, to create independent environments on top of a single kernel. What that means is that applications running within a chrooted environment typically can't see outside their own container. It's sort of like a sandbox. What we end up with are both Chrome OS and Ubuntu, in this case, utilizing the same system resources like RAM and CPU simultaneously - but each with their own independent file systems.
For this demo I'm going to be using the HP Chromebook 11, but most every Chromebook is supported. The HP Chromebook 11 is about a year old and it's not lightning fast or anything. Under the hood it's sports a dual core 1.7 GHz ARM chip, 2 gigs of RAM and a 16 GB SSD. Nothing brilliant, but enough to run the basic Linux stuff I miss - especially all the Bash utilities. Best of all it's 2 Lbs, cheap, and runs off Micro USB so it'll power off my Pineapple Juice.
To get started you'll need to put the Chromebook in developer mode. Older models have a hardware switch. Newer ones you can set in software by holding ESC, Refresh and Power. It's not mentioned on the scary boot screen, but press CTRL+D to prep developer mode. This will take about 10 minutes and it'll wipe the disk.
Now back into Chrome OS in Dev Mode, download the latest Crouton installer from https://goo.gl/fd3zc then open Crosh with CTRL+ALT+T and issue shell.
List releases and desktops
sudo sh ~/Downloads/crouton -t list -r list
Install Ubuntu 14.04 with xfce and
sudo sh ~/Downloads/crouton -e -r trusty -t xiwi,extension,xfce
# -t core or -t cli-extra for just CLI in Crosh
sudo enter-chroot sudo startxfce4
LED's are FUN!
LED's are light emitting diodes, found everywhere.
Popular type of Diode, which is a little device that makes current flow from one positive side (anode) to a negative side (cathode) and not vice versa. The positive side (anode) of an LED is the longer leg. The shorter one is the negative side (cathode). If you plug an LED in backwards, it just won't work because no power can swoop up into the cathode side. It always has to come through from the anode side. Diodes transmit energy and that energy turns into heat if it is released, but in the case of LED's, the energy is released as light.
LEDS drain current the brighter they are. So if you are running off a battery, a super bright LED will drain it faster than a lower power LED. LED's are measured for a certain amount of power. If you let it have too much power, it can blow up or burn out. You know it's dead jim, if the LED blinks then turns off, smokes, pops, or doesn't light up whatsoever. Try turning it around if the power consumtion is backwards. Adding a resistor can keep your LED from eating up too much power. Some sites recommend starting around 330ohms for your resistor, or you can also do the math we learned in the Resistance episode of Hak5. Either way, if your LED isn't as bright as it should be, or the resistor is hot to the touch, you're probably resisting too much power, so lower the resistor value. Not sure if a LED works? Take a CR2032 battery (one of those little circular ones that powers stuff like watches, etc - you can find them at all the stores), and stick it between the two legs with the + side of the battery touching the anode leg, and the - side touching the cathode side. It should light up! To choose your LEDs, it's a good idea to take a look at the datasheet that comes with it.
Please watch: "Bash Bunny Primer - Hak5 2225"