These instructions will not work on Chromebooks with an ARM processor. If you have an ARM processor then you cannot install Chromebrew to get git. You'll need to instead install crouton. Here are instructions that you can follow: https://github.com/macton/arch-linux-install-notes/tree/master/arm-chromebook-chroot
#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 git, Node.js, and NPM.
Here's what I did...
- Enable Developer Mode
- Press
Esc-Refresh-Powerkeys which will reboot the Chromebook - When the warning screen comes up, press the
Ctrl-Dkeys - Confirm you want to turn "OS Verification off" by pressing the
Enterkey - Confirm you want to transition to dev mode by again pressing the
Ctrl-Dkeys - 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-Dto 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
- Open CROSH (Chromebook shell)
- Open CROSH by pressing the
Ctrl-Alt-Tkeys - Launch GNU BASH by typing
shell
- Make the file system writable:
sudo /usr/share/vboot/bin/make_dev_ssd.sh --force --remove_rootfs_verification- [BTW: to paste into CROSH or shell use
Ctrl-Shirt-v] - You'll receive a warning and a 5-second count down. Let it continue until you get the message "Successfully re-signed..."
- 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
- Make rootfs writeable
- Open CROSH (
Ctrl-Alt-T) then BASH (shell) - Create a script that, when executed, will make the file system writeable. Type the following...
sudo vi /sbin/rw(which will open VIM and create the rw file under the/sbinfolder). Now, within VIM press theikey to insert text into VIM and then type out the following script...- #!/bin/bash
- echo "Making FS Read/Write"
- sudo mount -o remount,rw /
- sudo mount -o remount,exec /mnt/stateful_partition
- sudo mount -i -o remount,exec /home/chronos/user
- echo "You should now have full Read/Write access"
- exit
- Press
escthen type:wqin VIM to save the file and quit - Back in shell, type
sudo chmod a+x /sbin/rwto make the rw file executable - Now execute the rw file by typing
sudo rw. You'll need execute therwscript after after each reboot.
- Open CROSH (
- Install Chromebrew (which also installs Ruby and Git)
wget -q -O - https://raw.github.com/skycocker/chromebrew/master/install.sh | bash
- Download Node.js
- Navigate to nodejs.org
- Download the most recent "Mature and Dependable" version (for Linux x64, which the webpage should auto-recognize). The file downloads to the
Downloadsfolder. - Extract the
tar. In shell, navigate to the Downloads folder and run the following command,tar -xf node-v4.3.1-linux-x64.tar.xz(changing the file name to be what you downloaded from nodejs.org)
- Move the files out of the download folder and rename the folder to a simply
nodejs
- Back in shell, type
mv ~/Downloads/node-v4.2.4-linux-x64 ~/nodejs(Note: change the source directory name as needed)
- Make Node.js executable
cd ~/nodejs/binsudo chmod +x node
- Link the node binary. This enables you to execute the
nodecommand from any directory
- In shell, type
sudo ln -sf /home/chronos/user/nodejs/bin/node /usr/bin/node - Type
node --versionto confirm NodeJs is installed properly
- Install NPM (it doesn't come with the Linux distro of Node)
curl -L https://npmjs.org/install.sh | sh
- Link the NPM binary
- In shell, type
sudo ln -sf /home/chronos/user/nodejs/bin/npm /usr/bin/npm - Type
npm --versionto confirm NPM is installed properly
Optional:
- Install Grunt
- In shell, type
npm install -g grunt-cli. That will install Grunt, but you cannot access the global NPM module until you link it. - In shell, type
sudo ln -sf /home/chronos/user/nodejs/bin/grunt /usr/bin/grunt - Type
grunt --versionto confirm Grunt is installed properly
- Install MongoDB (although you could just use a sandbox DB on mlab.com for free)
- Go to https://docs.mongodb.org/manual/tutorial/install-mongodb-on-linux, hereafter referred to as Mongo Webpage
- Under Download the binary files for the desired release of MongoDB, copy the
curlcommand. - In shell,
cd ~/Downloads - Execute the
curlcommand copied from Mongo Webpage. That will download the tar to the Downloads folder. - Extract the
tarby running the step #2 from the Mongo Webpage - Move mongo to the home directory and rename it.
mv ~/Downloads/mongodb-linux-x86_64-3.2.3 ~/mongodb(rename source folder name as needed) - Symlink:
sudo ln -sf /home/chronos/user/mongodb/bin/node /usr/bin/node - Type
mongo --versionto confirm mongo is installed properly 13(b). TODO: dump and restore a DB.
###Revision Log
- 1/4/2016 - created
- 1/17/2016 - updated when I had my Chromebook got accidentially slicked and I had to reset dev mode
- 2/16/2016 - noticed a few minor missing steps
- 2/18/2016 - replaced the untarring instructions so that you untar using a linux command
- 2/22/2016 - added
gruntinstallation instructions - 2/25/2016 - added
mongoinstallation instructions
###Sources Listed in order of primary sources first...
Not all heroes wear capes
but few extra things to add to make it slightly better
~/.bashrcand at the bottom add/sbin/rwso it runs the read/write permission automaticallysudo ln -sfin the bottom of the~/.bashrcjust addPATH=$PATH:/home/chronos/user/nodejs/binnodeandnpmfor younpm install -g. ~/.bashrcto have this take effect on the same terminal that you set this up