Skip to content

Instantly share code, notes, and snippets.

@iamerikjolson
Last active July 18, 2023 09:07
Show Gist options
  • Select an option

  • Save iamerikjolson/e4cf127d6c67734d286b to your computer and use it in GitHub Desktop.

Select an option

Save iamerikjolson/e4cf127d6c67734d286b to your computer and use it in GitHub Desktop.
How to setup your Chromebook as a dev box

1/4/2016, updated 1/17/2016

#Configuring Chromebook for Development

After a full Sunday of trial and error, and stepping through many semi-complete or dated blog posts explaining how to do this, I was able to get the Chromebook into developer mode, install NodeJs, and install NPM.

Here's what I did...

  1. Enable Developer Mode
  • Press Esc-Refresh-Power keys which will reboot the Chromebook
  • When the warning screen comes up, press the Ctrl-D keys
  • Confirm you want to turn "OS Verification off" by pressing the Enter key
  • Confirm you want to transition to dev mode by again pressing the Ctrl-D keys
  • The system will reboot and you'll see the "Preparing system for Developer Mode" screen for 3-5 minutes.
  • You'll be greeted with an "OS Verification is OFF" warning screen. This is the warning screen you'll see each time going forward after a reboot. Either wait 10 or so seconds for it to pass and goes into dev mode, or click Ctrl-D to bypass the message and go into dev mode. Pressing the space bar will result in OS verification being turned back on, which means all your dev customizations will be lost and the system will be powerwashed (aka - regressing to the factory reset).
  • Pick your WIFI and login using your Google account
  1. Open a terminal ("crosh")
  • Open CROSH by pressing the Ctrl-Alt-T keys
  • Launch GNU BASH by typing shell
  1. Make the file system writable:
  • sudo /usr/share/vboot/bin/make_dev_ssd.sh --force --remove_rootfs_verification
  • Reboot the Chromebook (hold down the power key until it turns off, then turn press the power key to turn it on)
  • Login as normal
  1. Make rootfs writeable
    • Open CROSH (Ctrl-Alt-T) then BASH (shell)
    • sudo mount -o remount,rw /
    • sudo mount -o remount,exec /mnt/stateful_partition
    • sudo mount -i -o remount,exec /home/chronos/user
  2. Install Chromebrew (which also installs Ruby and Git)
  • wget -q -O - https://raw.github.com/skycocker/chromebrew/master/install.sh | bash.
  1. Download NodeJs
  • Navigate to nodejs.org
  • Download the latest stable version (for Linux x64)
  • In the Files app, double click the zip (.tar.gz) file to extract it
  1. Move the files out of the download folder and rename the folder
  • rm ~/Downloads/node-v4.2.4-linux-x64 ~/nodejs (change source directory name as needed)
  1. Make Node executable
  • cd ~/nodejs/bin
  • sudo chmod +x node
  1. Install NPM (it doesn't come with the Linux distro of Node)
  • curl -L https://npmjs.org/install.sh | sh
  1. Link the binaries
  • sudo ln -sf /home/chronos/user/nodejs/bin/node /usr/bin/node
  • sudo ln -sf /home/chronos/user/nodejs/bin/npm /usr/bin/npm
  1. Confirm all is good
  • Type node --version to confirm NodeJs is installed properly
  • Type npm --version to confirm NPM is installed properly

###Sources Listed in order of primary sources first...

  1. Stephen T. Cannon; Chromebooks Ain't Fer Grandmas!
  2. Poking around your Chrome OS Device
  3. https://gist.github.com/dshaw/1ab7e70af96d56ea080c
@sjfricke
Copy link

sjfricke commented May 23, 2018

Not all heroes wear capes

but few extra things to add to make it slightly better

  1. open ~/.bashrc and at the bottom add /sbin/rw so it runs the read/write permission automatically
  2. instead of doing all the sudo ln -sf in the bottom of the ~/.bashrc just add PATH=$PATH:/home/chronos/user/nodejs/bin
  • This will add node and npm for you
  • This will also add anything you install with npm install -g
  • Make sure to run . ~/.bashrc to have this take effect on the same terminal that you set this up

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