Recovery Image
Before changing anything a recovery image should be created. Then Chromeos can be re-installed after the hard drive is changed or if something goes wrong.
To create a recovery image boot up the Chromebook and open the browser. Be sure to login with an actual Google account, the Guest account won’t work. It will will fail at “Extracting recovery image”.
Plug in a usb thumb drive then type in the following url in to the browser.
chrome://imageburner
Follow the steps to create an image. If all goes well you should end with a “Success” message.
Hard Drive Upgrade
Since Chromebooks are primarily web based they don’t need much disc space. However, Linux is not web based, so it is better suited to a larger hard drive. The drive can be upgraded to a 128 GB SSD [2] using these instructions [3].
While the case is open the write-protect screw should be removed [5] as shown at number 7 in this picture [6]. This will be needed when developer mode is enabled and Linux is installed.
Enabling Developer Mode
To enable developer mode first power the computer off. Then hold
Esc + F3/Refresh
and briefly press
Power
It should boot up in to recovery mode. Note, this is the same screen that is encountered when the hard drive was changed. Press ENTER to disable OS verification and then let it perform the process of converting the computer to developer mode. This can take 8 minutes or so.
Once this is complete it will re-boot in to Chromeos again. Before logging in, press
Ctrl + Alt + F2 (right arrow)
to get a command prompt.
To login type
chronos
To become root type
sudo bash
With developer mode enabled it will stop at a prompt with “OS
verification OFF” and then beep after a few seconds and continue. To
bypass this press Ctrl+D
.
Bootloader
Now that developer mode has been enabled, the next step is to enable the SeaBIOS and legacy BIOS for the boot loader.
From the superuser command line
sudo bash
enable the legacy BIOS by using the crossystem
command [5].
crossystem dev_boot_usb=1 dev_boot_legacy=1
This is a Chromeos specific command used to set various options. The
full list of options can be viewed by typing crossystem
with no
arguments.
Next the boot loader needs to be further configured using another Chromeos specific command.
set_gbb_flags.sh 0x489
All the available options can be seen by typing the command with no arguments.
Installing Linux
The usual procedure for installing Debian Linux can now be followed. A usb stick with an amd64 Debian testing netinst image is the simplest to setup.
sudo dd if=debian-jessie-DI-a1-amd64-netinst.iso of=/dev/sdb
Next, shutdown the computer. Then plug in the usb stick and power it
on. At the first splash screen press Ctrl + L
to enter SeaBIOS. Then
press ESC
to get a boot menu where the usb stick can be selected to
boot from. If all goes well the Acer C720 will now be running Debian
Linux.
The screens on bootup can appear somewhat strange compared to a non
Chromebooks. First, the white screen warning about an alternative OS
will be displayed, but SeaBIOS will barge on to the screen. Thanks to
the previous BIOS configurations with crossystem
and
set_gbb_flags.sh
it will proceed on to SeaBIOS without having to press
any keys. At the SeaBIOS prompt ESC can be pressed to select the boot
device but if it is not it will continue on to boot the hard drive.
Since the Debian installer installed Grub it will display the usual Grub
prompt and from here on it is the usual Linux boot screens.
Touchpad
The Acer C720 uses a Cypress APA touchpad. However it does not work because the drivers (chromeos_laptop, chromeos_pstore) in the kernel included with Debian, version 3.14, have not been updated yet. Patches to add support have been created by Benson Leung and are in the process of being accepted. As of this writing, the linux-next branch has the needed patches, so a custom kernel can be compiled [9] to get it working.
When configuring the kernel make sure the following options are set.
CONFIG_CHROME_PLATFORMS=y
CONFIG_CHROMEOS_LAPTOP=m
CONFIG_CHROMEOS_PSTORE=m
CONFIG_MOUSE_CYAPA=m
Key Mapping
The first thing I really disliked about the Acer C720 was where they put the power button. As I was hacking away on some code I hit the delete key and the computer shut off. Sigh. They put the power button where the delete button is on most computers. They certainly didn’t have someone like me working for them because I would have never allowed a shoddy design like that get through.
The first step is to tell systemd
to ignore the power key [10].
Edit /etc/systemd/logind.conf
and add the following line.
HandlePowerKey=ignore
Then restart logind
.
sudo systemctl restart systemd-logind
This is better. But now the window manager, such as Xfce, will pop up a shutdown dialog when the button is pressed.
Suspend/Resume
To get suspend working create the following file
# /etc/modprobe.d/acer-c720.conf
blacklist ehci_hcd
blacklist ehci_pci
options tpm_tis force=1 interrupts=0
Then run depmod
and update-initramfs
. This is necessary to ensure
the black listed modules are not loaded during bootup.
depmod -a && update-initramfs -u
If all works as planned it should suspend and resume and there should be
no error messages dmesg
.
sudo systemctl suspend
(press Power to resume)
(no error messages in dmesg)
References
[1] Acer C720 Chromebook (Amazon)
[2] MyDigitalSSD 128GB (Amazon)
[3] How to upgrade the SSD in your Acer C720 Chromebook
[4] How to Install Linux on an Acer C720 Chromebook (Ubuntu)
[5] Acer C720 Chromebook (archlinux)
[6] Acer C720 write protect screw
[7] debian-installer
[8] Another new Free Software machine: the Acer C720 Chromebook running Debian GNU/Linux
[9] Linux Kernel Notes (jmahler)
[10] Acer C720 Power key and lid switch handling (archlinux)