Post Summary

This post explains how to install Debian wheezy onto an SD card for use with the Samsung ARM Chromebook (model number XE303C12), and how to compile Linux 3.15-rc7 so that the Chromebook boots with a (mostly) stock Linux kernel.

Creating other filesystems

Three of the other partitions hold target filesystems:

BOOT (/boot)

ROOT (/)

HOME (/home)

The reason that /home is separated is that I encrypted this partition. I did this because being a travel workstation, the probability of loss or theft is higher than a normal workstation. I want to have the peace of mind that comes with not worrying what a theft could mean for my data.

+ mkfs.ext2 /dev/sdb3
mke2fs 1.42.10 (18-May-2014)
mkfs.ext2: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.

then remove and insert your SD card and try again. If that doesn’t work, you might need to write zeroes to the whole SD card and try again. This happened to me when I used my USB SD card reader and writing zeroes to the whole SD card worked for me.

debootstrap Debian wheezy

This is a two stage Debian bootstrap:

first stage is performed on my x86 workstation

second stage is performed on the Chromebook itself

The commands are simple. First, as root, run 03-debootstrap-stage-1.sh to start the first debootstrap stage targeting wheezy:

Next, on the Chromebook, boot into ChromeOS and switch over to the root shell with Ctrl-Alt-F2 (right arrow on esc row). This will only be possible if the Chromebook was switched into developer mode. Connect the Chromebook to the internet, change into /usr/local/, and then save and run 04-debootstrap-stage-2.sh:

Kernel configuration

This was the tricky part for me. Until the Chromebook worked, I had never booted successfully from a Linux kernel I compiled myself.

My process for figuring out which configuration options to choose involved every modification to the kernel configuration being saved into config_good, which was versioned with git. I used the iFixit teardown of the Chromebook as a reference for the components on the motherboard, and found those in the kernel configuration file.

This seemed strange - why wasn’t there a program that would look at my system and select the appropriate kernel configuration options? Turns out that there is:

`make localmodconfig`

Before making this blog post, I had a working Chromebook with Debian on it. So, I scp’ed the linux-3.15-rc7.tar.xz over to the Chromebook, and performed the localmodconfig to get a .config file for the Chromebook automatically! But it didn’t work.

if still stuck, read the section below about UBoot environment variables.

If all that doesn’t help, then I recommend either asking questions in #debian-arm on irc.oftc.net, or email me at jwm @ this domain and I will try to help.

A note about UBoot environment variables

If Linux will not boot, check the UBoot environment variables.

After pressing Ctrl-u, hold space to stop UBoot’s booting process. This drops you into a shell, where you can use commands like printenv and setenv to view and modify environment variables.

nv_uboot-snow-simplefb ships with different environment variables than the non-simplefb version also available from Google. Before using the simplefb version, I used the non-simplefb version. At some point, I must have modified the non-simplefb version’s environment variables and then executed saveenv, saving these to some internal flash.

I had problems until I installed nv_uboot-snow-simplefb and reset the saved environment to what ships with nv_uboot-snow-simplefb:

env default -f
saveenv

Final steps

Encrypting the home partition

No regular user has been created yet. Before creating your day-to-day user id, set up the encrypted home partition.

The lack of page up / page down / insert has been noticeable. I tried using xmodmap to remap those keys but this doesn’t work for me. I am most certainly missing something. For now, I’m using xvkbd instead.

hardware accelerated graphics

There are directions at the debian.org ARMChromebook page for hardware accelerated graphics, but I don’t need the Chromebook to output anything more than text most of the time. Even without the hardware acceleration, video performance is passable for non-HD video.

Acknowledgements

Thanks to Aardvark and hrw on #debian-arm for answering my questions and helping me debug problems.