Skip to content

Instantly share code, notes, and snippets.

@jorrizza
Last active May 27, 2017 16:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorrizza/5387841 to your computer and use it in GitHub Desktop.
Save jorrizza/5387841 to your computer and use it in GitHub Desktop.
Debian on a Samsung ARM Chromebook

Debian on a Samsung ARM Chromebook

Prepare PC

apt-get install cgpt vboot-utils vboot-kernel-utils gdisk multistrap

Enable in developer mode

Information from Chromium

esc + refresh + power

ctrl + d at boot screen

Enable USB boot

When booted, press ctrl + alt + f2 (->). User chronos, no password.

sudo crossystem dev_boot_usb=1

Prepare SD card

Assuming your SD card is /dev/sdc of course.

gdisk /dev/sdc
o
n
<enter>
<enter>
+64M
7f00
n
<enter>
<enter>
<enter>
<enter>
w
mkfs.ext4 /dev/sdc2
mount /dev/sdc2 /mnt/sdc2

Debian Multistrap

For more info see ArmHardFloatChroot and Multistrap.

cat > multistrap.conf
[General]
noauth=true
unpack=true
cleanup=true
arch=armhf
addimportant=true
directory=/mnt/sdc2
debootstrap=Sid
aptsources=Sid

[Sid]
packages=cgpt vboot-utils vboot-kernel-utils wireless-tools iw wpasupplicant
source=http://ftp.nl.debian.org/debian/
suite=sid
^D

multistrap -f multistrap.conf
umount /dev/sdc2

Finish Debian install

Put SD card in chromebook and start a root shell.

mkdir /home/chronos/debian
mount /dev/mmcblk1p2 /home/chronos/debian
cp /boot/vmlinuz-3.4.0 /home/chronos/debian/boot/
cp -r /lib/firmware/* /home/chronos/debian/lib/firmware/
cp -r /lib/modules /home/chronos/debian/lib/
chroot /home/chronos/debian
/var/lib/dpkg/info/dash.preinst install
dpkg --configure -a
passwd root
exit
umount /home/chronos/debian

Take SD card out of chromebook and put back in PC. Somehow vbutil_kernel doesn't work properly on the Chromebook. ERROR: Error calculating body signature.

mount /mnt/sdc2
cd /mnt/sdc2/boot/
cat > kernel_params
console=tty1 printk.time=1 quiet nosplash rootwait root=/dev/mmcblk1p2 rw rootfstype=ext4 lsm.module_locking=0
^D
vbutil_kernel --pack kernel_image --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config kernel_params --vmlinuz vmlinuz-3.4.0 --arch arm
dd if=kernel_image of=/dev/sdc1 bs=4M
cd
umount /mnt/sdc2
cgpt add -S 1 -T 5 -P 12 -i 1 /dev/sdc

Put SD card back into the Chromebook and press ctrl + u. Debian will boot now.

First steps in Debian

Some essential things are missing now. Let's fix /etc/fstab first. We'll reuse the ChromeOS /home for Debian's home partition.

mkdir /mnt/chromeos
cat > /etc/fstab
/dev/mmcblk1p2  /  ext4  defaults  0  1
/dev/mmcblk0p1  /mnt/chromeos  ext4  defaults  0  0
/mnt/chromeos/home  /home  none bind  0  0
^D

A hostname would be nice.

echo chromebook > /etc/hostname
echo 127.0.1.1 chromebook.lan chromebook >> /etc/hosts

Get networking up and running, like in the old days with wpa_supplicant and dhclient. Now install everything you'd like.

For OpenGL ES you need some closed blobs, so I don't want that. Chromium has some nice open drivers for the touchpad and the display adapter. Alternatively you can use xserver-xorg-input-mtrack and xserver-xorg-video-fbdev. These work fine in most cases. Audio has issues. I haven't tried to fix that yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment