Skip to content

Instantly share code, notes, and snippets.

@dshaw
Last active November 17, 2022 14:50
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save dshaw/1ab7e70af96d56ea080c to your computer and use it in GitHub Desktop.
Save dshaw/1ab7e70af96d56ea080c to your computer and use it in GitHub Desktop.
Running Node on a Samsung 303C Chromebook

Running Node on a Samsung 303C Chromebook

Motivation

After @mikeal and @lyle purchased Chromebooks for kids activities at NodeConf 2014, I was very impressed with the device and decided to explore this as a laptop and hacking device for my kids (7 & 8). I'd love to retain the simplicity of the web-focused ChromeOS experience while letting my kids hack on NodeBots and learn how to program.

It seems like the platforms that ChromeOS runs on are quite diverse. The Samsung 303C hit the right balance of being an aesthetically pleasing looking device, having respectable build quality and the amazing $250 price point. The 303C has an ARM processor. Not all Chromebooks do. I'm writing the below step-by-step very specifically for this system.

Resources

I found the following useful and, in aggregate, they all helped get me to where I ended up. 🎉

$ node -v
v0.10.26

Step-by-step to Node.js

  1. Create a recovery disk. (I did this, though I may never go back.)
  2. Enter Recovery mode
    • ESC-Refresh-Power
  3. Enter Dev-mode (developer mode)
    • Ctrl-D
  4. Open a terminal ("crosh")
    • Ctrl-Alt-t
  5. Invoke the shell
    • $ shell
  6. Switch to root
    • $ sudo su
  7. Remove rootfs verification and reboot
    • $ ./usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 4
    • $ reboot
  8. Make rootfs writeable. (Note that this needs to be done on every reboot. I chose to setup that rw script.)
    • sudo mount -o remount,rw /
    • sudo mount -o remount,exec /mnt/stateful_partition
    • sudo mount -i -o remount,exec /home/chronos/user
  9. Download Node cross-compiled for Arm
  10. Open archive
    • $ cd /home/chronos/user/Downloads/
    • $ tar -xvf node-v0.10.26-linux-arm-pi.tar.gz
  11. Install node
    • $ cd ./node-v0.10.26/bin/
    • $ cp node /usr/bin
  12. Install npm
    • $ curl -L https://npmjs.org/install.sh | sh
    • Trying to install the included npm failed. The above "old fashioned way" worked perfectly.

Contribute

Did this work for you? Please leave a note below. If you ended up doing anything different, please fork and add those steps.

Copy link

ghost commented May 4, 2016

Thank you so much for this! I was having trouble installing npm on my ARM-based Asus C201. I followed your guide step-by-step and it worked, the only thing I had to change was in step 7, after running $ ./usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 4 I had to run sudo crossystem dev_boot_signed_only=0 because otherwise I was getting an error when I ran sudo mount -o remount,rw /, even after rebooting.

@RMcNeely
Copy link

This is a great guide but I had to do a little bit of refactoring around step 7 to get things working. I had issues with being able to remount the / filesystem as rw and I believe its b/c on my Chromebook, it wasn't partition 4. I ran ./usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification and it gave me the partition that I need to edit, in my case partitions 2. After that things worked out pretty much perfectly.

@maheshDe
Copy link

maheshDe commented Feb 2, 2017

I followed your guide step-by-step, in step 12 while installing npm i got an error : Failed to connect to npmjs.org port 443: No route to host
and after installing node (step 11) I am executing node -v to check node version, but its giving me following error bash: /usr/bin/node: cannot execute binary file: Exec format error

@dshaw
Copy link
Author

dshaw commented Feb 4, 2017

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