TABLE OF CONTENTS
The original version of this document can be found here. The one
below reflects the new/changed/easier steps learned from
experience and by the improved compatibility of the newer
Linux kernels and distro versions (i.e. LMDE3 vs LMDE2).
The older instructions include information on using the
'crouton' method of running Linux within ChromeOS itself, as
well as information on the method of providing Linux
installation space by re-partitioning the internal SSD of the
ChromeOS device -- both of which are no longer recommended.
|
CHROMEOS/CHROMEBOOKS
INTRO
Here are some excellent resources regarding ChromeOS devices
and the use of ChromeOS:
|
LINUX
ON A CHROME DEVICE
There are three ways that Linux can be run on a
Chromebook/Chromebox (all of which depend on the ability to enter
'Developer Mode'):
- In parallel
with a running ChromeOS session using crouton.
All (?) Chrome devices should be able to use this method.
- In a dual-boot
configuration with ChromeOS, where either ChromeOS is booted
or the installed Linux distro is booted according to one's
choice. The Linux install can either live inside the
hard-drive/SSD containing ChromeOS, or on a separate USB
storage device. This method requires legacy SeaBIOS
functionality, which some Chrome devices either naturally
provide, or can be added with 3rd-party firmware, or not at
all.
- In a solo stand-alone OS replacement of the entire ChromeOS
device, where the ChromeOS has been completely removed.
SeaBIOS is
required for this as well, and is very similar to the 2nd
option. This will not be discussed on this page.
|
ENABLING
DEVELOPER MODE ON ACER C720 CHROMEBOOK
By design, all ChromeOS devices are secured and locked to only run
verified ChromeOS -- with no choice to run a regular Linux distro
at all.
In order to enable a Chromebook/Chromebox to ultimately dual-boot
Linux in a separate partition, or run it in parallel with ChromeOS
via 'crouton', it is necessary to enable 'Developer Mode' -- which
enables the 'superuser' shell inside ChromeOS. Note that by
doing so the device will be completely reset -- erasing the hard
drive and all user settings/customization/files completely. To
enable 'Developer Mode', enter the following key sequence while
powered off:
Escape-Refresh-PowerOn (while powered off)
Ctrl-d (after the recovery message comes up)
This will initiate the process of placing the Chromebook into Developer
Mode, which will take about 20 minutes to complete.
From that point on, the device will always be vulnerable to
reset back to a normal state (and erasing all if the space
bar is pressed while booting -- so beware! More
information on changing to 'developer mode':
More information on 'Developer Mode' can be found here: MrChromebox
Developer Mode Basics.
After activating 'Developer Mode' on a Chromebook, you now have
the ability to enter the 'superuser' shell in order to make even
further changes to the way it operates (including
installing/running Linux). There are two ways to do this:
- At the ChromeOS welcome screen, before configuration or
logging into your account, press the following key sequences:
Ctrl-Alt-ForwardArrow [sign on
as 'chronos' (no password required)]
or
- After the ChromeOS welcome screen, after configuration or
logging into your account:
Ctrl-Alt-t [type 'shell' to
automatically sign on as 'chronos']
One way to reduce or eliminate the risk of leaving 'developer
mode' unintentionally is to make some firmware setting
changes. These need to be made while the C720 'write protect
screw' (#7) is removed. Refer to this photo for the location
of this special screw:
While in the process of tweaking/testing the Chromebook, as a
minimum the 'battery lock screw' (#6) needs to be used to attach
the bottom cover. More diagrams/instructions can be found
here:
While the 'write-protect' screw is removed, you are the
opportunity to make some other useful changes if you so desire:
- Reducing the 'boot delay' from 30s to 1s
- Change the default 'boot target' from 'ChromeOS' to 'Legacy
Boot Mode'
- Replace the (obnoxious) 'Developer Mode' warning screen with
a (calmer) white-text-on-black message
The easiest way to accomplish these changes is to download and
run the MrChromebox
ChromeOS Firmware Utility Script by MrChromebox
-- in particular, steps #4 and/or #6.
When the adjustments to the firmware are completed and tested
successfully, the 'write protect screw' should be replaced, and
all the original screws used to attach the bottom cover can again
be used to close the Chromebook. Removal of the 'write
protect screw' should never be required again -- unless further
similar firmware changes are required.
|
ENABLING
USB & LEGACY BOOT MODE ON ACER C720 CHROMEBOOK
In preparation for setting up an Acer C720 for
dual-booting a Linux distro of your choice (in my own, Linux
Mint Debian Edition), 'SeaBIOS'
needs to be activated within the 'superuser' shell. This
ability is not present on all Chromebooks/Chromeboxes --
fortunately, the Acer C720 firmware includes this. Other
Chrome devices can be modified to do so, while yet others
cannot (or not yet) do so. See the list MrChromebox
Firmware Supported Devices for more information on
models that do have/can have/do not have 'SeaBIOS' capability.
To actually install a functional SeaBIOS to enable
'RW_Legacy' dual-boot capability, download and run the
useful MrChromebox
firmware installation script while in the 'superuser' shell:
MrChromebox
ChromeOS Firmware Utility Script.
For more information on the various ChromeOS device
firmware options, see MrChromebox
Firmware Update Types.
For more information on the differences between 'Legacy
Boot' and 'UEFI Boot', see MrChromebox
Legacy Boot and UEFI.
|
LINUX
MINT DEBIAN EDITION ON ACER C720 CHROMEBOOK VIA DUAL-BOOT
Once legacy-supporting SeaBIOS mode is enabled, the option of
running Linux -- in this case, the desired Linux distro is 'Linux Mint
Debian Edition' (LMDE) -- as a dual-boot option on the
Chromebook is now possible. However, disk space needs to be made
available on the ChromeOS device for Linux to run. The
recommended/easiest/safest method is to install the desired
Linux distro to a USB stick/dongle. An excellent choice
for this is a SanDisk
Ultra Fit 128GB USB 3.0 flash drive (now apparently
discontinued, but alternatives are available), due to its small
size and good speed. I currently consider this to be the
optimum solution, since it allows the same portable drive to be
shared among multiple Chromebooks (or other computers), and
avoids the risk of accidental erasure if 'Developer Mode' is
inadvertently turned off. Another advantage to this method
is that the Linux install is not jeopardized if/when ChromeOS
needs to be re-installed for unforeseen reasons.
Then proceed to boot (with Ctrl-l) your desired distro,
and pick whatever 'install' option is provided. NOTE: It
is out of the scope of this document to explain what Linux
distro to pick, how to put the distro installer onto a bootable
USB stick/drive, and how to boot/install it onto a storage
partition!. One suggestion, however, for maximum
flexibility, is to partition the destination install device with
both BIOS and EFI partions -- in addition to a third partition
for Linux itself -- so as to allow booting on both older
(BIOS-style) and newer (UEFI-style) computers. For SeaBIOS
Chromebooks/boxes, a BIOS partition is needed. For more
information on my own favored partitioning schemes, see here.
After installation, there are some good tweaks to do to make
everything run smoothly (note that newer versions of Linux Mint
Debian Edition might make some/all of these tweaks unnecessary,
so verify whether you require them before applying):
Edit the file '/usr/share/X11/xorg.conf.d/20-intel.conf'
with the following contents:
Section "Device" Identifier "card0" Driver "intel" Option "Backlight" "intel_backlight" BusID "PCI:0:2:0" EndSection
Then re-login for to take effect.
- KEYBOARD: To re-map some Chromebook keys to more
intuitive values, first install some required utilities if
they are absent:
apt install xbacklight xvkbd xbindkeys
Next, update the file '$HOME/.xbindkeysrc':
"xbacklight -dec 10" m:0x0 + c:72 F6 "xbacklight -inc 10" m:0x0 + c:73 F7 "amixer set Master toggle"
m:0x0 + c:74
F8
"amixer sset Master 10%- unmute"
m:0x0 + c:75
F9
"amixer sset Master 10%+ unmute"
m:0x0 + c:76
F10 "xvkbd -xsendevent -text '\[Delete]'" Alt + BackSpace
"xvkbd -xsendevent -text '\[End]'" Alt + Right
"xvkbd -xsendevent -text '\[Home]'" Alt + Left
"xvkbd -xsendevent -text '\[Page_Down]'" Alt + Down
"xvkbd -xsendevent -text '\[Page_Up]'" Alt + Up
"xvkbd -xsendevent -text "\A\[Left]"" m:0x0 + c:67 F1
#Forward "xvkbd -xsendevent -text "\A\[Right]"" m:0x0 + c:68 F2
#Refresh "xvkbd -xsendevent -text "\Cr"" m:0x0 + c:69 F3
Then run in a terminal:
xbindkeys
An alternative method for setting some of these keys would be to
use the technique described below in the 'Preferences/Keyboard/Keyboard
shortcuts' instructions.
deb http://ftp.debian.org/debian stretch-backports main
Refresh the apt repositories with:
apt update
Install the TLP apps:
apt install -t stretch-backports tlp tlp-rdw
Configure
and start:
sudo tlp start
Interrogate as you wish e.g.
sudo tlp-stat
Other good/useful tweaks that I have done:
- KERNEL: Newer kernels are available in the Debian
Stretch 'backport' repository.
Add the following entries to '/etc/apt/sources.list.d/backports.list':
deb http://ftp.debian.org/debian stretch-backports main
Refresh the apt repositories with:
apt update
Get a list of the available kernels and pick the one you want:
apt search linux-image
The newest kernel should now be available:
apt install -t stretch-backports newer-kernel-that-you-want
As of this writing, the newest version available was linux-image-4.17.0-0.bpo.3-amd64'.
- ROOT PASSWORD: Change root password, so that the
'root' account in un-locked and accessible when needed:
sudo passwd root
- SSH: Install the SSH utilities so that you can log in
remotely to the Chromebook for fixing when the display and/or
keyboard doesn't work locally:
apt install ssh
- /ETC/FSTAB: Adjust '/etc/fstab' entries to minimize
'writes' on the USB stick (to increase its lifespan):
- Add 'noatime' to
parms if flash drive/SSD
- Use 'tmpfs' for stuff, but
adjust if too small:
# move stuff to tmpfs tmpfs /tmp tmpfs defaults,noatime,nosuid,size=100m 0 0 tmpfs /var/tmp tmpfs defaults,noatime,nosuid 0 0 tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=200m 0 0
Force to take effect with:
sudo mount -a
Alternatively, just reboot.
- FIREFOX BROWSER: Adjust Firefox temp space to
minimize logging:
Type 'about:config' in
the url bar and press Enter. Click the button to accept the
risk.
In the search bar, type:
sessionstore
Double-click on the item called 'browser.sessionstore.interval'.
The default interval is '15000',
which means 15 seconds. Add three zeros to the existing value,
so that it becomes: '15000000'
and click the OK button.
Now disable the following three other sessionstore items, by
simply double-clicking them (so that "true" becomes "false"):
browser.sessionstore.restore_on_demand browser.sessionstore.resume_from_crash services.sync.prefs.sync.browser.sessionstore.restore_on_demand
Fix default page and search engine in Firefox:
default: google.ca
search: google
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list apt update apt install google-chrome-stable
- WIFI DEVICE NAME: Adjust wifi device name so that it
is consistently shown as 'wlan0':
sudo vi /etc/systemd/network/10_wlan0.link
Contents:
[Match] Type=wlan [Link] Name=wlan0
Run:
sudo update-initramfs -u
- CONKY: Install 'conky' and other useful utilities for
use in its display:
apt install conky facter jq html2text python-pip python-setuptools python-dev python-wheel sudo pip install pyephem sudo dpkg-reconfigure hddtemp ssh-keygen -t dsa
- OTHER UTILITIES: Other useful stuff to install:
apt install gparted geeqie smplayer pavucontrol mc source /usr/share/mc/bin/mc.sh
- ALIASES: Add some custom aliases to '$HOME/.bashrc':
# dare stuff alias notes='cd ~/Documents/darenotes' alias vtail='tail -f /var/log/messages' alias g=geeqie
|
ACER
C740 CHROMEBOOK: EXTRA NOTES
Given a chance to try out Linux on the faster Acer C740
Chromebook, I had my share of setbacks and successes that I want
to preserve here for others to learn from.
In addition to the steps provided above for the Acer
C720, LMDE3 on the Acer C740 seems to require these additional
fixes:
- GRUB MENU: Adjust the grub boot settings so that the
boot menu is fully visible by un-commenting the following
lines in '/etc/default/grub':
GRUB_TERMINAL=console
GRUB_GFXMODE=640x480
Then put these grub changes into effect by running:
sudo update-grub
You will need to reboot to make all these changes effective.
Other changes mentioned above for the C720 are also optionally
suggested. What you should end up with is a working Linux
Mint LMDE bootable device that works just as well as on the older
Acer C720 Chromebook.
|
ACER
R11 CHROMEBOOK: EXTRA NOTES
Extra steps required for full functionality of the Acer R11
Chromebook are similar to that of the Acer C740 Chromebook, and
so the advise is to follow those instructions above.
- TOUCHSCREEN A newer kernel than is provided by LMDE3
is required for the touchscreen to be properly recognized.
Unfortunately, for whatever reason, the Debian Stretch
'backport' kernels don't appear to support the Acer R11
Chromebook touchscreen, so another source of working kernels
is required:
The source for those newer kernel options is here
[taken from https://www.tecmint.com/upgrade-kernel-in-ubuntu/]:
http://kernel.ubuntu.com/~kernel-ppa/mainline/
Specially, you can find the latest non-RC kernel directory in
this listing (as of this writing, it was v4.15/). Inside,
you would download and then 'dpkg -i' the
following pieces:
linux-headers-4.xx.x-xxxxxx_4.xx.x-xxxxxx.yyyymmddhhmm_all.deb linux-headers-4.xx.x-xxxxxx-generic_4.xx.x-xxxxxx.yyyymmddhhmm_amd64.deb linux-image-4.xx.x-xxxxxx-generic_4.xx.x-xxxxxx.yyyymmddhhmm_amd64.deb
e.g. sudo dpkg -i linux-headers-4.15.0-041500_4.15.0-041500.201802011154_all.deb sudo dpkg -i linux-headers-4.15.0-041500-generic_4.15.0-041500.201802011154_amd64.deb sudo dpkg -i linux-image-4.15.0-041500-generic_4.15.0-041500.201802011154_amd64.deb
- SCREEN ROTATION: As well, since it is possible to
flip the display panel of the R11 into a 'tablet' mode, there
are benefits to being able to rotate both the screen and touch
panel at will. A great script to do this is located
here:
https://gist.github.com/mildmojo/48e9025070a2ba40795c
In order to use this Cinnamon's keyboard shortcuts, a variation
of that script is as follows (for placement into '/usr/local/bin/rotate.sh'):
#!/bin/bash # # rotate_desktop.sh # https://gist.github.com/mildmojo/48e9025070a2ba40795c # # (modified into 'rotate.sh' by Darren Enns 2018/03/19) # # Rotates modern Linux desktop screen and input devices to match. Handy for # convertible notebooks. Call this script from panel launchers, keyboard # shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.). # # Using transformation matrix bits taken from: # https://wiki.ubuntu.com/X/InputCoordinateTransformation # # Configure these to match your hardware (names taken from `xinput` output).
TOUCHPAD='Elan Touchpad' TOUCHSCREEN='Elan Touchscreen'
function do_rotate { TRANSFORM='Coordinate Transformation Matrix'
if [ ! -z "$2" ]; then orient=$2 else orient=$(xrandr -q --verbose | grep 'connected primary' | awk '{print $6}') case "$orient" in right) orient="normal" ;; normal) orient="left" ;; left) orient="inverted" ;; inverted) orient="right" ;; esac fi
case "$orient" in normal) xrandr --output $1 --rotate "normal" [ ! -z "$TOUCHPAD" ] && xinput set-prop "$TOUCHPAD" "$TRANSFORM" 1 0 0 0 1 0 0 0 1 [ ! -z "$TOUCHSCREEN" ] && xinput set-prop "$TOUCHSCREEN" "$TRANSFORM" 1 0 0 0 1 0 0 0 1 ;; inverted) xrandr --output $1 --rotate "inverted" [ ! -z "$TOUCHPAD" ] && xinput set-prop "$TOUCHPAD" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1 [ ! -z "$TOUCHSCREEN" ] && xinput set-prop "$TOUCHSCREEN" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1 ;; left) xrandr --output $1 --rotate "left" [ ! -z "$TOUCHPAD" ] && xinput set-prop "$TOUCHPAD" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1 [ ! -z "$TOUCHSCREEN" ] && xinput set-prop "$TOUCHSCREEN" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1 ;; right) xrandr --output $1 --rotate "right" [ ! -z "$TOUCHPAD" ] && xinput set-prop "$TOUCHPAD" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1 [ ! -z "$TOUCHSCREEN" ] && xinput set-prop "$TOUCHSCREEN" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1 ;; esac }
XDISPLAY=`xrandr --current | grep primary | sed -e 's/ .*//g'` XROT=`xrandr --current --verbose | grep primary | egrep -o ' (normal|left|inverted|right) '`
do_rotate $XDISPLAY $1
Set the 'execute bit' on this script by doing the following:
sudo chmod 775 /usr/local/bin/rotate.sh
For the actual Cinnamon keyboard shortcut, if you decide to use
it: Do this by navigating to the Cinnamon 'Preferences/Keyboard/Keyboard
shortcuts' menu and assigning 'Custom Shortcuts' via the
following keyboard bindings:
Shift+Ctrl+F3= command "/usr/local/bin/rotate.sh"
This shortcut matches the same key sequence as ChromeOS uses for
the 'rotate screen' function (i.e. Shift+Ctrl+Refresh)
NOTE: You can also add this shell script as an icon on the
desktop by right-clicking on the desktop and selecting "Create a
new launcher here", and referencing '/usr/local/bin/rotate.sh'.
- SOUND: NEW 2018/03/29: Success with getting
speaker sound to work under Linux LMDE!
This topic is not yet 100% completed, but it was
sufficient to get basic sound working. Be
careful! Apparently it is possible to burn out the
speakers if mistreated at high volume levels.
More details of the dangers involved are described here.
More information about this fix is here.
Not easy or intuitive, but mostly working by doing the
following:
- Install a new kernel (see above -- in my case 4.15 worked, and
not sure what lower version would also work)
- Download the missing (!?) firmware drivers for Intel Sound 'firmware-intel-sound' from an
appropriate location -- I got it from here,
and installed it this way (for some reason, this DEB package was
not available using normal 'apt install'
commands):
sudo dpkg -i firmware-intel-sound_20161130-3~bpo8+1_all.deb
- Create a new directory (as root) named '/usr/share/alsa/ucm/chtmax98090/'
and populate it with two files:
Edit '/usr/share/alsa/ucm/chtmax98090/chtmax98090.conf':
Comment "Cyan internal card"
SectionUseCase."HiFi" { File "HiFi.conf" Comment "Default" }
Edit '/usr/share/alsa/ucm/chtmax98090/HiFi.conf':
SectionVerb { Value { OutputDspName "speaker_eq" }
EnableSequence [ cdev "hw:chtmax98090"
cset "name='codec_out0 mix 0 pcm0_in Switch' on" cset "name='media0_out mix 0 media1_in Switch' on" cset "name='media1_in Gain 0 Ramp Delay' 50" cset "name='media1_in Gain 0 Switch' on" cset "name='media1_in Gain 0 Volume' 80% 80%" cset "name='pcm0_in Gain 0 Ramp Delay' 50" cset "name='pcm0_in Gain 0 Switch' on" cset "name='pcm0_in Gain 0 Volume' 80% 80%" cset "name='codec_out0 Gain 0 Ramp Delay' 50" cset "name='codec_out0 Gain 0 Switch' on" cset "name='codec_out0 Gain 0 Volume' 80% 80%" cset "name='pcm1_out mix 0 media_loop2_in Switch' 1" cset "name='media_loop2_out mix 0 codec_in0 Switch' 1" cset "name='codec_in0 Gain 0 Ramp Delay' 50" cset "name='codec_in0 Gain 0 Switch' on" cset "name='codec_in0 Gain 0 Volume' 80% 80%" cset "name='media_loop2_out Gain 0 Ramp Delay' 50" cset "name='media_loop2_out Gain 0 Switch' off" cset "name='media_loop2_out Gain 0 Volume' 80% 80%" cset "name='pcm1_out Gain 0 Ramp Delay' 50" cset "name='pcm1_out Gain 0 Switch' on" cset "name='pcm1_out Gain 0 Volume' 80% 80%" cset "name='Digital EQ 3 Band Switch' off" cset "name='Digital EQ 5 Band Switch' off" cset "name='Digital EQ 7 Band Switch' off" cset "name='Biquad Switch' off" cset "name='Filter Mode' Music" cset "name='ADC Oversampling Rate' 0"
cset "name='DMIC Mux' DMIC" cset "name='MIC2 Mux' IN34" cset "name='Right ADC Mixer MIC2 Switch' on" cset "name='Left ADC Mixer MIC2 Switch' on" cset "name='MIC2 Volume' 20" cset "name='Int Mic Switch' on"
cset "name='ADCR Boost Volume' 4" cset "name='ADCL Boost Volume' 4" cset "name='ADCR Volume' 11" cset "name='ADCL Volume' 11"
cset "name='Left Speaker Mixer Left DAC Switch' on" cset "name='Right Speaker Mixer Right DAC Switch' on" cset "name='Speaker Left Mixer Volume' 2" cset "name='Speaker Right Mixer Volume' 2" cset "name='Record Path DC Blocking' on" cset "name='Playback Path DC Blocking' on"
cset "name='Headphone Left Switch' on" cset "name='Headphone Right Switch' on" cset "name='Ext HP Switch' off"
cset "name='Speaker Left Switch' on" cset "name='Speaker Right Switch' on" cset "name='Ext Spk Switch' on"
]
DisableSequence [ ] }
SectionDevice."Headphone".0 { Value { JackName "chtmax98090 Headset Jack" OutputDspName "" }
EnableSequence [ cdev "hw:chtmax98090" cset "name='Ext Spk Switch' off" cset "name='Speaker Left Switch' off" cset "name='Speaker Right Switch' off" cset "name='Ext HP Switch' on" ] DisableSequence [ cdev "hw:chtmax98090" cset "name='Ext HP Switch' off" cset "name='Ext Spk Switch' on" cset "name='Speaker Left Switch' on" cset "name='Speaker Right Switch' on" ] }
SectionDevice."Mic".0 { Value { JackName "chtmax98090 Headset Jack" }
EnableSequence [ cdev "hw:chtmax98090" cset "name='Int Mic Switch' off" cset "name='Headset Mic Switch' on" cset "name='DMIC Mux' ADC" cset "name='Record Path DC Blocking' on" ]
DisableSequence [ cdev "hw:chtmax98090" cset "name='Headset Mic Switch' off" cset "name='Int Mic Switch' on" cset "name='DMIC Mux' DMIC" cset "name='Record Path DC Blocking' off" ] }
SectionModifier."Speaker Swap Mode".0 { Comment "Swap the left and right channels of speaker."
EnableSequence [ cdev "hw:chtmax98090"
cset "name='Left Speaker Mixer Left DAC Switch' off" cset "name='Right Speaker Mixer Right DAC Switch' off" cset "name='Left Speaker Mixer Right DAC Switch' on" cset "name='Right Speaker Mixer Left DAC Switch' on" ]
DisableSequence [ cdev "hw:chtmax98090"
cset "name='Left Speaker Mixer Right DAC Switch' off" cset "name='Right Speaker Mixer Left DAC Switch' off" cset "name='Left Speaker Mixer Left DAC Switch' on" cset "name='Right Speaker Mixer Right DAC Switch' on" ] }
The instructions to do this came from this
bugzilla kernel thread. I wasn't able to 'patch' the
2nd file, so I simply made the simple editing changes
manually.
- KEYBOARD: After making the 'sound' changes
upgrades/installs/changes, I was able to get the familiar
'welcome' chime when starting the Cinnamon desktop in LMDE,
but the 'xbindkeys' that I had
programmed to change the sound volume levels did not
work. I am still not sure why they do not, but I have
supplemented them by some others that do in the '$HOME/.xbindkeysrc'
file:
"xbacklight -dec 10" m:0x0 + c:72 F6 "xbacklight -inc 10" m:0x0 + c:73 F7 "pactl set-sink-mute 1 toggle; amixer set Master toggle" m:0x0 + c:74 F8 "pactl -- set-sink-volume 1 -10%; amixer sset Master 10%- unmute" m:0x0 + c:75 F9 "pactl set-sink-volume 1 +10%; amixer sset Master 10%+ unmute" m:0x0 + c:76 F10
"xvkbd -xsendevent -text '\[Delete]'" Alt + BackSpace
"xvkbd -xsendevent -text '\[End]'" Alt + Right
"xvkbd -xsendevent -text '\[Home]'" Alt + Left
"xvkbd -xsendevent -text '\[Page_Down]'" Alt + Down
"xvkbd -xsendevent -text '\[Page_Up]'" Alt + Up
"xvkbd -xsendevent -text "\A\[Left]"" m:0x0 + c:67 F1
#Forward "xvkbd -xsendevent -text "\A\[Right]"" m:0x0 + c:68 F2
#Refresh "xvkbd -xsendevent -text "\Cr"" m:0x0 + c:69 F3
Then run in a terminal:
xbindkeys
The changes from my other '.xbindkeysrc'
files on this page are the addition of 'pactl'
commands to modify the sound volume levels.
|
LINUX
MINT DEBIAN EDITION ON ACER C720 CHROMEBOOK VIA UEFI
To completely erase a Chromebook and switch to UEFI,
run the useful MrChromebox
firmware installation script while in the 'superuser' shell: MrChromebox ChromeOS
Firmware Utility Script with option #3 ("Install/Update
Full ROM Firmware").
For more information on the various ChromeOS device firmware
options, see MrChromebox
Firmware Update Types.
For more information on the differences between 'Legacy Boot' and
'UEFI Boot', see MrChromebox
Legacy Boot and UEFI.
Once converted to UEFI, you should then be able to boot a
UEFI-based LMDE installer USB stick and install LMDE
normally. However, there are a few important factors to be
aware of:
- You must erase all previous partitions that were used by
ChromeOS
- You must create a GPT partition table on the internal SSD --
possibly using 'gparted' or a command like the following while
using the LMDE USB installer stick:
sudo sgdisk -Z /dev/sda
- You must create a small EFI partition as the first partition
on the SSD (i.e. about 100mb) with a FAT32 format and both
'boot' and 'esp' flags -- possibly using 'gparted' or a
command like the following:
sudo sgdisk -n 0:0:+100M -t 0:ef00 -c 0:"EFIBOOT" /dev/sdx (where 'x' is the device name for the internal SSD) sudo mkfs.fat -F32 -n "EFIBOOT" /dev/sdx1
- You can pre-create the LMDE partition formatted as EXT4
ahead of the install -- possibly using 'gparted' or a command
like the following:
sudo sgdisk -n 0:0:0 -t 0:8300 -c 0:"LINUX" /dev/sdx sudo mkfs.ext4 -L "LINUX" /dev/sdx2
- Currently (LMDE3), it appears as though the UEFI-based LMDE
installer does not correctly populate the UEFI partition with
the appropriate boot information, leading to a reboot into a
UEFI shell instead of the GRUB2 boot menu (and LMDE)
itself. After installing LMDE -- and before rebooting --
some steps are
suggested to avoid this:
- In the UEFI settings menu, select Boot Maintenance
Manager
- Select Boot From File
- Select the entry corresponding to the LMDE partition
i.e. the one with 'HD(2,GPT,...'
in the name. If you formatted it as above, the label
name of the desired partition will be 'LINUX'.
- Navigate to and boot from '/boot/grub/x86_64-efi/grub.efi'
-Once your OS is booted, open a
terminal/shell, and type the following (observing case)
sudo su mkdir -p /boot/efi/EFI/BOOT cp /boot/grub/x86_64-efi/grub.efi /boot/efi/EFI/BOOT/BOOTX64.efi
- Reboot the Chromebook and LMDE should be available in its
typical GRUB2 boot menu
|
CHROMEOS
ALTERNATIVE REPLACEMENTS
ChromeOS on Chrome devices is limited by Google to about 6.5
years from model introduction, and other companies and
individuals have stepped in to provide updated versions of
ChromeOS to fill the void once support ends. NOTE: These
ChromeOS alternative replacements also support non-Chrome
hardware, though this is not the focus of this web page.
- CloudReady
by NeverWare
is the "free, easy way to transform your old PC or Mac into a
high-performing Chrome device"
- Croissant
(formerly Chromefy)
by Imperador
allows one to "install Chrome OS on any computer -
transforming Chromium to Chrome"
- Brunch by Sebanc aims to provide
the ability to "boot ChromeOS on any PC (with UEFI firmware
and Intel GPU"
Of these, CloudReady is, perhaps, easier to install,
better-supported, and has easy and automatic upgrades -- but
currently lacks newer ChromeOS features like support for Android
apps. It supports older legacy/BIOS firmware computers, as
well ass new UEFI firmware systems.
Croissant and Brunch are a bit more difficult to install, and
do not have fully-automatic upgrades -- but currently support
new ChromeOS features like Android and Linux apps. They
only (?) support newer UEFI firmware computers (including Chrome
devices that have been modified to run the MrChromebox
UEFI firmware replacement). To date, I have experience
with CloudReady (on non-Chrome hardware) and Brunch (on
Chromeboxes and Chromebooks).
The installation instructions for Brunch
can be found on its Github
page, but here is the simplified workflow:
[USB Install Stick Creation on Linux system]
- Download the current Brunch
release tar/gzip and untar/ungzip its contents e.g.
tar zxvf brunch_r80_k4.19_stable_20200407.tar.gz
chromeos-install.sh efi_legacy.img efi_secure.img rootc.img
unzip chromeos_12739.94.0_rammus_recovery_stable-channel_mp-v2.bin.zip Archive: chromeos_12739.94.0_rammus_recovery_stable-channel_mp-v2.bin.zip inflating: chromeos_12739.94.0_rammus_recovery_stable-channel_mp-v2.bin
- With an empty USB stick available (16GB+), run the Brunch
script to create the Brunch ChromeOS installation stick,
making sure that the destination device is the intended USB
stick (!) e.g.
sudo bash chromeos-install.sh -src chromeos_12739.94.0_rammus_recovery_stable-channel_mp-v2.bin -dst /dev/sdc
[Destination Preparation for Chrome
Computers -- Not Required on Regular UEFI Computers]
[Installation on Destination Computer:
Single-Boot ChromeOS Only]
- Boot the newly-created Brunch USB installation stick
- Enter the Crosh shell by typing Ctrl-Alt-t
and typing 'shell'
- Install Brunch ChromeOS onto the internal HD if
desired, being careful to pick the destination HD device
properly e.g.
sudo chromeos-install -dst
/dev/sda
On some machines, for example, the destination device would be:
/dev/mmcblk0
- Reboot the destination computer without the Brunch
installation stick and enjoy!
[Installation on Destination Computer:
Dual-Boot Linux + ChromeOS]
- Boot the newly-created Brunch USB installation stick
- Enter the Crosh shell by typing Ctrl-Alt-t
and typing 'shell'
- List disk partitions to insure that correct empty
partition is available for ChromeOS e.g.
sudo fdisk -l
Create temporary mount point for chosen ChromeOS partition
e.g.
sudo mkdir /mnt/sdax
sudo mount
/dev/sdax /mnt/sdax
Typically, 'sdax' would be 'sda2' or 'sda3' ('sda1'
being EFI boot partition, perhaps 'sda2' being Linux, and 'sda3'
being ChromeOS
- Install Brunch ChromeOS onto the internal HD if
desired, being careful to pick the destination HD device
properly e.g.
sudo chromeos-install -dst
/mnt/sdax/chromeos.img -s 50
Pick a size smaller than than the size of the partition in GB.
- The install will generate an appropriate GRUB2 config file
entry, which you would then use in the next step -- preserve
it for this purpose (email?)
- Reboot the destination computer without the Brunch
installation stick into Linux, and update the GRUB2 entry e.g.
/etc/grub.d/40_custom
- Update the GRUB2 settings:
sudo update-grub
[Updating Later on Destination Computer]
- In order to update the version of Brunch on the destination
computer, first download the newest Brunch release (into the
'Downloads' directory)
- Again, enter the Crosh shell (see above)
- Run the command to update the Brunch framework e.g.
sudo chromeos-update -f ~/Downloads/brunch_r80_k4.19_stable_20200407.tar.gz
- Be careful to keep the version of Brunch in sync with the
version of ChromeOS recovery image!
- Current recommendation: update Brunch manually as you need
to, but let ChromeOS update itself -- but you need to
- On single-boot machines (just ChromeOS) enter the Crosh
shell and run script to edit grub boot file:
sudo edit-grub-config
Add to the kernel line the following option:
options=enable_updates
- On dual-boot machines (Linux and ChromeOS) edit the grub
file in Linux instead (/etc/grub.d/40_custom)
and add to the kernel line:
options=enable_updates
Then run update_grub command to put it into effect:
sudo update-grub
[Optional: Creating an IMG file that can be used on a USB stick
for direct GRUB2 booting i.e. in a multi-boot configuration]
- Similar to above, except that instead of writing to a
single-purpse USB stick, or to a fresh USB stick boot on a
destination computer, a bootable IMG image file is created
that can be used in other places -- like an ISO file.
- After downloading/unzipping a matching set of Brunch
creation and ChromeOS recovery images, run the chromeos-install.sh
script with a file like 'chromeos.img':
sudo bash chromeos-install.sh -src chromeos_13421.73.0_rammus_recovery_stable-channel_mp-v2.bin -dst chromeos.img
- Copy the created IMG file to a GRUB2-prepared USB/portable
device as needed (details not appropriate here), and add to
the 'grub.cfg' the proper
commands for your situation. Most of the required GRUB4
commands are generated automatically by the 'chromeos-install.sh'
script, but the 'img_part' and
'img_path' parameters will
need to be adjusted. In my own case, '/dev/sdb4'
is the 4th partition on a USB multi-boot stick, and the '/boot/isos/' directory shares space
with other directly-bootable ISO files:
menuentry "ChromeOS (boot from disk image)" { img_part=/dev/sdb4 img_path=/boot/isos/chromeos.img loopback loop $img_path linux (loop,gpt7)/kernel boot=local noresume noswap loglevel=7 disablevmx=off \ cros_secure cros_debug loop.max_part=16 img_part=$img_part img_path=$img_path initrd (loop,gpt7)/initramfs.img }
UPDATE: A user named 'xcrvl'
created and posted a useful flowchart showing the
creation/installation steps for Brunch here,
which looks like this:
|
CHROMEBOOK DISK MAP
Using the following command:
sudo cgpt show /dev/sda
...here is a map of the ChromeOS SSD on an Acer C720 (16gb SSD):
start size part contents 0 1 PMBR (Boot GUID: 205DDDF5-1DEF-E049-AC7B-6FE0FB105C6D) 1 1 Pri GPT header 2 32 Pri GPT table 8671232 22573056 1 Label: "STATE" Type: Linux data UUID: 36F7A5F6-9960-1743-ACDA-CA73E7A5F26C 20480 32768 2 Label: "KERN-A" Type: ChromeOS kernel UUID: EC355231-0531-8E43-B41D-3D2EAFFC0B94 Attr: priority=1 tries=0 successful=1 4476928 4194304 3 Label: "ROOT-A" Type: ChromeOS rootfs UUID: 5393825B-2588-7B48-A393-A03A09598D76 53248 32768 4 Label: "KERN-B" Type: ChromeOS kernel UUID: 72B6BF28-2F5E-1D4E-9D6F-DDBAB411BF71 Attr: priority=2 tries=0 successful=1 282624 4194304 5 Label: "ROOT-B" Type: ChromeOS rootfs UUID: 1283AFCA-3146-A842-A77F-0F590A5E58B8 16448 1 6 Label: "KERN-C" Type: ChromeOS kernel UUID: 66496701-36D1-0C4F-8162-36FE991257CB Attr: priority=0 tries=15 successful=0 16449 1 7 Label: "ROOT-C" Type: ChromeOS rootfs UUID: 03BC7D11-2FD3-ED46-94AF-C7FC8BC9E87C 86016 32768 8 Label: "OEM" Type: Linux data UUID: F9B23F78-3333-AD4E-B933-2CE904B4BC2F 16450 1 9 Label: "reserved" Type: ChromeOS reserved UUID: 40706723-65A5-334D-A4E9-92D703AC9006 16451 1 10 Label: "reserved" Type: ChromeOS reserved UUID: C6EC9077-8BE5-AA48-BC22-BF45A3A86C5F 64 16384 11 Label: "RWFW" Type: ChromeOS firmware UUID: 0C8A7EC5-7407-1846-849F-F5BBCED92450 249856 32768 12 Label: "EFI-SYSTEM" Type: EFI System Partition UUID: 205DDDF5-1DEF-E049-AC7B-6FE0FB105C6D 31277199 32 Sec GPT table 31277231 1 Sec GPT header
Here is a simple map showing how 'cgpt' partition names
equate to familiar Linux device names:
cgpt
label
name
|
cgpt
partition number
|
linux
device
name
|
partition
size
|
STATE
|
1
|
/dev/sda1
|
+11gb
|
KERN-A
|
2
|
/dev/sda2
|
16mb
|
ROOT-A
|
3
|
/dev/sda3
|
2gb
|
KERN-B
|
4
|
/dev/sda4
|
16mb
|
ROOT-B
|
5
|
/dev/sda5
|
2gb
|
KERN-C
|
6
|
/dev/sda6
|
512b
|
ROOT-C
|
7
|
/dev/sda7
|
512b
|
OEM
|
8
|
/dev/sda8
|
16mb
|
RESERVED
|
9
|
/dev/sda9
|
512b
|
RESERVED |
10
|
/dev/sda10
|
512b
|
RESERVED |
11
|
/dev/sda12
|
8mb
|
EFI-SYSTEM
|
12
|
/dev/sda13
|
16mb
|
Here
is more explanation of what those partitions are used for.
Roughly, ChromeOS takes up 7gb. Most of it is stored in the
'KERN-A' (/dev/sda2)
and 'ROOT-A' (/dev/sda3)
partitions, and in the 'KERN-B' (/dev/sda4) and 'ROOT-B'
(/dev/sda5) partitions. The
'active' version of ChromeOS (either the 'A' or 'B' pair of
partitions) is read-only, allowing updates to be made to the
'inactive' version before the next reboot occurs. Each copy
of ChromeOS exists in a 2GB 'ROOT-x'
partition. A good chunk of space is also consumed in the 'STATE' partition, which varies in size
depending on the SSD drive capacity (approximately 6GB less than
this).
Typically, space to install Linux for dual-boot is taken from the
'STATE' partition (in RED
above), and re-assigned to the 'ROOT-C'
partition (in GREEN above). In
this example, with a 16gb SSD, the 'STATE'
partition is 22573056 sectors @ 512 bytes = 11gb. All of
this space can be devoted to a Linux install, but this would leave
no storage space for ChromeOS at all -- so in this case the
recommended maximum size for Linux on a 16gb SSD would be around
7gb or 8gb. Note that the locations of 'KERN-C'
and 'ROOT-C' are moved from their
original offsets to a location within the original 'STATE'
partition.
On a Chromebook with a 32gb drive, the 'STATE'
partition is 53825536 sectors @512 bytes = 26gb, so there is
potentially a lot more room for installing Linux i.e. up to 23gb
or 24gb.
On my C720P with the 32gb SSD replaced by a 128gb one, the 'STATE' partition is currently 73560064
sectors @512 bytes = 35gb, while the 'ROOT-C'
partition is 167772160 sectors @512 bytes = 80gb.
Examine the re-partitioning scripts mentioned above to see how the
relevant partitions are modified, but the basic algorithm is as
follows (NOTE: do NOT run these directly unless you know what you
are doing!):
# the original partition is changed to be smaller
cgpt add -i 1 -b $stateful_start -s $stateful_size -l STATE ${target_disk}
# this creates a new partition called "kernc"
cgpt add -i 6 -b $kernc_start -s $kernc_size -l KERN-C ${target_disk}
# this creates a new partition called "rootc"
cgpt add -i 7 -b $rootc_start -s $rootc_size -l ROOT-C ${target_disk}
For curiosity's sake, here is what the 'STATE' partition looks
like when examined with the Linux 'tree' command:
/dev/sda1 ├── dev_image ├── encrypted ├── encrypted.block ├── encrypted.key ├── home │ ├── chronos │ ├── root │ │ └── 7b84d0951c0eeeeba2e89c3adf51736c2cf6495f │ └── user │ └── 7b84d0951c0eeeeba2e89c3adf51736c2cf6495f ├── lost+found ├── shutdown_stateful_umount_failure └── unencrypted ├── cache │ └── vpd │ ├── echo │ │ └── vpd_echo.txt │ ├── filtered.txt │ └── full-v2.txt ├── clobber.log ├── clobber-state.log └── preserve ├── attestation.epb └── attestation.epb.sum
14 directories, 10 files
|
SSH
SERVER IN CHROMEOS
There may be situations where it is desirable to connect to
your ChromeOS device via SSH, so here are slightly-modified
instructions from DcK
Area on set up an SSH server. NOTE: The actual server
comes pre-installed, but is not configured for normal operation.
Enter a superuser shell (i.e. Ctrl-Alt-t and typing 'shell')
and enter the following to setup the server:
sudo su mkdir -p -m 0711 /mnt/stateful_partition/etc/ssh
cd /mnt/stateful_partition/etc/ssh
ssh-keygen -t rsa -f ssh_host_rsa_key
ssh-keygen -t dsa -f ssh_host_dsa_key # not needed anymore? exit
To then start the SSH server:
sudo /usr/sbin/sshd sudo iptables -I INPUT -p tcp --dport 22 -j ACCEPT
NOTE: You may get a warning message "Could not load host key" when
you start the SSH server -- but if you created the key files
properly ahead of this, then the reference is to a strangely-named
key that could not be found -- and does not matter. The
reference to this other key is in '/etc/ssh/sshd_config',
but this file cannot be edited to remove this reference since it
is read-only -- and even though it is possible to make the root
filesystem writable, the downsides to doing so are not worth it.
NOTE: You will need to repeat these last two commands each time
you wish to start the SSH server, since there is no (easy? safe?)
way to auto-start custom commands while in ChromeOS like
this. One way to make this a bit easier is to define some
easier alias commands -- put something like this into '~/.bashrc':
alias sshsrv='sudo /usr/sbin/sshd; sudo iptables -I INPUT -p tcp --dport 22 -j ACCEPT'
NOTE: For me, I was not able to get this to work until I
configured SSH to use 'Public
Key Authentication' instead of 'Password
Authentication'. My understanding is that this is due to the
SSH server configuration setting for ChromeOS has password
authentication deactivated i.e. in the root '/etc/ssh/sshd_config'
file is the following line:
PasswordAuthentication no
So, in order to use public key authentication instead,
while signed into the Crosh secure shell as 'chronos',
enter:
ssh-keygen -t rsa
Answer the prompts, and this will populate a directory '/home/chronos/user/.ssh' with some SSH
files. Into the 'authorized_keys'
file insert an entry that corresponds to the 'id_rsa.pub'
file from the machine you intend to use to connect to ChromeOS
with (assuming that SSH is already set up there!). One way
to do this with a single shell command is something like the
following:
ssh user@remoteipaddress 'cat .ssh/id_rsa.pub' >> ~/.ssh/authorized_keys
You should now be able to SSH connect to the 'chronos' session on
the Chromebook from a remote PC without using a password, and
doing so securely, using default port 22:
ssh chronos@chromebookipaddr
If you do not know the IP address of your Chromebook:
ifconfig
|
CHROMEOS
MACHINE BENCHMARKS
Over time, I have acquired various ChromeOS
devices (* as well as non-ChromeOS devices that have allowed me
to install the Brunch version of ChromeOS myself) and it has
been interesting to compare their performance (shown below, from
fastest to slowest). Interestingly, those machines with
have been configured to allow dual-booting into Linux Mint
and/or Windows 10, running the same benchmarks within a Chrome
browser 15%-20% slower than the ChromeOS/Brunch native Chrome
browser (!):
Computer
|
CPU
|
OS/Version
|
Speedometer
2.0
|
Octane
2.0
|
Dell 3010 Chromebox
|
Intel Core i7-4600U |
Brunch 86
|
88.70
|
31459
|
Google Pixel Slate
|
Intel Core i3-8100Y
|
ChromeOS 86 |
87.30
|
29179
|
Chuwi LarkBox *
|
Intel Celeron
J4115 |
Brunch 86 |
50.70
|
16941
|
Acer C740 Chromebook
|
Intel Celeron 3205U |
ChromeOS 86
|
44.41
|
13902
|
Asus CN60 Chromebox |
Intel Celeron 2955U |
Brunch 86 |
41.49
|
12685
|
Acer C720P Chromebook |
Intel Celeron 2955U |
Brunch 86 |
39.86
|
11242
|
Dell 3120 Chromebook
|
Intel Celeron N2840 |
Brunch 86
|
21.99
|
9032
|
Acer C738T Chromebook
|
Intel Celeron N3150
|
ChromeOS 86
|
20.82
|
8574
|
Asus CS10 Chromebit
|
RockChip RK3288-C |
ChromeOS 86 |
20.10
|
6425
|
The reason for running the Brunch
version of ChromeOS instead of the original version of ChromeOS
is that those machines no longer were under support.
Installing Brunch
provided a great way of having a current and more feature-filled
(e.g. Linux and Android support) than the original! This
did require a replacement of the original machine Coreboot
(Depthcharge payload) firmware with a UEFI (Tianocore payload)
one installed via the MrChromebox
ChromeOS Firmware Utility Script , but the effort was
worth it.
|