Difference between revisions of "Chrome OS devices"

From ArchWiki
Jump to navigation Jump to search
(→‎Flashing a custom firmware: John Lewis page says you have to run in chronos user, not with superuser.)
(added linux-max98090 kernel repo)
 
(72 intermediate revisions by 21 users not shown)
Line 1: Line 1:
 
[[Category:Laptops]]
 
[[Category:Laptops]]
[[it:Chromebook]]
+
[[ja:Chrome OS デバイス]]
[[ja:Chromebook]]
 
 
{{Related articles start}}
 
{{Related articles start}}
 +
{{Related|Chrome OS devices/Crostini}}
 
{{Related|Chrome OS devices/Chromebook}}
 
{{Related|Chrome OS devices/Chromebook}}
 
{{Related|Chrome OS devices/Custom firmware}}
 
{{Related|Chrome OS devices/Custom firmware}}
{{Related|Beginner's guide}}
 
 
{{Related|Installation guide}}
 
{{Related|Installation guide}}
 
{{Related|Laptop}}
 
{{Related|Laptop}}
Line 11: Line 10:
 
{{Warning|This article relies on third-party scripts and modifications, and may irreparably damage your hardware or data. Proceed at your own risk.}}
 
{{Warning|This article relies on third-party scripts and modifications, and may irreparably damage your hardware or data. Proceed at your own risk.}}
 
This article was created to provide information on how to get Arch installed on the series of Chrome OS devices built by Acer, HP, Samsung, Toshiba, and Google. Currently this page is being overhauled, and more model specific pages are being built with some of the information listed below.  
 
This article was created to provide information on how to get Arch installed on the series of Chrome OS devices built by Acer, HP, Samsung, Toshiba, and Google. Currently this page is being overhauled, and more model specific pages are being built with some of the information listed below.  
 +
 +
{{Note|This article describes how to install Arch Linux by activating developer mode. For instructions on how to install Arch Linux in a ChromeOS container without having to enable developer mode see [[Crostini]]}}
  
 
== Introduction ==
 
== Introduction ==
  
=== Legacy boot ===
+
=== Legacy Boot Mode ===
 +
 
 +
All recent Intel-based Chrome OS devices (starting with the 2013 Chromebook Pixel) feature a Legacy Boot Mode, designed to allow the user to boot Linux. Legacy Boot Mode has a dedicated firmware region, {{ic|RW_LEGACY}}, which is designed to be user-writeable (hence the 'RW' notation) and is completely separate from the ChromeOS portion of the firmware (ie, it is safe to update and cannot brick the device). It is enabled by the [http://www.coreboot.org/SeaBIOS SeaBIOS] payload of  [http://www.coreboot.org/ coreboot], the open-source firmware used for all Chrome OS devices (with the exception of the first generation of Chromebooks and a few early ARM models).  SeaBIOS behaves like a traditional BIOS that boots into the MBR of the disk, and from there into standard bootloaders like Syslinux and GRUB.
 +
 
 +
Models with a Core-i based SoC (Haswell, Broadwell, Skylake, KabyLake) mostly ship with a functional Legacy Boot Mode payload; updating to a 3rd party build can provide bug fixes and additional features.  Models with an Atom-based SoC (Baytrail, Braswell, Apollolake) have Legacy Boot Mode capability, but do not ship with a RW_LEGACY/SeaBIOS payload (that part of the firmware is blank).  These models require a 3rd party RW_LEGACY firmware to be loaded for Legacy Boot Mode to be functional.
 +
 
 +
 
 +
==== Models without Legacy Boot Mode/SeaBIOS ====
  
Some of the newer Chrome OS devices (Intel's Haswell and Broadwell based models) feature a "legacy boot" mode that makes it easier to boot Linux and other operating systems. The legacy boot mode is provided by the [http://www.coreboot.org/SeaBIOS SeaBIOS] payload of  [http://www.coreboot.org/ Coreboot], which is the firmware for the Intel based Chrome OS devices (with the exception of the first generation of Chromebooks). SeaBIOS behaves like a traditional BIOS that boots into the MBR of the disk, and from there into standard bootloaders like Syslinux and GRUB.
+
One of the following approaches can be taken in order to install Arch Linux on Chrome OS devices which did not ship with SeaBIOS as part of the installed firmware:
  
On the Chrome OS devices that shipped with SeaBIOS, the installation process of Arch Linux should be similar with a few minor adjustments.
+
* If the device supports Legacy Boot Mode, but does not ship with a functional {{ic|RW_LEGACY}} payload (or doesn't ship with one at all), one can flash a SeaBIOS payload to the {{ic|RW_LEGACY}} part of the firmware. This is 100% safe, as it writes to a user-writeable area of the firmware image which is completely separate from/does not affect ChromeOS.  The easiest way to install/update the RW_LEGACY firmware on your ChromeOS device is via MrChromebox's [[Chrome_OS_devices/Custom_firmware#Flashing_with_MrChromebox.27s_Firmware_Utility_Script|Firmware Utility Script]], which supports the widest range of devices and offers the most up-to-date SeaBIOS builds; one can also update the {{ic|RW_LEGACY}} firmware manually with Chrome OS' {{ic|flashrom}} (requires downloading/compiling your own build), or use John Lewis' {{ic|flash_chromebook_rom.sh}} script (no longer supported).
  
==== Models without SeaBIOS ====
+
* Flash a full [[Custom firmware for Chrome OS devices|custom firmware]] which includes either a SeaBIOS or UEFI payload, and removes all the ChromeOS-specific parts.
  
One of the following approaches can be taken in order to install Arch Linux on Chrome OS devices that did not shipped with SeaBIOS as part of the installed firmware:
+
* Flash the {{ic|BOOT_STUB}} part of the firmware. This method replaces the stock ChromeOS payload (depthcharge) with SeaBIOS. This is theoretically a safer approach than flashing the full firmware but there might be some limitations (e.g. no support in suspend or VMX). This is the {{ic|Modify ROM to run SeaBIOS exclusively}} option in John Lewis' {{ic|flash_chromebook_rom.sh}} script and {{ic|Flash BOOT_STUB firmware}} option in MrChromebox's.
  
* With a very few models it is possible to only flash a SeaBIOS payload to the {{ic|RW_LEGACY}} part of the firmware flash memory (e.g. Acer C740, Acer C910 and Google Chromebook Pixel 2), it is possible to update the {{ic|RW_LEGACY}} manually with Chrome OS' {{ic|flashrom}} or leave it to John Lewis' {{ic|flash_chromebook_rom.sh}} script to flash SeaBIOS if the script support for a specific device is limited to {{ic|RW_LEGACY}} update, the advantage with this method is that the stock firmware is not changed (as {{ic|RW_LEGACY}} was missing).
 
* Flash a full [[Custom firmware for Chrome OS devices|custom firmware]] which includes a SeaBIOS payload.
 
* Only write to the {{ic|BOOT_STUB}} part of the firmware flash memory, this method adds a SeaBIOS payload and update the firmware to only load this payload, it is a much safer approach than flashing the full firmware but there might be some limitations (e.g. no support in suspend or VMX), this is the {{ic|Modify ROM to run SeaBIOS exclusively}} option in John Lewis' {{ic|flash_chromebook_rom.sh}} script.
 
 
* Take the ChrUbuntu approach which uses the Chrome OS kernel and modules.
 
* Take the ChrUbuntu approach which uses the Chrome OS kernel and modules.
 +
 
* Build and sign your own kernel, see [https://plus.google.com/+OlofJohansson/posts/34PYU79eUqP] [http://pomozok.wordpress.com/2014/10/11/building-chromeos-kernel-without-chroot/] [https://github.com/drsn0w/chromebook_kernel_tools/blob/master/install_linux.md].
 
* Build and sign your own kernel, see [https://plus.google.com/+OlofJohansson/posts/34PYU79eUqP] [http://pomozok.wordpress.com/2014/10/11/building-chromeos-kernel-without-chroot/] [https://github.com/drsn0w/chromebook_kernel_tools/blob/master/install_linux.md].
The [[#Installation|Installation]] process described on this page tries to cover the method of installing Arch Linux on these non SeaBIOS models by flashing a custom firmware.
+
 
 +
The [[#Installation|Installation]] process described on this page tries to cover the method of installing Arch Linux on models without SeaBIOS by flashing a custom firmware.
  
 
=== Firmware write protection intro ===
 
=== Firmware write protection intro ===
  
All Chrome OS devices features a firmware write protection. It is important to be aware of it as one might need to disable the write protection as part of the installation process (to update GBB flags or flash a custom firmware).
+
All Chrome OS devices features firmware write protection, which restricts write access to certain regions of the flash chip. It is important to be aware of it as one might need to disable the hardware write protection as part of the installation process (to update GBB flags or flash a custom firmware).
  
 
For more details see [[Custom firmware for Chrome OS devices#Firmware write protection|Firmware write protection]].
 
For more details see [[Custom firmware for Chrome OS devices#Firmware write protection|Firmware write protection]].
Line 40: Line 47:
  
 
* You should claim your free 100GB-1TB of Google Drive space before you install Arch. This needs to happen from ChromeOS(version > 23), not linux. This will sync/backup ChromeOS, as designed
 
* You should claim your free 100GB-1TB of Google Drive space before you install Arch. This needs to happen from ChromeOS(version > 23), not linux. This will sync/backup ChromeOS, as designed
* Visit the ArchWiki page for your [[#Chrome_OS_devices|Chrome OS device]].
+
* Visit the ArchWiki page for your [[#Chrome OS devices|Chrome OS device]].
* If there is no ArchWiki page for your device then before proceeding, gather information about the device and if you succeed in installing Arch Linux, then consider adding a new ArchWiki page for your model (you can use the [[Acer_C720_Chromebook|Acer C720]] as an example for device shipped with SeaBios or the [[Acer_C710_Chromebook|Acer C710]] as device that did not shipped with it).
+
* If there is no ArchWiki page for your device then before proceeding, gather information about the device and if you succeed in installing Arch Linux, then consider adding a new ArchWiki page for your model (you can use the [[Acer C720]] as an example for device shipped with SeaBios or the [[Acer_C710_Chromebook|Acer C710]] as device that did not ship with it).
 
* Read this guide completely and make sure you understand all the steps before making any changes.
 
* Read this guide completely and make sure you understand all the steps before making any changes.
  
Line 55: Line 62:
 
== Installation ==
 
== Installation ==
  
{{Warning|Installation on Chrome OS devices that do not ship with SeaBIOS requires flashing a custom firmware, a process that may brick your device. Proceed at your own risk.}}
+
{{Warning|Installation on ChromeOS devices that do not ship with SeaBIOS requires flashing a custom firmware, certain types of which have the potential to brick your device. Proceed at your own risk.}}
  
{{Note|While the following information should fit all the Chrome OS devices with Coreboot firmware (shipped with SeaBIOS payload or without), it is possible that with some models you may need to make further adjustments.}}
+
{{Note|While the following information should fit all the ChromeOS devices with coreboot firmware (shipped with SeaBIOS payload or without), it is possible that with some models you may need to make further adjustments.}}
  
 
The general installation procedure:
 
The general installation procedure:
 
* Enable developer mode.
 
* Enable developer mode.
* Chrome OS device with SeaBIOS:
+
* ChromeOS device with functional Legacy Boot Mode/SeaBIOS:
** Enable legacy boot / SeaBIOS.
+
** Enable Legacy Boot Mode.
** Set SeaBIOS as default (optional but recommended, requires disabling the write protection).
+
** Set SeaBIOS as default (optional but highly recommended, requires disabling the write protection).
* Chrome OS device without SeaBIOS:
+
* ChromeOS device without functional Legacy Boot Mode:
** Flash a custom firmware.
+
** Flash one of the following types of custom firmware
 +
*** Flash RW_LEGACY firmware (zero risk)
 +
*** Flash BOOT_STUB firmware (very low risk).
 +
*** Flash Full custom firmware (low risk).
 
* Prepare the installation media.
 
* Prepare the installation media.
 
* Boot Arch Linux installation media and install Arch.
 
* Boot Arch Linux installation media and install Arch.
Line 71: Line 81:
 
=== Enabling developer mode ===
 
=== Enabling developer mode ===
  
[http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/acer-c720-chromebook#TOC-Developer-Mode Developer Mode] is necessary in order to access the superuser shell inside Chrome OS, which is required for making changes to the system like allow booting through SeaBIOS.
+
[http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/acer-c720-chromebook#TOC-Developer-Mode Developer Mode] is necessary in order to access the superuser shell inside ChromeOS, which is required for making changes to the system like allow booting through SeaBIOS.
  
 
{{Warning|Enabling Developer Mode will wipe all of your data.}}
 
{{Warning|Enabling Developer Mode will wipe all of your data.}}
Line 77: Line 87:
 
To enable developer mode:  
 
To enable developer mode:  
  
* Turn on the Chrome OS device.
 
 
* Press and hold the {{ic|Esc + F3 (Refresh)}} keys, then press the {{ic|Power}} button. This enters Recovery Mode.
 
* Press and hold the {{ic|Esc + F3 (Refresh)}} keys, then press the {{ic|Power}} button. This enters Recovery Mode.
 +
** Chromeboxes have a dedicated Recovery button, which should be pressed/held while powering on
 
* Press {{ic|Ctrl + D}} (no prompt). It will ask you to confirm, then the system will revert its state and enable Developer Mode.
 
* Press {{ic|Ctrl + D}} (no prompt). It will ask you to confirm, then the system will revert its state and enable Developer Mode.
{{Note|Press {{ic|Ctrl + D}} (or wait 30 seconds for the beep and boot) at the white boot splash screen to enter Chrome OS.}}
+
{{Note|Press {{ic|Ctrl + D}} (or wait 30 seconds for the beep and boot) at the white boot splash screen to enter ChromeOS.}}
  
 
=== Accessing the superuser shell ===
 
=== Accessing the superuser shell ===
  
After you have enabled the Developer Mode you will need to access the superuser shell. How you do this depends on whether you have configured Chrome OS or not.
+
After you have enabled the Developer Mode you will need to access the superuser shell. How you do this depends on whether you have configured ChromeOS or not.
  
==== Accessing the superuser shell without Chrome OS configuration ====
+
==== Accessing the superuser shell without logging into ChromeOS ====
  
If you have not configured Chrome OS, just press {{ic|Ctrl + Alt + F2}} (F2 is the "forward" arrow on the top row, →), you will see a login prompt.
+
If you have not configured ChromeOS, just press {{ic|Ctrl + Alt + F2}} (F2 is the "forward" arrow on the top row, →), you will see a login prompt.
  
 
* Use {{ic|chronos}} as the username, it should not prompt you for a password.
 
* Use {{ic|chronos}} as the username, it should not prompt you for a password.
* Become superuser with {{ic|sudo bash}}.
+
* Become superuser with [[sudo]], use the command {{ic|sudo su -}}.
  
==== Accessing the superuser shell with Chrome OS configuration ====
+
==== Accessing the superuser shell when logged into ChromeOS ====
  
If you have configured Chrome OS already:
+
If you have configured ChromeOS already:
  
 
* Open a crosh window with {{ic|Ctrl + Alt + T}}.
 
* Open a crosh window with {{ic|Ctrl + Alt + T}}.
 
* Open a bash shell with the {{ic|shell}} command.
 
* Open a bash shell with the {{ic|shell}} command.
* Become superuser with {{ic|sudo bash}}
+
* Become superuser with [[sudo]], use the command {{ic|sudo su -}} to accomplish that.
  
=== Enabling SeaBIOS ===
+
=== Enabling Legacy Boot Mode ===
  
If your Chrome OS device did not ship with SeaBIOS or you prefer to install a custom firmware, then continue to [[#Flashing a custom firmware|Flashing a custom firmware]].
+
If your ChromeOS device did not ship with Legacy Boot Mode support via SeaBIOS, or you prefer to install a custom firmware, then continue to [[#Flashing a custom firmware|Flashing a custom firmware]].
  
This method will allow you to access the pre-installed version of SeaBIOS through the Developer Mode screen in Coreboot.
+
This will enable the pre-installed version of SeaBIOS through the Developer Mode screen in coreboot.
  
 
* Inside your superuser shell enter:
 
* Inside your superuser shell enter:
  # crossystem dev_boot_usb=1 dev_boot_legacy=1
+
  # crossystem dev_boot_legacy=1
 
* Reboot the machine.
 
* Reboot the machine.
  
 
You can now start SeaBIOS by pressing {{ic|Ctrl + L}} at the white boot splash screen.
 
You can now start SeaBIOS by pressing {{ic|Ctrl + L}} at the white boot splash screen.
  
{{Note|If you intend to stay using pre-installed SeaBIOS route and think you will not appreciate having to press {{ic|Ctrl + L}} every time you boot to reach SeaBIOS then you can set Coreboot to boot to SeaBIOS by default. This currently must be done inside of Chrome OS and requires disabling the write protection (hardware and software), it might be a good idea to do this now so that you will not have to re-install Chrome OS later with recovery install media. If you are choosing to keep Chrome OS (installing Arch on external storage or  [[#Alternative installation, Install Arch Linux in addition to Chrome OS|on the internal storage side by side with Chrome OS]] then set SeaBIOS to default later.}}
+
{{Note|If you intend to stay using pre-installed SeaBIOS route and think you will not appreciate having to press {{ic|Ctrl + L}} every time you boot to reach SeaBIOS, then you can set coreboot to boot to SeaBIOS by default. This requires disabling the hardware firmware write protection.}}
  
You should now have SeaBIOS enabled on your Chrome OS device, if you choose to not set it as default then you can continue to [[#Installing Arch Linux|Installing Arch Linux]].
+
You should now have SeaBIOS enabled on your ChromeOS device, if you choose to not set it as default then you can continue to [[#Installing Arch Linux|Installing Arch Linux]].
  
 
==== Boot to SeaBIOS by default ====
 
==== Boot to SeaBIOS by default ====
  
To boot SeaBIOS by default, you will need to run [https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/master/scripts/image_signing/set_gbb_flags.sh {{ic|set_gbb_flags.sh}}] in Chrome OS (already included in Chrome OS, it will not work correctly in Arch Linux).
+
To boot SeaBIOS by default, you will need to run the [https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/master/scripts/image_signing/set_gbb_flags.sh {{ic|set_gbb_flags.sh}}] script, which is part of ChromeOS. The script uses flashrom and gbb_utility to read the RO_GBB firmware region, modify the flags, and write it back to flash. The GBB flags can also be set using MrChromebox's [https://mrchromebox.tech/#fwscript Firmware Utility Script] under either ChromeOS or Arch (the latter requiring booting with specific kernel parameters to relax memory access restrictions).
  
{{Warning|If you do not set the GBB flags then your system might become corrupted on empty battery, resetting {{ic|dev_boot_usb}} {{ic|dev_boot_legacy}} to their default values, forcing you to recover Chrome OS and wiping your Arch Linux installation on the internal storage, though it might be possible to modify Chrome OS recovery image to set these values again [http://dev.chromium.org/chromium-os/developer-information-for-chrome-os-devices/workaround-for-battery-discharge-in-dev-mode].}}
+
{{Warning|If you do not set the GBB flags, then a fully discharged or disconnected battery will reset {{ic|dev_boot_legacy}} crossystem flag to its default value, removing the ability to boot in Legacy Boot Mode.  While this used to require you to recover Chrome OS and wipe your Arch Linux installation on the internal storage, the GalliumOS developers have created a set of "fixflags" recovery images, which rather than wiping internal storage, will instead simply re-set the {{ic|dev_boot_legacy}} crossystem flag. See [https://galliumos.org/fixflags galliumos.org/fixflags]}}
 
 
{{Warning|If you do not disable the write protection before setting the GBB flags you endanger wiping out the RW-LEGACY part of the firmware (i.e. SeaBIOS) and your system might not boot (should be recoverable with Chrome OS recovery media). Updated versions of [https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/master/scripts/image_signing/set_gbb_flags.sh {{ic|set_gbb_flags.sh}}] will not let you set the GBB flags without disabling the write protection.}}
 
  
 
* Disable the hardware write protection.
 
* Disable the hardware write protection.
  
To find the location of the hardware write-protect screw/switch/jumper and how to disable it visit the ArchWiki page for your [[#Chrome_OS_devices|Chrome OS device]]. If there is no information about your device on the ArchWiki then turn to [http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devicesDeveloper Information for Chrome OS Devices] and [http://www.coreboot.org/Chromebooks Coreboot's Chromebooks page].
+
To find the location of the hardware write-protect screw/switch/jumper and how to disable it visit the ArchWiki page for your [[#Chrome OS devices|ChromeOS device]]. If there is no information about your device on the ArchWiki then turn to [http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices Developer Information for ChromeOS Devices] and [http://www.coreboot.org/Chromebooks coreboot's Chromebooks page].
  
More information about the firmware protection available at the [[Custom firmware for Chrome OS devices#Firmware write protection|Custom firmware for Chrome OS devices]] page.
+
More information about the firmware protection available at the [[Custom firmware for ChromeOS devices#Firmware write protection|Custom firmware for ChromeOS devices]] page.
  
* Inside your [[#Accessing_the_superuser_shell|superuser shell]] enter:
+
* Switch to the [[#Accessing the superuser shell|superuser shell]].
# sudo su
 
  
 
* Disable the software write protection.
 
* Disable the software write protection.
Line 141: Line 148:
  
 
* Run {{ic|set_gbb_flags.sh}} with no parameters.
 
* Run {{ic|set_gbb_flags.sh}} with no parameters.
  # set_gbb_flags.sh
+
  # /usr/share/vboot/bin/set_gbb_flags.sh
  
{{Note|Recent versions of Chrome OS have moved the script to /usr/share/vboot/bin/set_gbb_flags.sh which is not in $PATH by default.}}
+
* This will list all of the available flags.  The ones of interest to us are:
 
 
* Make sure you get the following output, see [https://johnlewis.ie/how-to-make-seabios-the-default-on-your-acer-c720/].
 
 
  GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001
 
  GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001
 
  GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008
 
  GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008
Line 151: Line 156:
 
  GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400
 
  GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400
  
* Now set SeaBIOS as default.
+
* So, to set SeaBIOS as default, with a 1s timeout, prevent accidentally exiting Developer Mode via spacebar, and ensure Legacy Boot Mode remains enabled in the event of battery drain/disconnect, we set the flags as such:
  # set_gbb_flags.sh 0x489
+
  # /usr/share/vboot/bin/set_gbb_flags.sh 0x489
  
 
* Enable back the software write protection.
 
* Enable back the software write protection.
 
  # flashrom --wp-enable
 
  # flashrom --wp-enable
  
Your Chrome OS device now will boot to SeaBIOS by default, you can continue to [[#Installing Arch Linux|Installing Arch Linux]], if your device is booting correctly then you should re-enable the hardware write protection.
+
{{Note|All of these steps are automated by MrChromebox's Firmware Utility Script, so if using that to install/update your RW_LEGACY firmware, easiest to just set the flags via the script as well.}}
 +
 
 +
Your ChromeOS device now will boot to SeaBIOS by default, you can continue to [[#Installing Arch Linux|Installing Arch Linux]], if your device is booting correctly then you can optionally re-enable the hardware write protection.
  
 
=== Flashing a custom firmware ===
 
=== Flashing a custom firmware ===
  
{{Note|The following steps explain how to flash a custom firmware from Chrome OS, for information on how to flash a custom firmware from Arch Linux visit the [[Custom firmware for Chrome OS devices]] page}}
+
{{Note|The following steps explain how to flash a custom firmware from ChromeOS, for information on how to flash a custom firmware from Arch Linux visit the [[Custom firmware for ChromeOS devices]] page}}
  
 
* Disable the hardware write protection.
 
* Disable the hardware write protection.
  
To find the location of the hardware write-protect screw/switch/jumper and how to disable it visit the ArchWiki page for your [[#Chrome_OS_devices|Chrome OS device]]. If there is no information about your device on the ArchWiki then turn to [http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devicesDeveloper Information for Chrome OS Devices] and [http://www.coreboot.org/Chromebooks Coreboot's Chromebooks page].
+
To find the location of the hardware write-protect screw/switch/jumper and how to disable it visit the ArchWiki page for your [[#Chrome OS devices|ChromeOS device]]. If there is no information about your device on the ArchWiki then turn to [http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devicesDeveloper Information for ChromeOS Devices] and [http://www.coreboot.org/Chromebooks coreboot's Chromebooks page].
  
More information about the firmware protection available at the [[Custom firmware for Chrome OS devices#Firmware write protection|Custom firmware for Chrome OS devices]] page.
+
More information about the firmware protection available at the [[Custom firmware for ChromeOS devices#Firmware write protection|Custom firmware for ChromeOS devices]] page.
  
* Enter the command shown on the [https://johnlewis.ie/custom-chromebook-firmware/rom-download/ Download ROM page at John Lewis site].
+
* Enter the command to run either MrChromebox's or John Lewis's firmware script.
  
{{Note|The reason for not posting here is to force you to visit the site and read the page before proceeding.}}
+
{{Note|The reason for not posting here is to force you to visit the site and read the instructions before proceeding.}}
  
* After the script exited copy the backed up firmware to an external storage before rebooting the system.
+
* After the exiting the script, be sure to copy the backed up firmware to an external storage before rebooting the system (if the script doesn't provide that option for you).
  
 
You should now have a custom firmware installed on your device, cross your fingers and reboot.
 
You should now have a custom firmware installed on your device, cross your fingers and reboot.
Line 183: Line 190:
 
==== Preparing the installation media ====
 
==== Preparing the installation media ====
  
Create an [https://wiki.archlinux.org/index.php/USB_Flash_Installation_Media Arch Linux Installer USB drive].
+
Create an [[USB flash installation media|Arch Linux Installer USB drive]].
 +
 
 +
{{Note|If the USB loads but fails to boot into Arch, it may be due a bug in the syslinux the current (2017.03.01) installer uses. The 2016.11.01 version from the [[Arch Linux Archive]] will work until the issue is resolved.}}
  
 
==== Booting the installation media ====
 
==== Booting the installation media ====
  
* Plug the USB drive to the Chrome OS device and start SeaBIOS with {{ic|Ctrl + L}} at the white boot splash screen (if SeaBIOS is not set as default).
+
* Plug the USB drive to the ChromeOS device and start SeaBIOS with {{ic|Ctrl + L}} at the white boot splash screen (if SeaBIOS is not set as default).
 
* Press {{ic|Esc}} to get a boot menu and select the number corresponding to your USB drive.
 
* Press {{ic|Esc}} to get a boot menu and select the number corresponding to your USB drive.
  
The Arch Linux installer boot menu should appear and the installation process can [[Beginners%27_guide#Installation|proceed as normal]].
+
The Arch Linux installer boot menu should appear and the [[Installation guide|installation]] process can proceed as normal.
  
{{Note|For now choose [[Beginners%27_guide#For_BIOS_motherboards|GRUB]] as your bootloader: you can choose MBR or GPT [[Beginners%27_Guide#Partition schemes|partitioning schemes]]. If you choose GPT then do not forget to add a [[GRUB#GUID_Partition_Table_.28GPT.29_specific_instructions|BIOS Boot Partition]]. Also see [[#Syslinux|Known Issues]].}}
+
{{Note|For now choose [[GRUB]] as your bootloader: you can choose MBR or GPT: [[Partitioning]]. If you choose GPT then do not forget to add a [[GRUB#GUID_Partition_Table_.28GPT.29_specific_instructions|BIOS Boot Partition]]. Also see [[#Syslinux|Known Issues]].}}
  
 
After finishing installing Arch Linux continue by following the [[#Post installation configuration|Post Installation Configuration]].
 
After finishing installing Arch Linux continue by following the [[#Post installation configuration|Post Installation Configuration]].
 
==== Alternative installation, Install Arch Linux in addition to Chrome OS ====
 
 
{{Poor writing|needs more details and convert the use of the script to manually re-partitioning steps with cgpt}}
 
 
It is possible to have both Arch Linux and Chrome OS installed on the internal drive.
 
 
===== Re-partition the drive =====
 
 
In order to partition the drive, we will run the first stage of the ChruBuntu script in Chrome OS. After logging in, open a shell with {{ic|Ctrl + Alt + T}}, run {{ic|shell}}, then {{ic|cd ~/}} to enter the home directory. Once there, run the following:
 
 
curl -L -O http://goo.gl/9sgchs; sudo bash 9sgchs
 
 
It will ask how much space to partition for the alternate partition. 8GB is a safe number for the 16GB SSD. More than 9 may not work.
 
 
===== Fixing the filesystem =====
 
 
Reboot the system so Chrome OS will repair the filesystem after the previous re-partitioning process.
 
Once this is done, verify that the disk space has been reduced by opening a file manager and clicking the gear in the top right of the window.
 
 
===== Continue the installation process =====
 
 
[[#Installing Arch Linux|Continue the installation process]] but instead of wiping the internal drive and creating a new filesystem you should install Arch to the existing empty partition that we designated for Arch in the previous step.
 
 
So after booting the installation media:
 
 
* Run the command {{ic|fdisk -l}} to list drives and partitions. Find the internal drive and note the name of the partition matching the size you specified in the ChrUbuntu script.
 
* Use {{ic|mkfs.ext4 /dev/sdxY}} (where xY is drive letter and partition number, eg. /dev/sda7) This will create the filesystem for arch.
 
* Following the [https://wiki.archlinux.org/index.php/GRUB2#GUID_Partition_Table_.28GPT.29_specific_instructions instructions for installing GRUB on GPT], use gdisk to create a 1007kb partition and set the type to EF02.
 
 
{{Note|Contrary to what some people say, the grub partition does NOT need to be the first partition on the disk. The existing ChromeOS partitions make this difficult to do anyways.}}
 
 
===== Choosing between Arch Linux and Chrome OS =====
 
 
Reboot your system and press {{ic|Ctrl + l}} to load SeaBIOS in order to boot into Arch, or press {{ic|Ctrl + d}} in order to boot into ChromeOS.
 
 
Now you can also [[#Boot_to_SeaBIOS_by_default|set SeaBIOS as default]] (or even later as you are keeping Chrome OS).
 
  
 
== Post installation configuration ==
 
== Post installation configuration ==
Line 238: Line 210:
 
{{Note|You can most likely ignore this section unless your device requires patched kernel support.}}
 
{{Note|You can most likely ignore this section unless your device requires patched kernel support.}}
  
Since kernel 4.0 it is recommended to use the official {{Pkg|linux}} package for most Chrome OS devices with the exception being newer devices which might need patched kernel support such as the Chromebook Pixel 2015.
+
It is recommended to use the official {{Pkg|linux}} package for most Chrome OS devices with the exception being newer devices which might need patched kernel support such as the Chromebook Pixel 2015.
 
 
{{AUR|linux-chromebook}}{{Broken package link|{{aur-mirror|linux-chromebook}}}} previously provided patches necessary for most Chrome OS devices, since kernel 3.18 it is no longer maintained as all patches have been merged upstream since kernel 4.0, it will
 
likely cease to be supported further unless future devices require it.
 
  
 
{{AUR|linux-samus4}} provides patches for the Chromebook Pixel 2015 to fix touchpad, touchscreen, and sound functionality which has not been merged into upstream linux yet. More information is available at [https://github.com/raphael/linux-samus its GitHub page].
 
{{AUR|linux-samus4}} provides patches for the Chromebook Pixel 2015 to fix touchpad, touchscreen, and sound functionality which has not been merged into upstream linux yet. More information is available at [https://github.com/raphael/linux-samus its GitHub page].
  
If your devices requires a patched kernel, it is advised to review the list of patches and decide if the patch list is getting decidedly small enough that you no longer require a patched kernel and instead you can use the official {{Pkg|linux}} package instead.
+
If your devices requires a patched kernel, it is advised to review the list of patches and decide if the patch list is getting decidedly small enough that you no longer require a patched kernel and instead you can use the official {{Pkg|linux}} package instead.  
  
==== Installing the patched kernel package ====
+
See [[kernels]] for more information.
 
 
* [[Arch_User_Repository#Installing_packages|Build from AUR]].
 
* You might want to remove {{Pkg|linux}} package (though it is not mandatory).
 
# pacman -R linux
 
* [[Arch_User_Repository#Installing_packages|Install]] the patched kernel package.
 
# pacman -U linux*chromebook*.pkg.tar.xz
 
* [[GRUB#Generate_the_main_configuration_file|Rebuild your grub config]].
 
  
 
=== Video driver ===
 
=== Video driver ===
Line 262: Line 224:
 
=== Touchpad and touchscreen ===
 
=== Touchpad and touchscreen ===
  
See [[Touchpad Synaptics]] and [[Touchscreen]].
+
See [[Touchpad Synaptics]], [[libinput]], and [[Touchscreen]].
  
 
==== Touchpad and touchscreen kernel modules ====
 
==== Touchpad and touchscreen kernel modules ====
Line 270: Line 232:
 
===== What to do if your touchpad or touchscreen is not supported? =====
 
===== What to do if your touchpad or touchscreen is not supported? =====
  
* Review the list of patches in {{Aur|linux-chromebook}}{{Broken package link|{{aur-mirror|linux-chromebook}}}}, if a related patch for your Chromebook model exist then [[#Patched_kernels|install this package]].
+
* Review the list of patches in {{Aur|linux-chromebook}}{{Broken package link|{{aur-mirror|linux-chromebook}}}}, if a related patch for your Chromebook model exist then [[#Patched kernels|install this package]].
 
* If there is no such patch do not worry as the developers should be able to add it by request as the Chromium OS sources includes the related changes.
 
* If there is no such patch do not worry as the developers should be able to add it by request as the Chromium OS sources includes the related changes.
 
* You can also try to find the related commits by yourself and create a proper patch, some hints:
 
* You can also try to find the related commits by yourself and create a proper patch, some hints:
Line 283: Line 245:
 
There are few options how to set the touchpad:
 
There are few options how to set the touchpad:
  
* Visit the ArchWiki page for your Chromebook model (see [[#Chromebook_Models|Chromebook models]]) for touchpad xorg.conf.d file.
+
* Visit the ArchWiki page for your Chromebook model (see [[#Chromebook_Models|Chromebook models]]{{Broken section link}}) for touchpad xorg.conf.d file.
* Use a [[Touchpad_Synaptics#Configuration_on_the_fly|touchpad configuration tool]] like [[Touchpad_Synaptics#Graphical_tools|Synaptics]] for [[KDE]], although it is said to be currently unmaintained and seems to crash under KDE 4.11, it works well with KDE 4.12.2. Another utility, {{AUR|kcm_touchpad}}{{Broken package link|{{aur-mirror|kcm_touchpad}}}}, does not work at all.
+
* Use a [[Touchpad_Synaptics#Configuration_on_the_fly|touchpad configuration tool]].
  
 
==== Chromium OS input drivers ====
 
==== Chromium OS input drivers ====
 +
 +
{{Out of date|{{ic|xf86-input-cmt}} development is not active and it is probably not needed anymore in any case since [[libinput]]'s compatibility with Chrome OS devices's touchpads is fairly good.}}
  
 
{{AUR|xf86-input-cmt}} offers a port of the Chromium OS input driver: [https://github.com/hugegreenbug/xf86-input-cmt xf86-input-cmt] as an alternative for the [[Synaptics|Synaptics input driver]]. It provides tweaked configuration files for most devices, and provides functionality that the [[Synaptics|Synaptics input driver]] does not such as palm rejection. Additionally, it enables functionality not enabled by default in the Chromium OS input driver such as tap-to-drag.
 
{{AUR|xf86-input-cmt}} offers a port of the Chromium OS input driver: [https://github.com/hugegreenbug/xf86-input-cmt xf86-input-cmt] as an alternative for the [[Synaptics|Synaptics input driver]]. It provides tweaked configuration files for most devices, and provides functionality that the [[Synaptics|Synaptics input driver]] does not such as palm rejection. Additionally, it enables functionality not enabled by default in the Chromium OS input driver such as tap-to-drag.
  
 
Please note, the input driver does not work under [https://github.com/hugegreenbug/xf86-input-cmt/issues/5 some circumstances] where you have insufficient permissions to access {{ic|/dev/input/event}}
 
Please note, the input driver does not work under [https://github.com/hugegreenbug/xf86-input-cmt/issues/5 some circumstances] where you have insufficient permissions to access {{ic|/dev/input/event}}
This will affect you if you use [https://wiki.archlinux.org/index.php/Xinitrc startx] to load a DE/WM session.
+
This will affect you if you use [[startx]] to load a DE/WM session.
 
If this is the case or if the driver does not load for any other cases, you should run:
 
If this is the case or if the driver does not load for any other cases, you should run:
 
  # usermod -a -G input $USER
 
  # usermod -a -G input $USER
 
Where $USER is the current user wanting to use the input driver.
 
Where $USER is the current user wanting to use the input driver.
 
   
 
   
It should also be noted that some users have reported the driver does not work in [https://wiki.archlinux.org/index.php/GDM GDM] but works normally after log in.
+
It should also be noted that some users have reported the driver does not work in [[GDM]] but works normally after log in.
 
If you are affected by this, you should run:
 
If you are affected by this, you should run:
 
  # usermod -a -G input gdm
 
  # usermod -a -G input gdm
Line 306: Line 270:
  
 
The following are instructions to fix the suspend functionality.
 
The following are instructions to fix the suspend functionality.
Even if you are using a pre-installed SeaBIOS or John Lewis' pre-built SeaBIOS you will still need this fix.
+
Users of a pre-installed SeaBIOS or John Lewis' pre-built SeaBIOS you will need this fix.
 +
This procedure is not needed with Matt DeVillier's custom firmware since problematic ACPI wake devices (such as {{ic|TPAD}}) are firmware-disabled.
  
 
There have been a few alternatives discussed and those may work better for some. [https://bbs.archlinux.org/viewtopic.php?pid=1364376#p1364376] [https://bbs.archlinux.org/viewtopic.php?pid=1364521#p1364521]
 
There have been a few alternatives discussed and those may work better for some. [https://bbs.archlinux.org/viewtopic.php?pid=1364376#p1364376] [https://bbs.archlinux.org/viewtopic.php?pid=1364521#p1364521]
Line 350: Line 315:
 
}}
 
}}
  
First start the service.
+
First [[start]] {{ic|suspend-fix.service}}. If it properly starts, then [[enable]] it to be started on bootup.
# systemctl start suspend-fix.service
+
 
If it properly starts, then allow it to be started on bootup.
 
# systemctl enable suspend-fix.service
 
 
Add the following line at the end of {{ic|/etc/rc.d/rc.local}} (if it does not exist, just create it) to prevent bad handling of EHCI USB:
 
Add the following line at the end of {{ic|/etc/rc.d/rc.local}} (if it does not exist, just create it) to prevent bad handling of EHCI USB:
  
Line 389: Line 352:
  
 
=== Fixing audio ===
 
=== Fixing audio ===
 +
 +
==== Baytrail based models ====
 +
 +
Audio on most baytrail models should work on {{Pkg|linux}} since fix merged into 4.19.7 [https://git.archlinux.org/linux.git/commit/?h=v4.19.7-arch1&id=f35f68c68ce48a8b70a4c3674663513825b7a1bc], to fix regression in 4.18.15, see bug report [https://lkml.org/lkml/2018/10/30/676].
 +
 +
{{Note|If you find audio is less stable (see journal PLL mesages) using {{Pkg|linux}}, consider custom kernel with reverted fixes from custom repo [https://github.com/JSkier21/linux-max98090 linux-max98090]}}
 +
 +
It is likely that you will also need to use {{ic|alsamixer}} from {{Pkg|alsa-utils}} to turn on "Left Speaker Mixer Left DAC" and "Right Speaker Mixer Right DAC". For more information, see [https://bugs.archlinux.org/task/48936].
  
 
==== Haswell based models ====
 
==== Haswell based models ====
Line 394: Line 365:
 
One or more of followings might help solving audio related issues, setting {{ic|snd_hda_intel}} module index reported the most useful. It is highly possible that you will not need to make any change.
 
One or more of followings might help solving audio related issues, setting {{ic|snd_hda_intel}} module index reported the most useful. It is highly possible that you will not need to make any change.
  
* Create <code>/etc/modprobe.d/alsa.conf</code>, the option {{ic|index}} will make sure the analog output is the default (and not HDMI), the option {{ic|model}} will notify the driver our board model which will make the built-in microphone usable (you can try instead {{ic|<nowiki>model=alc283-sense-combo</nowiki>}}).  
+
* Create {{ic|/etc/modprobe.d/alsa.conf}}, the option {{ic|index}} will make sure the analog output is the default (and not HDMI), the option {{ic|model}} will notify the driver our board model which will make the built-in microphone usable (you can try instead {{ic|<nowiki>model=alc283-sense-combo</nowiki>}} or {{ic|<nowiki>model=,alc283-dac-wcaps</nowiki>}}).  
  
 
{{hc|head=/etc/modprobe.d/alsa.conf|
 
{{hc|head=/etc/modprobe.d/alsa.conf|
output=options snd_hda_intel index=1 model=alc283-dac-wcaps}}
+
output=options snd_hda_intel index=1 model=,alc283-chrome}}
  
 
* Use the {{ic|~/.asoundrc}} file from [https://gist.githubusercontent.com/dhead666/52d6d7d97eff76935713/raw/5b32ee11a2ebbe7a3ee0f928e49b980361a57548/.asoundrc].
 
* Use the {{ic|~/.asoundrc}} file from [https://gist.githubusercontent.com/dhead666/52d6d7d97eff76935713/raw/5b32ee11a2ebbe7a3ee0f928e49b980361a57548/.asoundrc].
  
* If having problems with headphones (perhaps no audio playing), try <code>alsactl restore</code> in terminal. Now, ALSA should automatically switch between channels when using headphones/speakers.  
+
* If having problems with headphones (perhaps no audio playing), try {{ic|alsactl restore}} in terminal. Now, ALSA should automatically switch between channels when using headphones/speakers.  
  
 
* To fix [[Flash]] audio with PulseAudio, use the {{ic|~/.asoundrc}} file from [https://gist.githubusercontent.com/dhead666/0eebff16cd9578c5e035/raw/d4c974fcd50565bf116c57b1884170ecb47f8bf6/.asoundrc].
 
* To fix [[Flash]] audio with PulseAudio, use the {{ic|~/.asoundrc}} file from [https://gist.githubusercontent.com/dhead666/0eebff16cd9578c5e035/raw/d4c974fcd50565bf116c57b1884170ecb47f8bf6/.asoundrc].
Line 412: Line 383:
  
 
[https://support.google.com/chromebook/answer/1047364?hl=en The Chromebook function keys] recognized as standard F1-F10 by the kernel, it is preferable to map them accordingly to their appearance. It would also be nice to get the keys {{ic|Delete, Home, End, PgUp, PgDown}} which in Chrome OS mapped to {{ic|Alt + : BackSpace, Right, Left, Up, Down}}.
 
[https://support.google.com/chromebook/answer/1047364?hl=en The Chromebook function keys] recognized as standard F1-F10 by the kernel, it is preferable to map them accordingly to their appearance. It would also be nice to get the keys {{ic|Delete, Home, End, PgUp, PgDown}} which in Chrome OS mapped to {{ic|Alt + : BackSpace, Right, Left, Up, Down}}.
 +
 +
==== xkeyboard configuration ====
 +
 +
{{Pkg|xkeyboard-config}} 2.16-1 added a {{ic|chromebook}} model that enables the Chrome OS style functions for the function keys.  You can, for example, set this using {{ic|localectl set-x11-keymap us chromebook}}.  See the {{ic|chromebook}} definition in {{ic|/usr/share/X11/xkb/symbols/inet}} for the full mappings.
  
 
==== Sxhkd configuration ====
 
==== Sxhkd configuration ====
Line 421: Line 396:
 
==== Xbindkeys configuration ====
 
==== Xbindkeys configuration ====
  
Another way to configure hotkeys would be by using [[Xbindkeys]]. Besides {{Pkg|xbindkeys}} this requires [[Advanced Linux Sound Architecture|amixer]] and {{Pkg|xorg-xbacklight}} and {{Pkg|xvkbd}}.
+
Another way to configure hotkeys would be by using [[Xbindkeys]]. Besides {{Pkg|xbindkeys}} this requires [[Advanced Linux Sound Architecture|amixer]] and {{Pkg|xorg-xbacklight}} and {{AUR|xvkbd}}.
  
 
* See [https://gist.github.com/dhead666/08562a9a760b18b6e758] for an example configuration in {{ic|~/.xbindkeysrc}}.
 
* See [https://gist.github.com/dhead666/08562a9a760b18b6e758] for an example configuration in {{ic|~/.xbindkeysrc}}.
Line 428: Line 403:
 
===== Alternate xbindkeys configuration =====
 
===== Alternate xbindkeys configuration =====
  
[http://pastie.org/9550960  Volchange] (originated in the [http://www.debianuserforums.org/viewtopic.php?f=55&t=1453#p14351 Debian User Forums])) can manipulate the volume with PulseAudio instead of using [[Advanced Linux Sound Architecture|amixer]]. Besides [http://pastie.org/9550960 Volchange] this requires {{Pkg|xorg-xbacklight}} and {{Pkg|xvkbd}}.
+
[http://pastie.org/9550960  Volchange] (originated in the [http://www.debianuserforums.org/viewtopic.php?f=55&t=1453#p14351 Debian User Forums])) can manipulate the volume with PulseAudio instead of using [[Advanced Linux Sound Architecture|amixer]]. Besides [http://pastie.org/9550960 Volchange] this requires {{Pkg|xorg-xbacklight}} and {{AUR|xvkbd}}.
  
 
* Download the script from [http://pastie.org/9550960].
 
* Download the script from [http://pastie.org/9550960].
Line 462: Line 437:
 
==== Ignore by Gnome ====
 
==== Ignore by Gnome ====
  
[[Pacman|Install]] {{Pkg|gnome-tweak-tool}}, open the Tweak Tool and under Power change the Power Button Action.
+
[[Install]] {{Pkg|gnome-tweaks}}, open the Tweak Tool and under Power change the Power Button Action.
  
 
== Known issues ==
 
== Known issues ==
Line 468: Line 443:
 
=== Syslinux ===
 
=== Syslinux ===
  
Follow Syslinux installation instructions carefully. Try manual installation to see where the problem comes from. If you see [[Syslinux#Missing_operating_system|Missing Operation System]] then it may be because you need to use correct bootloader binary. If syslinux does not work try other bootloader such as GRUB.
+
Follow Syslinux installation instructions carefully. Try manual installation to see where the problem comes from. If you see [[Syslinux#Missing_operating_system|Missing Operation System]] then it may be because you need to use correct bootloader binary. If syslinux does not work try another [[bootloader]] such as [[GRUB]].
  
 
== See also ==
 
== See also ==

Latest revision as of 19:31, 3 January 2019

Warning: This article relies on third-party scripts and modifications, and may irreparably damage your hardware or data. Proceed at your own risk.

This article was created to provide information on how to get Arch installed on the series of Chrome OS devices built by Acer, HP, Samsung, Toshiba, and Google. Currently this page is being overhauled, and more model specific pages are being built with some of the information listed below.

Note: This article describes how to install Arch Linux by activating developer mode. For instructions on how to install Arch Linux in a ChromeOS container without having to enable developer mode see Crostini

Introduction

Legacy Boot Mode

All recent Intel-based Chrome OS devices (starting with the 2013 Chromebook Pixel) feature a Legacy Boot Mode, designed to allow the user to boot Linux. Legacy Boot Mode has a dedicated firmware region, RW_LEGACY, which is designed to be user-writeable (hence the 'RW' notation) and is completely separate from the ChromeOS portion of the firmware (ie, it is safe to update and cannot brick the device). It is enabled by the SeaBIOS payload of coreboot, the open-source firmware used for all Chrome OS devices (with the exception of the first generation of Chromebooks and a few early ARM models). SeaBIOS behaves like a traditional BIOS that boots into the MBR of the disk, and from there into standard bootloaders like Syslinux and GRUB.

Models with a Core-i based SoC (Haswell, Broadwell, Skylake, KabyLake) mostly ship with a functional Legacy Boot Mode payload; updating to a 3rd party build can provide bug fixes and additional features. Models with an Atom-based SoC (Baytrail, Braswell, Apollolake) have Legacy Boot Mode capability, but do not ship with a RW_LEGACY/SeaBIOS payload (that part of the firmware is blank). These models require a 3rd party RW_LEGACY firmware to be loaded for Legacy Boot Mode to be functional.


Models without Legacy Boot Mode/SeaBIOS

One of the following approaches can be taken in order to install Arch Linux on Chrome OS devices which did not ship with SeaBIOS as part of the installed firmware:

  • If the device supports Legacy Boot Mode, but does not ship with a functional RW_LEGACY payload (or doesn't ship with one at all), one can flash a SeaBIOS payload to the RW_LEGACY part of the firmware. This is 100% safe, as it writes to a user-writeable area of the firmware image which is completely separate from/does not affect ChromeOS. The easiest way to install/update the RW_LEGACY firmware on your ChromeOS device is via MrChromebox's Firmware Utility Script, which supports the widest range of devices and offers the most up-to-date SeaBIOS builds; one can also update the RW_LEGACY firmware manually with Chrome OS' flashrom (requires downloading/compiling your own build), or use John Lewis' flash_chromebook_rom.sh script (no longer supported).
  • Flash a full custom firmware which includes either a SeaBIOS or UEFI payload, and removes all the ChromeOS-specific parts.
  • Flash the BOOT_STUB part of the firmware. This method replaces the stock ChromeOS payload (depthcharge) with SeaBIOS. This is theoretically a safer approach than flashing the full firmware but there might be some limitations (e.g. no support in suspend or VMX). This is the Modify ROM to run SeaBIOS exclusively option in John Lewis' flash_chromebook_rom.sh script and Flash BOOT_STUB firmware option in MrChromebox's.
  • Take the ChrUbuntu approach which uses the Chrome OS kernel and modules.
  • Build and sign your own kernel, see [1] [2] [3].

The Installation process described on this page tries to cover the method of installing Arch Linux on models without SeaBIOS by flashing a custom firmware.

Firmware write protection intro

All Chrome OS devices features firmware write protection, which restricts write access to certain regions of the flash chip. It is important to be aware of it as one might need to disable the hardware write protection as part of the installation process (to update GBB flags or flash a custom firmware).

For more details see Firmware write protection.

Prerequisites

  • You should claim your free 100GB-1TB of Google Drive space before you install Arch. This needs to happen from ChromeOS(version > 23), not linux. This will sync/backup ChromeOS, as designed
  • Visit the ArchWiki page for your Chrome OS device.
  • If there is no ArchWiki page for your device then before proceeding, gather information about the device and if you succeed in installing Arch Linux, then consider adding a new ArchWiki page for your model (you can use the Acer C720 as an example for device shipped with SeaBios or the Acer C710 as device that did not ship with it).
  • Read this guide completely and make sure you understand all the steps before making any changes.

Chrome OS devices

See Chromebook models for hardware comparison with details about SeaBIOS availability and storage expansion.

General hardware recommendations and remarks

  • MyDigitalSSD M.2 NGFF SSD drives are probably the most popular choice when upgrading the internal SSD of a Chrome OS device. There are multiple accounts of failing MyDigitalSSD SSD drives at the Acer C720 topic on the Arch forums [4] [5] [6] and much more on the web. If the SSD was upgraded to a MyDigitalSSD model then it is highly recommended to backup the system and data frequently. It might be advisable to upgrade the SDD with a different brand. Notice that this might be due to a SSD firmware issue so updating the SSD firmware is highly recommended.
  • Transcend MTS400 M.2 NGFF SSD drives are failing (at least with stock Coreboot firmware) when ALPM is enabled, ATM there is no SSD firmware update that fixing this bug, so it is highly advisable to disabled ALPM if a power management daemon has been installed (which enabled it), see Resolving SATA power management related errors and how to disable ALPM in Chrome OS.

Installation

Warning: Installation on ChromeOS devices that do not ship with SeaBIOS requires flashing a custom firmware, certain types of which have the potential to brick your device. Proceed at your own risk.
Note: While the following information should fit all the ChromeOS devices with coreboot firmware (shipped with SeaBIOS payload or without), it is possible that with some models you may need to make further adjustments.

The general installation procedure:

  • Enable developer mode.
  • ChromeOS device with functional Legacy Boot Mode/SeaBIOS:
    • Enable Legacy Boot Mode.
    • Set SeaBIOS as default (optional but highly recommended, requires disabling the write protection).
  • ChromeOS device without functional Legacy Boot Mode:
    • Flash one of the following types of custom firmware
      • Flash RW_LEGACY firmware (zero risk)
      • Flash BOOT_STUB firmware (very low risk).
      • Flash Full custom firmware (low risk).
  • Prepare the installation media.
  • Boot Arch Linux installation media and install Arch.

Enabling developer mode

Developer Mode is necessary in order to access the superuser shell inside ChromeOS, which is required for making changes to the system like allow booting through SeaBIOS.

Warning: Enabling Developer Mode will wipe all of your data.

To enable developer mode:

  • Press and hold the Esc + F3 (Refresh) keys, then press the Power button. This enters Recovery Mode.
    • Chromeboxes have a dedicated Recovery button, which should be pressed/held while powering on
  • Press Ctrl + D (no prompt). It will ask you to confirm, then the system will revert its state and enable Developer Mode.
Note: Press Ctrl + D (or wait 30 seconds for the beep and boot) at the white boot splash screen to enter ChromeOS.

Accessing the superuser shell

After you have enabled the Developer Mode you will need to access the superuser shell. How you do this depends on whether you have configured ChromeOS or not.

Accessing the superuser shell without logging into ChromeOS

If you have not configured ChromeOS, just press Ctrl + Alt + F2 (F2 is the "forward" arrow on the top row, →), you will see a login prompt.

  • Use chronos as the username, it should not prompt you for a password.
  • Become superuser with sudo, use the command sudo su -.

Accessing the superuser shell when logged into ChromeOS

If you have configured ChromeOS already:

  • Open a crosh window with Ctrl + Alt + T.
  • Open a bash shell with the shell command.
  • Become superuser with sudo, use the command sudo su - to accomplish that.

Enabling Legacy Boot Mode

If your ChromeOS device did not ship with Legacy Boot Mode support via SeaBIOS, or you prefer to install a custom firmware, then continue to Flashing a custom firmware.

This will enable the pre-installed version of SeaBIOS through the Developer Mode screen in coreboot.

  • Inside your superuser shell enter:
# crossystem dev_boot_legacy=1
  • Reboot the machine.

You can now start SeaBIOS by pressing Ctrl + L at the white boot splash screen.

Note: If you intend to stay using pre-installed SeaBIOS route and think you will not appreciate having to press Ctrl + L every time you boot to reach SeaBIOS, then you can set coreboot to boot to SeaBIOS by default. This requires disabling the hardware firmware write protection.

You should now have SeaBIOS enabled on your ChromeOS device, if you choose to not set it as default then you can continue to Installing Arch Linux.

Boot to SeaBIOS by default

To boot SeaBIOS by default, you will need to run the set_gbb_flags.sh script, which is part of ChromeOS. The script uses flashrom and gbb_utility to read the RO_GBB firmware region, modify the flags, and write it back to flash. The GBB flags can also be set using MrChromebox's Firmware Utility Script under either ChromeOS or Arch (the latter requiring booting with specific kernel parameters to relax memory access restrictions).

Warning: If you do not set the GBB flags, then a fully discharged or disconnected battery will reset dev_boot_legacy crossystem flag to its default value, removing the ability to boot in Legacy Boot Mode. While this used to require you to recover Chrome OS and wipe your Arch Linux installation on the internal storage, the GalliumOS developers have created a set of "fixflags" recovery images, which rather than wiping internal storage, will instead simply re-set the dev_boot_legacy crossystem flag. See galliumos.org/fixflags
  • Disable the hardware write protection.

To find the location of the hardware write-protect screw/switch/jumper and how to disable it visit the ArchWiki page for your ChromeOS device. If there is no information about your device on the ArchWiki then turn to Developer Information for ChromeOS Devices and coreboot's Chromebooks page.

More information about the firmware protection available at the Custom firmware for ChromeOS devices page.

  • Disable the software write protection.
# flashrom --wp-disable
  • Check that write protection is disabled.
# flashrom --wp-status
  • Run set_gbb_flags.sh with no parameters.
# /usr/share/vboot/bin/set_gbb_flags.sh
  • This will list all of the available flags. The ones of interest to us are:
GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001
GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008
GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080
GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400
  • So, to set SeaBIOS as default, with a 1s timeout, prevent accidentally exiting Developer Mode via spacebar, and ensure Legacy Boot Mode remains enabled in the event of battery drain/disconnect, we set the flags as such:
# /usr/share/vboot/bin/set_gbb_flags.sh 0x489
  • Enable back the software write protection.
# flashrom --wp-enable
Note: All of these steps are automated by MrChromebox's Firmware Utility Script, so if using that to install/update your RW_LEGACY firmware, easiest to just set the flags via the script as well.

Your ChromeOS device now will boot to SeaBIOS by default, you can continue to Installing Arch Linux, if your device is booting correctly then you can optionally re-enable the hardware write protection.

Flashing a custom firmware

Note: The following steps explain how to flash a custom firmware from ChromeOS, for information on how to flash a custom firmware from Arch Linux visit the Custom firmware for ChromeOS devices page
  • Disable the hardware write protection.

To find the location of the hardware write-protect screw/switch/jumper and how to disable it visit the ArchWiki page for your ChromeOS device. If there is no information about your device on the ArchWiki then turn to Information for ChromeOS Devices and coreboot's Chromebooks page.

More information about the firmware protection available at the Custom firmware for ChromeOS devices page.

  • Enter the command to run either MrChromebox's or John Lewis's firmware script.
Note: The reason for not posting here is to force you to visit the site and read the instructions before proceeding.
  • After the exiting the script, be sure to copy the backed up firmware to an external storage before rebooting the system (if the script doesn't provide that option for you).

You should now have a custom firmware installed on your device, cross your fingers and reboot.

After flashing the firmware you can continue to Installing Arch Linux.

Installing Arch Linux

Preparing the installation media

Create an Arch Linux Installer USB drive.

Note: If the USB loads but fails to boot into Arch, it may be due a bug in the syslinux the current (2017.03.01) installer uses. The 2016.11.01 version from the Arch Linux Archive will work until the issue is resolved.

Booting the installation media

  • Plug the USB drive to the ChromeOS device and start SeaBIOS with Ctrl + L at the white boot splash screen (if SeaBIOS is not set as default).
  • Press Esc to get a boot menu and select the number corresponding to your USB drive.

The Arch Linux installer boot menu should appear and the installation process can proceed as normal.

Note: For now choose GRUB as your bootloader: you can choose MBR or GPT: Partitioning. If you choose GPT then do not forget to add a BIOS Boot Partition. Also see Known Issues.

After finishing installing Arch Linux continue by following the Post Installation Configuration.

Post installation configuration

Patched kernels

Note: You can most likely ignore this section unless your device requires patched kernel support.

It is recommended to use the official linux package for most Chrome OS devices with the exception being newer devices which might need patched kernel support such as the Chromebook Pixel 2015.

linux-samus4AUR provides patches for the Chromebook Pixel 2015 to fix touchpad, touchscreen, and sound functionality which has not been merged into upstream linux yet. More information is available at its GitHub page.

If your devices requires a patched kernel, it is advised to review the list of patches and decide if the patch list is getting decidedly small enough that you no longer require a patched kernel and instead you can use the official linux package instead.

See kernels for more information.

Video driver

See Intel graphics.

Touchpad and touchscreen

See Touchpad Synaptics, libinput, and Touchscreen.

Touchpad and touchscreen kernel modules

Since kernel 3.17 all the related patches merged into the upstream sources, meaning the linux package in core supports these devices.

What to do if your touchpad or touchscreen is not supported?
  • Review the list of patches in linux-chromebookAUR[broken link: archived in aur-mirror], if a related patch for your Chromebook model exist then install this package.
  • If there is no such patch do not worry as the developers should be able to add it by request as the Chromium OS sources includes the related changes.
  • You can also try to find the related commits by yourself and create a proper patch, some hints:
    • Dig into your Chrome OS system, look at the obvious suspects like boot log, /proc/bus/input/devices and /sys/devices.
    • The Linux kernel sources for Chromium OS are at [7].
    • Each kernel source for the latest Chromium OS release has its own branch, name convention: release-R*-*-chromeos-KERNELVER, where R*-* is the Chromium OS release and KERNELVER is the kernel version.
    • Review the git log of drivers/platform, drivers/i2c/busses and drivers/input/touchscreen.
  • linux-samus4AUR includes touchpad and touchscreen support for the Chromebook Pixel 2015. More information is available at its GitHub page.

Touchpad configuration

There are few options how to set the touchpad:

Chromium OS input drivers

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: xf86-input-cmt development is not active and it is probably not needed anymore in any case since libinput's compatibility with Chrome OS devices's touchpads is fairly good. (Discuss in Talk:Chrome OS devices#)

xf86-input-cmtAUR offers a port of the Chromium OS input driver: xf86-input-cmt as an alternative for the Synaptics input driver. It provides tweaked configuration files for most devices, and provides functionality that the Synaptics input driver does not such as palm rejection. Additionally, it enables functionality not enabled by default in the Chromium OS input driver such as tap-to-drag.

Please note, the input driver does not work under some circumstances where you have insufficient permissions to access /dev/input/event This will affect you if you use startx to load a DE/WM session. If this is the case or if the driver does not load for any other cases, you should run:

# usermod -a -G input $USER

Where $USER is the current user wanting to use the input driver.

It should also be noted that some users have reported the driver does not work in GDM but works normally after log in. If you are affected by this, you should run:

# usermod -a -G input gdm

After reboot, you should be able to use the touchpad normally.

Fixing suspend

Note: Lid suspend might not work directly after boot, you might need to wait a little.

The following are instructions to fix the suspend functionality. Users of a pre-installed SeaBIOS or John Lewis' pre-built SeaBIOS you will need this fix. This procedure is not needed with Matt DeVillier's custom firmware since problematic ACPI wake devices (such as TPAD) are firmware-disabled.

There have been a few alternatives discussed and those may work better for some. [8] [9]

To fix suspend, the general idea is to disable the EHCI_PCI module, which interferes with the suspend cycle. There are multiple ways to achieve this.

With kernel parameters

Add the following to your GRUB configuration:-

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="modprobe.blacklist=ehci_pci"

Then rebuild your grub config. After rebuilding your GRUB config, reboot your computer.

With systemd

Sometimes the synaptics touchpad, and various other parts of the laptop are used as wakeup devices causing certain movements of the laptop during suspend to end suspend. In order to disable all wakeup devices except for the laptop lid sensor, create the following suspend-device-fix.sh file.

/usr/local/sbin/suspend-device-fix.sh
#!/bin/bash

awk '{if ($1 != "LID0" && $3 == "*enabled") print $1}' < /proc/acpi/wakeup | while read NAME
do echo "$NAME" > /proc/acpi/wakeup
done

exit 0

Now give the file executable permissions:

# chmod +x /usr/local/sbin/suspend-device-fix.sh

Create a systemd service to execute the script on every boot.

/etc/systemd/system/suspend-fix.service
[Unit]
Description=Suspend Fix

[Service]
Type=simple
ExecStart=/usr/local/sbin/suspend-device-fix.sh

[Install]
WantedBy=multi-user.target

First start suspend-fix.service. If it properly starts, then enable it to be started on bootup.

Add the following line at the end of /etc/rc.d/rc.local (if it does not exist, just create it) to prevent bad handling of EHCI USB:

/etc/rc.d/rc.local
echo 1 > /sys/devices/pci0000\:00/0000\:00\:1d.0/remove

Then, create the following cros-sound-suspend.sh file. Only the Ath9k binding/unbinding lines are listed below; see the alternatives linked above for additional sound suspend handling if you experience issues.

/usr/lib/systemd/system-sleep/cros-sound-suspend.sh
#!/bin/bash

case $1/$2 in
  pre/*)
    # Unbind ath9k for preventing error and full sleep mode (wakeup by LID after hibernating) 
    echo -n "0000:01:00.0" | tee /sys/bus/pci/drivers/ath9k/unbind
    # Unbind snd_hda_intel for sound
    echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
    echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
    ;;
  post/*)
    # Bind ath9k for preventing error and and full sleep mode (wakeup by LID after hibernating) 
    echo -n "0000:01:00.0" | tee /sys/bus/pci/drivers/ath9k/bind
    # bind snd_hda_intel for sound
    echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
    echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
    ;;
esac

Make sure to make the script executable:

# chmod +x /usr/lib/systemd/system-sleep/cros-sound-suspend.sh

Then rebuild your grub config.

Fixing audio

Baytrail based models

Audio on most baytrail models should work on linux since fix merged into 4.19.7 [10], to fix regression in 4.18.15, see bug report [11].

Note: If you find audio is less stable (see journal PLL mesages) using linux, consider custom kernel with reverted fixes from custom repo linux-max98090

It is likely that you will also need to use alsamixer from alsa-utils to turn on "Left Speaker Mixer Left DAC" and "Right Speaker Mixer Right DAC". For more information, see [12].

Haswell based models

One or more of followings might help solving audio related issues, setting snd_hda_intel module index reported the most useful. It is highly possible that you will not need to make any change.

  • Create /etc/modprobe.d/alsa.conf, the option index will make sure the analog output is the default (and not HDMI), the option model will notify the driver our board model which will make the built-in microphone usable (you can try instead model=alc283-sense-combo or model=,alc283-dac-wcaps).
/etc/modprobe.d/alsa.conf
options snd_hda_intel index=1 model=,alc283-chrome
  • Use the ~/.asoundrc file from [13].
  • If having problems with headphones (perhaps no audio playing), try alsactl restore in terminal. Now, ALSA should automatically switch between channels when using headphones/speakers.
  • To fix Flash audio with PulseAudio, use the ~/.asoundrc file from [14].

Chromebook Pixel 2015

linux-samus4AUR includes a patch for Broadwell SoC sound devices. Its GitHub page includes additional instructions for initializing the sound device.

Hotkeys

The Chromebook function keys recognized as standard F1-F10 by the kernel, it is preferable to map them accordingly to their appearance. It would also be nice to get the keys Delete, Home, End, PgUp, PgDown which in Chrome OS mapped to Alt + : BackSpace, Right, Left, Up, Down.

xkeyboard configuration

xkeyboard-config 2.16-1 added a chromebook model that enables the Chrome OS style functions for the function keys. You can, for example, set this using localectl set-x11-keymap us chromebook. See the chromebook definition in /usr/share/X11/xkb/symbols/inet for the full mappings.

Sxhkd configuration

One way to set the hotkeys would be by using the Sxhkd daemon. Besides sxhkd, this also requires amixer, xorg-xbacklight, and xautomation.

  • See [15] for an example configuration in ~/.config/sxhkd/sxhkdrc.

Xbindkeys configuration

Another way to configure hotkeys would be by using Xbindkeys. Besides xbindkeys this requires amixer and xorg-xbacklight and xvkbdAUR.

Alternate xbindkeys configuration

Volchange (originated in the Debian User Forums)) can manipulate the volume with PulseAudio instead of using amixer. Besides Volchange this requires xorg-xbacklight and xvkbdAUR.

  • Download the script from [17].
  • Make it executable
$ chmod u+x ~/.local/bin/volchange

See [18] for a matching ~/.xbindkeysrc.

Patch xkeyboard-config

Another option is to install xkeyboard-config-chromebookAUR, for more details visit [19].

Mapping in Gnome with gsettings set

Some of the function keys can be mapped in Gnome with the advantage of HUD notifications on changes (like volume and brightness changes) which can supplement one of the mapping methods mentioned above. This linked example maps the brightness and volume actions. Notice that xdotool is required.

Power key and lid switch handling

Ignore using logind

Out of the box, systemd-logind will catch power key and lid switch events and handle them: it will shut down the Chromebook on a power key press, and a suspend on a lid close. However, this policy might be a bit harsh given that the power key is an ordinary key at the top right of the keyboard that might be pressed accidentally.

To configure logind to ignore power key presses and lid switches, add the lines to logind.conf below.

/etc/systemd/logind.conf
HandlePowerKey=ignore
HandleLidSwitch=ignore

Then restart logind for the changes to take effect.

Power key and lid switch events will still be logged to journald by logind. See Power management#ACPI events.

Ignore by Gnome

Install gnome-tweaks, open the Tweak Tool and under Power change the Power Button Action.

Known issues

Syslinux

Follow Syslinux installation instructions carefully. Try manual installation to see where the problem comes from. If you see Missing Operation System then it may be because you need to use correct bootloader binary. If syslinux does not work try another bootloader such as GRUB.

See also