Table of Contents
Samsung Google Chromebook
I bought a Samsung Chromebook after enjoying playing with one in person, playing with ChromeOS in a VM and be pissed off that over a 5 hour travel period my otherwise trusty Thinkpad T61 Laptop would not run off battery.
The specific model is the XE303C12. This is the 11.7“, ARM-based computer.
What I Like
- I've always wanted a fully solid state (no fans! no vents!) laptop
- It's open. Really open. No BIOS or uEFI, just uboot. Google themselves provide info on putting your own version of ChromeOS or other OS on it.
- It's ARM. I like this because it's an amusing deviation from the norm.
- 6.5 hour battery life.
- It's $250 for the non-3g version
- It's linux.
- ChromeOS by itself is pretty fantastic.
- They've included Flash, Support for Netflix via proprietary plugin, and various offline apps. All the basic GUI apps are there.
- Adding an archlinux chroot was trivial
- Non-nerfed (it's not USB-based) SD card slot
- The speakers produce impressive sound (both in quality and volume)
What I Don't Like
- The keyboard is missing a lot of keys I'm used to using (home,end,page up, page down, delete). They're available through shortcuts, but because of that you can't do key combos (like ctrl+shift+end or ctrl+shift+home to select from cursor to end of text or beginning of text respectively).
- The SD card slot is shallow and results in a full size SD card sticking out about a cm.
- The generic grey color. Granted, this is pretty minor to me.
- To accommodate ports on the back, the hinge is on top. I'd rather have ports on the side and a smooth top, but this is another minor nit-pick.
Setting Up a Chroot
It's possible to setup the chroot on the internal memory. After a fresh boot there should be about 9gb free. I specifically bought a 32gb SDXC card for running a chroot, and I didn't want to use up all my working freespace on the internal so I did not bother to install it to the internal storage.
Get Your Arch Base
I'm a fan of Archlinux, but really any compatible ARM distro will work. Gentoo and Ubuntu are good options as well.
The Archlinux ARM page has a download for arch, but that's not what I used for my chroot.
This is what I downloaded and it worked, though it may not be the best optimized for the Chromebooks.
Since we don't care about bootloaders or kernels, it doesn't really matter what we use as long as it's ARM 5/6/7/Cortex compatible.
Prep Your SD Card
Partition and format your SD card. I used ext4. How do you do this from windows? Good question. I'd say use a VM and use an i686/x86_64 Arch Linux install image.
fdisk /dev/mmcblk0 mkfs.ext4 /dev/mmcblk0p1
Once you have the card partitioned and formatted, mount it and extract the tar ball.
mount /dev/mmcblk0p1 /mnt tar zxf ArchLinuxARM-am33x-latest.tar.gz -C /mnt
Add these scripts into /mnt
#!/bin/sh # script to 'boot' the arch chroot environment # this should be called from ChromeOS SDCARD=/dev/mmcblk1p1 CHROOTDIR=/home/root/arch mount $SDCARD $CHROOTDIR #make it so the chroot's resolv.conf is the same as chromeos's mount --bind /etc/resolv.conf $CHROOTDIR/etc/resolv.conf chroot $CHROOTDIR /boot.sh &
#!/bin/sh # continuation of arch-boot boot script. # this should be called by the boot-arch.sh script as the first command ran within the chroot #setup paths export PATH=/usr/bin:/usr/sbin #mount FS's mount -t proc proc /proc mount -t sysfs sysfs /sysfs mount -t devtmpfs dev /dev mount -t devpts pts /dev/pts #set hostname hostname $(< /etc/hostname) #launch daemons /usr/sbin/crond & /usr/sbin/sshd &
Reboot into Developer Mode
Short Answer: Press Esc + Refresh + Power. System will reboot. Disable verified mode. Power cycle again. When it boots and warns about switching back to verified mode, press ctrl-D.
Setting Up the Chroot
Once ChromeOS has booted and you're logged it, press ctrl-alt-T to get to crosh. Alternatively you can work out of the frame buffer. Press Ctrl-Alt-Forward (Forward, not right arrow) to get to the framebuffer.
sudo su - mkdir /home/root/arch
Insert your SD card if you have not already. Then try out the boot script
There's still some setup left, but you can chroot into it.
You'll want to set a root password and probably create a non-root user.
The way I access my chroot once I've got everything setup is through Secure Shell / ssh. This limits the amount of commands you have to type before getting into your environment and also does not require you to become root and then drop down (yay for minimizing security risks).
You need to generate some ssh keys
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa
Pretifying Secure Shell
Crosh and Secure Shell both use hterm to deliver the 'in browser' terminal. To change settings on either you must change hterm preferences. The changes are persistent, I believe utilizing the html5's local storage ability.
Since I always work out of tmux, there's no point to keeping that unsightly scroll bar around. I also have pretty good vision (near sighted, anyway) so I can stand to use a smaller font which let's me display more text. Here's how to make these changes as well as a few others.
Open a java console (ctrl-shift-j) from secure shell and then use the following commands to set or check preferences.
Reset to default:
|Bell Sound||audible-bell-sound||term_.prefs_.set('audible-bell-sound', 'http://example.com/bell.ogg')|
|Background color||background-color||term_.prefs_.set('background-color', 'black')|
|Foreground color||foreground-color||term_.prefs_.set('foreground-color', '#fff')|
|Terminal Font Face||font-family||term_.prefs_.set('font-family', 'Lucida Console')|
|Terminal Font Size||font-size||term_.prefs_.set('font-size', 15)|
|Font Smoothing AKA anti-aliasing||font-smoothing||term_.prefs_.set('font-smoothing', 'none')|
|Hide scroll bar||scrollbar-visible||term_.prefs_.set('scrollbar-visible', false)|